Commit 6e82a8c3 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

(MERGE) sdk/lua/branches/02_00_00 [169190]



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/02_00_01@169193 ae0415b3-e90b-0410-900d-d0be9363c56b
parents ad916a1d d4bea698
...@@ -5,11 +5,9 @@ testcase=$2 ...@@ -5,11 +5,9 @@ testcase=$2
tasks=$3 tasks=$3
services=$4 services=$4
busconsole="${OPENBUS_SDKLUA_HOME}/bin/busconsole" runconsole="source ${OPENBUS_SDKLUA_TEST}/runconsole.sh $mode"
if [[ "$mode" == "DEBUG" ]]; then if [[ "$mode" != "DEBUG" && "$mode" != "RELEASE" ]]; then
busconsole="$busconsole -d"
elif [[ "$mode" != "RELEASE" ]]; then
echo "Usage: $0 <RELEASE|DEBUG> <tasks> <services>" echo "Usage: $0 <RELEASE|DEBUG> <tasks> <services>"
exit 1 exit 1
fi fi
...@@ -18,19 +16,19 @@ cd $testcase ...@@ -18,19 +16,19 @@ cd $testcase
pid= pid=
for service in $services; do for service in $services; do
echo "Starting service '$service' of test '$testcase'" echo "Starting service '$service' of test '$testcase'"
$busconsole $service.lua $testcase & $runconsole $service.lua $testcase &
pid="$pid $!" pid="$pid $!"
trap "kill $pid > /dev/null 2>&1" 0 trap "kill $pid > /dev/null 2>&1" 0
done done
for task in $tasks; do for task in $tasks; do
echo -n "Executing task '$task' of test '$testcase' ... " echo -n "Executing task '$task' of test '$testcase' ... "
$busconsole $task.lua $testcase $runconsole $task.lua $testcase
echo "OK" echo "OK"
done done
cd ../../test cd ../../test
echo -n "Test protocol with server of test '$testcase' ... " echo -n "Test protocol with server of test '$testcase' ... "
$busconsole openbus/test/Protocol.lua $runconsole openbus/test/Protocol.lua
echo "OK" echo "OK"
cd ../interop cd ../interop
...@@ -9,8 +9,8 @@ elif [[ "$mode" != "RELEASE" && "$mode" != "DEBUG" ]]; then ...@@ -9,8 +9,8 @@ elif [[ "$mode" != "RELEASE" && "$mode" != "DEBUG" ]]; then
exit 1 exit 1
fi fi
bus1port=20011 bus1port=20210
bus2port=20021 bus2port=20212
leasetime=1 leasetime=1
passwordpenalty=1 passwordpenalty=1
...@@ -21,24 +21,24 @@ echo "login.lease.time=$leasetime" >> $OPENBUS_TESTCFG ...@@ -21,24 +21,24 @@ echo "login.lease.time=$leasetime" >> $OPENBUS_TESTCFG
echo "password.penalty.time=$passwordpenalty" >> $OPENBUS_TESTCFG echo "password.penalty.time=$passwordpenalty" >> $OPENBUS_TESTCFG
#echo "openbus.test.verbose=yes" >> $OPENBUS_TESTCFG #echo "openbus.test.verbose=yes" >> $OPENBUS_TESTCFG
runbus="${OPENBUS_CORE_TEST}/runbus.sh $mode" runbus="source ${OPENBUS_CORE_TEST}/runbus.sh $mode"
runadmin="${OPENBUS_CORE_TEST}/runadmin.sh $mode" runadmin="source ${OPENBUS_CORE_TEST}/runadmin.sh $mode"
source $runbus BUS01 $bus1port $runbus BUS01 $bus1port
source $runbus BUS02 $bus2port $runbus BUS02 $bus2port
genkey $OPENBUS_TEMP/testsyst genkey $OPENBUS_TEMP/testsyst
source $runadmin localhost $bus1port --script=${OPENBUS_CORE_TEST}/test.adm $runadmin localhost $bus1port --script=${OPENBUS_CORE_TEST}/test.adm
source $runadmin localhost $bus2port --script=${OPENBUS_CORE_TEST}/test.adm $runadmin localhost $bus2port --script=${OPENBUS_CORE_TEST}/test.adm
source runtests.sh $mode source runtests.sh $mode
source $runadmin localhost $bus1port --undo-script=${OPENBUS_CORE_TEST}/test.adm $runadmin localhost $bus1port --undo-script=${OPENBUS_CORE_TEST}/test.adm
source $runadmin localhost $bus2port --undo-script=${OPENBUS_CORE_TEST}/test.adm $runadmin localhost $bus2port --undo-script=${OPENBUS_CORE_TEST}/test.adm
cd ../interop cd ../interop
source $runadmin localhost $bus1port --script=script.adm $runadmin localhost $bus1port --script=script.adm
source $runadmin localhost $bus2port --script=script.adm $runadmin localhost $bus2port --script=script.adm
source runall.sh $mode source runall.sh $mode
sleep 2 # wait for offers to expire sleep 2 # wait for offers to expire
source $runadmin localhost $bus1port --undo-script=script.adm $runadmin localhost $bus1port --undo-script=script.adm
source $runadmin localhost $bus2port --undo-script=script.adm $runadmin localhost $bus2port --undo-script=script.adm
cd ../test cd ../test
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
mode=$1 mode=$1
busconsole="${OPENBUS_SDKLUA_HOME}/bin/busconsole" busconsole="env LUA_PATH=${OPENBUS_SDKLUA_TEST}/?.lua ${OPENBUS_SDKLUA_HOME}/bin/busconsole"
if [[ "$mode" == "DEBUG" ]]; then if [[ "$mode" == "DEBUG" ]]; then
busconsole="$busconsole -d" busconsole="$busconsole -d"
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
mode=$1 mode=$1
busconsole="${OPENBUS_SDKLUA_HOME}/bin/busconsole" runconsole="source ${OPENBUS_SDKLUA_TEST}/runconsole.sh $mode"
if [[ "$mode" == "DEBUG" ]]; then if [[ "$mode" != "DEBUG" && "$mode" != "RELEASE" ]]; then
busconsole="$busconsole -d"
elif [[ "$mode" != "RELEASE" ]]; then
echo "Usage: $0 <RELEASE|DEBUG>" echo "Usage: $0 <RELEASE|DEBUG>"
exit 1 exit 1
fi fi
...@@ -26,6 +24,6 @@ openbus/test/assistant/AssistantLoginLogout \ ...@@ -26,6 +24,6 @@ openbus/test/assistant/AssistantLoginLogout \
" "
for case in $cases; do for case in $cases; do
echo -n "Test '${case}' ... " echo -n "Test '${case}' ... "
$busconsole $case.lua ${@:2:${#@}} || exit $? $runconsole $case.lua ${@:2:${#@}} || exit $?
echo "OK" echo "OK"
done done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment