aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/priv/run_test.in
blob: 1508751e4fd7fc7524e9bf55de358e97d4078d5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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