Commit ed088e82 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/trunk@169190 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 5ce48e04
......@@ -5,11 +5,9 @@ testcase=$2
tasks=$3
services=$4
busconsole="${OPENBUS_SDKLUA_HOME}/bin/busconsole"
runconsole="source ${OPENBUS_SDKLUA_TEST}/runconsole.sh $mode"
if [[ "$mode" == "DEBUG" ]]; then
busconsole="$busconsole DEBUG"
elif [[ "$mode" != "RELEASE" ]]; then
if [[ "$mode" != "DEBUG" && "$mode" != "RELEASE" ]]; then
echo "Usage: $0 <RELEASE|DEBUG> <tasks> <services>"
exit 1
fi
......@@ -18,19 +16,19 @@ cd $testcase
pid=
for service in $services; do
echo "Starting service '$service' of test '$testcase'"
$busconsole $service.lua $testcase &
$runconsole $service.lua $testcase &
pid="$pid $!"
trap "kill $pid > /dev/null 2>&1" 0
done
for task in $tasks; do
echo -n "Executing task '$task' of test '$testcase' ... "
$busconsole $task.lua $testcase
$runconsole $task.lua $testcase
echo "OK"
done
cd ../../test
echo -n "Test protocol with server of test '$testcase' ... "
$busconsole openbus/test/Protocol.lua
$runconsole openbus/test/Protocol.lua
echo "OK"
cd ../interop
......@@ -9,8 +9,8 @@ elif [[ "$mode" != "RELEASE" && "$mode" != "DEBUG" ]]; then
exit 1
fi
bus1port=21011
bus2port=21021
bus1port=21210
bus2port=21212
leasetime=1
passwordpenalty=1
......@@ -21,24 +21,24 @@ echo "login.lease.time=$leasetime" >> $OPENBUS_TESTCFG
echo "password.penalty.time=$passwordpenalty" >> $OPENBUS_TESTCFG
#echo "openbus.test.verbose=yes" >> $OPENBUS_TESTCFG
runbus="${OPENBUS_CORE_TEST}/runbus.sh $mode"
runadmin="${OPENBUS_CORE_TEST}/runadmin.sh $mode"
runbus="source ${OPENBUS_CORE_TEST}/runbus.sh $mode"
runadmin="source ${OPENBUS_CORE_TEST}/runadmin.sh $mode"
source $runbus BUS01 $bus1port
source $runbus BUS02 $bus2port
$runbus BUS01 $bus1port
$runbus BUS02 $bus2port
genkey $OPENBUS_TEMP/testsyst
source $runadmin localhost $bus1port --script=${OPENBUS_CORE_TEST}/test.adm
source $runadmin localhost $bus2port --script=${OPENBUS_CORE_TEST}/test.adm
$runadmin localhost $bus1port --script=${OPENBUS_CORE_TEST}/test.adm
$runadmin localhost $bus2port --script=${OPENBUS_CORE_TEST}/test.adm
source runtests.sh $mode
source $runadmin localhost $bus1port --undo-script=${OPENBUS_CORE_TEST}/test.adm
source $runadmin localhost $bus2port --undo-script=${OPENBUS_CORE_TEST}/test.adm
$runadmin localhost $bus1port --undo-script=${OPENBUS_CORE_TEST}/test.adm
$runadmin localhost $bus2port --undo-script=${OPENBUS_CORE_TEST}/test.adm
cd ../interop
source $runadmin localhost $bus1port --script=script.adm
source $runadmin localhost $bus2port --script=script.adm
$runadmin localhost $bus1port --script=script.adm
$runadmin localhost $bus2port --script=script.adm
source runall.sh $mode
sleep 2 # wait for offers to expire
source $runadmin localhost $bus1port --undo-script=script.adm
source $runadmin localhost $bus2port --undo-script=script.adm
$runadmin localhost $bus1port --undo-script=script.adm
$runadmin localhost $bus2port --undo-script=script.adm
cd ../test
......@@ -2,11 +2,9 @@
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
busconsole="$busconsole DEBUG"
elif [[ "$mode" != "RELEASE" ]]; then
if [[ "$mode" != "DEBUG" && "$mode" != "RELEASE" ]]; then
echo "Usage: $0 <RELEASE|DEBUG> <args>"
exit 1
fi
......
......@@ -2,11 +2,9 @@
mode=$1
busconsole="${OPENBUS_SDKLUA_HOME}/bin/busconsole"
runconsole="source ${OPENBUS_SDKLUA_TEST}/runconsole.sh $mode"
if [[ "$mode" == "DEBUG" ]]; then
busconsole="$busconsole DEBUG"
elif [[ "$mode" != "RELEASE" ]]; then
if [[ "$mode" != "DEBUG" && "$mode" != "RELEASE" ]]; then
echo "Usage: $0 <RELEASE|DEBUG>"
exit 1
fi
......@@ -27,6 +25,6 @@ openbus/test/assistant/AssistantLoginLogout \
"
for case in $cases; do
echo -n "Test '${case}' ... "
$busconsole $case.lua ${@:2:${#@}} || exit $?
$runconsole $case.lua ${@:2:${#@}} || exit $?
echo "OK"
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