summaryrefslogtreecommitdiffstats
path: root/jrt_test/src/tests/mandatory-methods/dotest.sh
diff options
context:
space:
mode:
authorArne H Juul <arnej27959@users.noreply.github.com>2016-06-28 15:42:27 +0200
committerVegard Sjonfjell <vegardsjo@gmail.com>2016-06-28 15:42:27 +0200
commit3011b26395cf1814e0258937ef343b7d03a0b1fc (patch)
treeb429fc1ecee36470f40fe3908653684b8cf01e01 /jrt_test/src/tests/mandatory-methods/dotest.sh
parent47d97e4dd7c9fdde0d7170e4ae9a1bfe04349286 (diff)
Arnej/cleanup errexit usage 2 (#248)
* not a script that can use "set -e" * run tests in correct order * fix usage of progctl.sh * should not use "set -e" in progdefs.sh * simpler programming to check for failures explicitly
Diffstat (limited to 'jrt_test/src/tests/mandatory-methods/dotest.sh')
-rw-r--r--jrt_test/src/tests/mandatory-methods/dotest.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/jrt_test/src/tests/mandatory-methods/dotest.sh b/jrt_test/src/tests/mandatory-methods/dotest.sh
index 6c7dfb2bbea..8cbd99c6988 100644
--- a/jrt_test/src/tests/mandatory-methods/dotest.sh
+++ b/jrt_test/src/tests/mandatory-methods/dotest.sh
@@ -1,15 +1,16 @@
#!/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
+fail=0
-./jrt_test_extract-reflection_app tcp/localhost:$PORT_1 verbose > out.txt
+$BINREF/progctl.sh progdefs.sh start javaserver 1 || fail=1
-sh $BINREF/progctl.sh progdefs.sh stop javaserver 1
+./jrt_test_extract-reflection_app tcp/localhost:$PORT_1 verbose > out.txt || fail=1
+
+$BINREF/progctl.sh progdefs.sh stop javaserver 1 || fail=1
if diff -u out.txt ref.txt; then
- exit 0
+ exit $fail
else
exit 1
fi