Commit d4bea698 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

[OPENBUS-2881] Correção para que operações legadas lancem exceções corretas

- Ajustes para automação da execução dos testes dos serviços legados do núcleo sobre um barramento novo.

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/02_00_00@169190 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 633bd6e6
...@@ -4,11 +4,9 @@ mode=$1 ...@@ -4,11 +4,9 @@ mode=$1
testcase=$2 testcase=$2
services="server" services="server"
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> <test> [services...]" echo "Usage: $0 <RELEASE|DEBUG> <test> [services...]"
exit 1 exit 1
fi fi
...@@ -21,16 +19,16 @@ cd $testcase ...@@ -21,16 +19,16 @@ 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
echo -n "Executing test '$testcase' ... " echo -n "Executing test '$testcase' ... "
$busconsole client.lua $testcase $runconsole client.lua $testcase
echo "OK" echo "OK"
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
...@@ -24,6 +22,6 @@ openbus/test/assistant/AssistantLoginLogout \ ...@@ -24,6 +22,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