diff options
author | Benjamin Jones <bjones@galois.com> | 2013-05-23 19:42:33 -0700 |
---|---|---|
committer | Benjamin Jones <bjones@galois.com> | 2013-05-23 19:42:33 -0700 |
commit | b90732f93bd9e649bbb9b7a9ecee911b3e332a5a (patch) | |
tree | cbfc3e07b2eef848ba7346a7dcf1120dd94adef2 /tools | |
parent | 0db7c6b6cb6326806e40c8139f27f6bf8507b03a (diff) |
added EnvJasmine script and config file. You need to clone the EnvJasmine git repo to tools/EnvJasmine/ for the run script to work
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/bin/run_jasmine_tests.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/bin/run_jasmine_tests.sh b/tools/bin/run_jasmine_tests.sh new file mode 100755 index 0000000..721ac59 --- /dev/null +++ b/tools/bin/run_jasmine_tests.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# +# Run Jasmine tests headless using EnvJasmine +# (https://github.com/trevmex/EnvJasmine) + +usage() { + echo "" + echo "Usage:" + echo "" + echo "Set FIVEUI_ROOT environment variable." + echo "Run:" + echo "> $0 specFileName" + echo "" + echo "where specFileName is an **absolute** file path" + echo "" +} + +[ -z "$FIVEUI_ROOT" ] && { echo "Need to set FIVEUI_ROOT"; exit 1; } +ENV_JASMINE_ROOT=$FIVEUI_ROOT/tools/EnvJasmine/ + +[ -z "$1" ] && { echo "No test spec specified"; usage; exit 1; } + +CMD="java -Dfile.encoding=utf-8 -jar \"$ENV_JASMINE_ROOT/lib/rhino/js.jar\" \ + \"$ENV_JASMINE_ROOT/lib/envjasmine.js\" --environment=\"UNIX\" \ + --rootDir=\"$ENV_JASMINE_ROOT\" \ + --configFile=\"$FIVEUI_ROOT/contexts/data/tests/env_jasmine_deps.js\" " + + +for (( i=1 ; i < $#+1 ; i=$i+1 )) do + CMD="$CMD \"${!i}\"" +done + +eval $CMD + + |