runall.sh 1.38 KB
Newer Older
1
#!/bin/bash
2

3
mode=$1
4

5 6 7
if [[ "$mode" == "" ]]; then
	mode=RELEASE
elif [[ "$mode" != "RELEASE" && "$mode" != "DEBUG" ]]; then
8
	echo "Usage: $0 [RELEASE|DEBUG]"
9 10
	exit 1
fi
11

12 13
bus1port=21210
bus2port=21212
14 15 16 17 18 19 20 21 22 23
leasetime=1
passwordpenalty=1

export OPENBUS_TESTCFG=$OPENBUS_TEMP/test.properties
echo "bus.host.port=$bus1port"                 > $OPENBUS_TESTCFG
echo "bus2.host.port=$bus2port"               >> $OPENBUS_TESTCFG
echo "login.lease.time=$leasetime"            >> $OPENBUS_TESTCFG
echo "password.penalty.time=$passwordpenalty" >> $OPENBUS_TESTCFG
#echo "openbus.test.verbose=yes"               >> $OPENBUS_TESTCFG

24 25
runbus="source ${OPENBUS_CORE_TEST}/runbus.sh $mode"
runadmin="source ${OPENBUS_CORE_TEST}/runadmin.sh $mode"
26

27 28
$runbus BUS01 $bus1port
$runbus BUS02 $bus2port
29 30
genkey $OPENBUS_TEMP/testsyst

31 32
$runadmin localhost $bus1port --script=${OPENBUS_CORE_TEST}/test.adm
$runadmin localhost $bus2port --script=${OPENBUS_CORE_TEST}/test.adm
33
source runtests.sh $mode
34 35
$runadmin localhost $bus1port --undo-script=${OPENBUS_CORE_TEST}/test.adm
$runadmin localhost $bus2port --undo-script=${OPENBUS_CORE_TEST}/test.adm
36 37

cd ../interop
38 39
$runadmin localhost $bus1port --script=script.adm
$runadmin localhost $bus2port --script=script.adm
40 41
source runall.sh $mode
sleep 2 # wait for offers to expire
42 43
$runadmin localhost $bus1port --undo-script=script.adm
$runadmin localhost $bus2port --undo-script=script.adm
44
cd ../test