aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/priv/run_test.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common_test/priv/run_test.in')
-rwxr-xr-xlib/common_test/priv/run_test.in63
1 files changed, 63 insertions, 0 deletions
diff --git a/lib/common_test/priv/run_test.in b/lib/common_test/priv/run_test.in
new file mode 100755
index 0000000000..1508751e4f
--- /dev/null
+++ b/lib/common_test/priv/run_test.in
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+args=""
+
+while [ $1 ]; do
+ if [ $1 = "-config" ]; then
+ args="$args -ct_config";
+ elif [ $1 = "-decrypt_key" ]; then
+ args="$args -ct_decrypt_key";
+ elif [ $1 = "-decrypt_file" ]; then
+ args="$args -ct_decrypt_file";
+ elif [ $1 = "-vts" ]; then
+ vts=1;
+ args="$args $1";
+ elif [ $1 = "-browser" ]; then
+ browser=$2;
+ args="$args $1";
+ elif [ $1 = "-shell" ]; then
+ shell=1;
+ args="$args $1";
+ elif [ $1 = "-ctname" ]; then
+ ctname=$2;
+ args="$args";
+ elif [ $1 = "-ctmaster" ]; then
+ master=1;
+ args="$args";
+ else
+ args="$args $1"
+ fi
+ shift
+done
+
+if [ $vts ]; then
+ erl -sname ct \
+ -pa @CTPATH@ \
+ -pa @TSPATH@ \
+ -s webtool script_start vts $browser \
+ -s ct_run script_start \
+ $args;
+elif [ $shell ]; then
+ erl -sname ct \
+ -pa @CTPATH@ \
+ -pa @TSPATH@ \
+ -s ct_run script_start \
+ $args;
+elif [ $ctname ]; then
+ erl -sname $ctname \
+ -pa @CTPATH@ \
+ -pa @TSPATH@ \
+ $args;
+elif [ $master ]; then
+ erl -sname ct_master \
+ -pa @CTPATH@ \
+ -pa @TSPATH@ \
+ $args;
+else
+ erl -sname ct \
+ -pa @CTPATH@ \
+ -pa @TSPATH@ \
+ -s ct_run script_start \
+ -s erlang halt \
+ $args
+fi