diff options
Diffstat (limited to 'jrt_test/src/tests/rpc-error/dotest.sh')
-rw-r--r-- | jrt_test/src/tests/rpc-error/dotest.sh | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/jrt_test/src/tests/rpc-error/dotest.sh b/jrt_test/src/tests/rpc-error/dotest.sh index 58f74247536..df9cb4ac62a 100644 --- a/jrt_test/src/tests/rpc-error/dotest.sh +++ b/jrt_test/src/tests/rpc-error/dotest.sh @@ -1,6 +1,7 @@ #!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -set -e + +fail=0 . ../../binref/env.sh @@ -11,36 +12,30 @@ CPP_PORT=$PORT_4 export JAVA_PORT export CPP_PORT -sh $BINREF/progctl.sh progdefs.sh start cppserver 1 +$BINREF/progctl.sh progdefs.sh start cppserver 1 || fail=1 +$BINREF/runjava PollRPCServer tcp/localhost:$CPP_PORT || fail=1 -$BINREF/runjava PollRPCServer tcp/localhost:$CPP_PORT echo "CPP CLIENT <-> CPP SERVER" -./jrt_test_test-errors_app tcp/localhost:$CPP_PORT -if [ $? -ne 0 ]; then STATUS=fail; fi +./jrt_test_test-errors_app tcp/localhost:$CPP_PORT || fail=1 echo "JAVA CLIENT <-> CPP SERVER" -$BINREF/runjava TestErrors tcp/localhost:$CPP_PORT -if [ $? -ne 0 ]; then STATUS=fail; fi - -sh $BINREF/progctl.sh progdefs.sh stop cppserver 1 - +$BINREF/runjava TestErrors tcp/localhost:$CPP_PORT || fail=1 -sh $BINREF/progctl.sh progdefs.sh start javaserver 1 +$BINREF/progctl.sh progdefs.sh stop cppserver 1 +$BINREF/progctl.sh progdefs.sh start javaserver 1 +$BINREF/runjava PollRPCServer tcp/localhost:$JAVA_PORT || fail=1 -$BINREF/runjava PollRPCServer tcp/localhost:$JAVA_PORT echo "CPP CLIENT <-> JAVA SERVER" -./jrt_test_test-errors_app tcp/localhost:$JAVA_PORT -if [ $? -ne 0 ]; then STATUS=fail; fi +./jrt_test_test-errors_app tcp/localhost:$JAVA_PORT || fail=1 echo "JAVA CLIENT <-> JAVA SERVER" -$BINREF/runjava TestErrors tcp/localhost:$JAVA_PORT -if [ $? -ne 0 ]; then STATUS=fail; fi +$BINREF/runjava TestErrors tcp/localhost:$JAVA_PORT || fail=1 -sh $BINREF/progctl.sh progdefs.sh stop javaserver 1 +$BINREF/progctl.sh progdefs.sh stop javaserver 1 -if [ $STATUS = "ok" ]; then +if [ $fail = "0" ]; then echo "OK" else echo "FAIL" - exit 1 fi +exit $fail |