From b90732f93bd9e649bbb9b7a9ecee911b3e332a5a Mon Sep 17 00:00:00 2001 From: Benjamin Jones Date: Thu, 23 May 2013 19:42:33 -0700 Subject: added EnvJasmine script and config file. You need to clone the EnvJasmine git repo to tools/EnvJasmine/ for the run script to work --- tools/bin/run_jasmine_tests.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 tools/bin/run_jasmine_tests.sh (limited to 'tools') 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 + + -- cgit v1.2.3