diff options
author | Vegard Sjonfjell <vegardsjo@gmail.com> | 2016-06-28 13:20:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-28 13:20:00 +0200 |
commit | 7824d2b515cba557c9c4028591ede0b4b9256b77 (patch) | |
tree | 888581b502ba64706658ead749492708927d1b8a /jrt_test | |
parent | 3962f601fa92e8aba19e3efc230840b9f4f5a5a7 (diff) |
Fail test scripts on first error (#194)
* Fail test scripts on first error
* Some more test fixes
* Reverted prod_features_test fix
* Re-added prod_features_test.sh change matching that of PR #193
* More error checking
* Reverted set -e on failing tests
* Enable errexit in lowercasing test
Diffstat (limited to 'jrt_test')
-rw-r--r-- | jrt_test/src/tests/echo/dotest.sh | 3 | ||||
-rwxr-xr-x | jrt_test/src/tests/echo/echo_test.sh | 4 | ||||
-rw-r--r-- | jrt_test/src/tests/echo/progdefs.sh | 2 | ||||
-rw-r--r-- | jrt_test/src/tests/mandatory-methods/dotest.sh | 3 | ||||
-rwxr-xr-x | jrt_test/src/tests/mandatory-methods/mandatory-methods_test.sh | 5 | ||||
-rw-r--r-- | jrt_test/src/tests/mandatory-methods/progdefs.sh | 2 | ||||
-rw-r--r-- | jrt_test/src/tests/mockup-invoke/dotest.sh | 3 | ||||
-rwxr-xr-x | jrt_test/src/tests/mockup-invoke/mockup-invoke_test.sh | 4 | ||||
-rw-r--r-- | jrt_test/src/tests/mockup-invoke/progdefs.sh | 2 | ||||
-rw-r--r-- | jrt_test/src/tests/rpc-error/dotest.sh | 3 | ||||
-rw-r--r-- | jrt_test/src/tests/rpc-error/progdefs.sh | 2 | ||||
-rwxr-xr-x | jrt_test/src/tests/rpc-error/rpc-error_test.sh | 7 | ||||
-rwxr-xr-x | jrt_test/src/tests/slobrok-api/dotest.sh | 3 | ||||
-rw-r--r-- | jrt_test/src/tests/slobrok-api/progdefs.sh | 2 |
14 files changed, 29 insertions, 16 deletions
diff --git a/jrt_test/src/tests/echo/dotest.sh b/jrt_test/src/tests/echo/dotest.sh index a01bf1e06ef..a4b9cc4d313 100644 --- a/jrt_test/src/tests/echo/dotest.sh +++ b/jrt_test/src/tests/echo/dotest.sh @@ -1,5 +1,6 @@ -#!/bin/sh +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e . ../../binref/env.sh export PORT_2 diff --git a/jrt_test/src/tests/echo/echo_test.sh b/jrt_test/src/tests/echo/echo_test.sh index df6d98eaaf1..8b68357e606 100755 --- a/jrt_test/src/tests/echo/echo_test.sh +++ b/jrt_test/src/tests/echo/echo_test.sh @@ -1,5 +1,5 @@ #!/bin/bash set -e . ../../binref/env.sh -sh dotest.sh || (sh $BINREF/progctl.sh progdefs.sh stop all; false) -sh $BINREF/progctl.sh progdefs.sh stop all +bash -e dotest.sh || (bash -e $BINREF/progctl.sh progdefs.sh stop all; false) +bash -e $BINREF/progctl.sh progdefs.sh stop all diff --git a/jrt_test/src/tests/echo/progdefs.sh b/jrt_test/src/tests/echo/progdefs.sh index 4a3053ad64e..d405f525e33 100644 --- a/jrt_test/src/tests/echo/progdefs.sh +++ b/jrt_test/src/tests/echo/progdefs.sh @@ -1,2 +1,4 @@ +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e prog javaserver 1 "tcp/$PORT_2" "$BINREF/runjava SimpleServer" diff --git a/jrt_test/src/tests/mandatory-methods/dotest.sh b/jrt_test/src/tests/mandatory-methods/dotest.sh index 25560a6210d..6c7dfb2bbea 100644 --- a/jrt_test/src/tests/mandatory-methods/dotest.sh +++ b/jrt_test/src/tests/mandatory-methods/dotest.sh @@ -1,5 +1,6 @@ -#!/bin/sh +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e sh $BINREF/progctl.sh progdefs.sh start javaserver 1 diff --git a/jrt_test/src/tests/mandatory-methods/mandatory-methods_test.sh b/jrt_test/src/tests/mandatory-methods/mandatory-methods_test.sh index 3088682ef91..81eb00776c8 100755 --- a/jrt_test/src/tests/mandatory-methods/mandatory-methods_test.sh +++ b/jrt_test/src/tests/mandatory-methods/mandatory-methods_test.sh @@ -6,6 +6,5 @@ export PORT_1 $BINREF/compilejava RPCServer.java -sh dotest.sh || (sh $BINREF/progctl.sh progdefs.sh stop all; false) -sh $BINREF/progctl.sh progdefs.sh stop all - +bash -e dotest.sh || (bash -e $BINREF/progctl.sh progdefs.sh stop all; false) +bash -e $BINREF/progctl.sh progdefs.sh stop all diff --git a/jrt_test/src/tests/mandatory-methods/progdefs.sh b/jrt_test/src/tests/mandatory-methods/progdefs.sh index aa7ae4ab3ca..a376f7585ab 100644 --- a/jrt_test/src/tests/mandatory-methods/progdefs.sh +++ b/jrt_test/src/tests/mandatory-methods/progdefs.sh @@ -1,2 +1,4 @@ +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e prog javaserver 1 "tcp/$PORT_1" "$BINREF/runjava RPCServer" diff --git a/jrt_test/src/tests/mockup-invoke/dotest.sh b/jrt_test/src/tests/mockup-invoke/dotest.sh index 3bd15b6437f..fcbdc16f92e 100644 --- a/jrt_test/src/tests/mockup-invoke/dotest.sh +++ b/jrt_test/src/tests/mockup-invoke/dotest.sh @@ -1,5 +1,6 @@ -#!/bin/sh +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e sh $BINREF/progctl.sh progdefs.sh start server 1 diff --git a/jrt_test/src/tests/mockup-invoke/mockup-invoke_test.sh b/jrt_test/src/tests/mockup-invoke/mockup-invoke_test.sh index d5ac8535393..84343a7a60b 100755 --- a/jrt_test/src/tests/mockup-invoke/mockup-invoke_test.sh +++ b/jrt_test/src/tests/mockup-invoke/mockup-invoke_test.sh @@ -7,5 +7,5 @@ export PORT_0 $BINREF/compilejava MockupInvoke.java -sh dotest.sh || (sh $BINREF/progctl.sh progdefs.sh stop all; false) -sh $BINREF/progctl.sh progdefs.sh stop all +bash -e dotest.sh || (bash -e $BINREF/progctl.sh progdefs.sh stop all; false) +bash -e $BINREF/progctl.sh progdefs.sh stop all diff --git a/jrt_test/src/tests/mockup-invoke/progdefs.sh b/jrt_test/src/tests/mockup-invoke/progdefs.sh index 4c483b8060b..6898513badc 100644 --- a/jrt_test/src/tests/mockup-invoke/progdefs.sh +++ b/jrt_test/src/tests/mockup-invoke/progdefs.sh @@ -1,2 +1,4 @@ +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e prog server 1 "tcp/$PORT_0" "./jrt_test_mockup-server_app" diff --git a/jrt_test/src/tests/rpc-error/dotest.sh b/jrt_test/src/tests/rpc-error/dotest.sh index 2e37525857f..58f74247536 100644 --- a/jrt_test/src/tests/rpc-error/dotest.sh +++ b/jrt_test/src/tests/rpc-error/dotest.sh @@ -1,5 +1,6 @@ -#!/bin/sh +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e . ../../binref/env.sh diff --git a/jrt_test/src/tests/rpc-error/progdefs.sh b/jrt_test/src/tests/rpc-error/progdefs.sh index 815aa5a960e..cd915602b9e 100644 --- a/jrt_test/src/tests/rpc-error/progdefs.sh +++ b/jrt_test/src/tests/rpc-error/progdefs.sh @@ -1,3 +1,5 @@ +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e prog cppserver 1 "tcp/$CPP_PORT" "$BINREF/simpleserver" prog javaserver 1 "tcp/$JAVA_PORT" "$BINREF/runjava SimpleServer" diff --git a/jrt_test/src/tests/rpc-error/rpc-error_test.sh b/jrt_test/src/tests/rpc-error/rpc-error_test.sh index a5ef9ac5b3e..c9f47cf10fa 100755 --- a/jrt_test/src/tests/rpc-error/rpc-error_test.sh +++ b/jrt_test/src/tests/rpc-error/rpc-error_test.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e . ../../binref/env.sh @@ -12,6 +12,5 @@ export CPP_PORT $BINREF/compilejava TestErrors.java -sh dotest.sh || (sh $BINREF/progctl.sh progdefs.sh stop all; false) -sh $BINREF/progctl.sh progdefs.sh stop all - +bash -e dotest.sh || (bash -e $BINREF/progctl.sh progdefs.sh stop all; false) +bash -e $BINREF/progctl.sh progdefs.sh stop all diff --git a/jrt_test/src/tests/slobrok-api/dotest.sh b/jrt_test/src/tests/slobrok-api/dotest.sh index 4a221e5830c..23fcc88edc5 100755 --- a/jrt_test/src/tests/slobrok-api/dotest.sh +++ b/jrt_test/src/tests/slobrok-api/dotest.sh @@ -1,5 +1,6 @@ -#!/bin/sh +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e . ../../binref/env.sh diff --git a/jrt_test/src/tests/slobrok-api/progdefs.sh b/jrt_test/src/tests/slobrok-api/progdefs.sh index af694ab8ad4..52db8009183 100644 --- a/jrt_test/src/tests/slobrok-api/progdefs.sh +++ b/jrt_test/src/tests/slobrok-api/progdefs.sh @@ -1,2 +1,4 @@ +#!/bin/bash # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +set -e prog slobrok 1 "-p $PORT_8" |