diff options
author | Michael Adam <obnox@samba.org> | 2010-02-23 00:18:29 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2010-02-23 00:18:29 +0100 |
commit | 3f1632603c2460efd6f9443d9307c6e9767363e4 (patch) | |
tree | 1a2d235f3fb3640bc9bc423a0be38a5aaff4b990 /tests/scripts | |
parent | 7c155634304da03b8ffded928757db1d89d8d8c2 (diff) | |
download | tinyproxy-3f1632603c2460efd6f9443d9307c6e9767363e4.tar.gz tinyproxy-3f1632603c2460efd6f9443d9307c6e9767363e4.zip |
tests: fix bug #80: keep track of errors in return codes
Michael
Diffstat (limited to '')
-rwxr-xr-x | tests/scripts/run_tests.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index 7bfda0e..b2cfc73 100755 --- a/tests/scripts/run_tests.sh +++ b/tests/scripts/run_tests.sh @@ -163,8 +163,9 @@ run_basic_webclient_request() { echo "webclient output:" cat $WEBCLIENT_LOG fi -} + return $WEBCLIENT_EXIT_CODE +} # "main" @@ -177,14 +178,21 @@ start_tinyproxy wait_for_some_seconds 3 +FAILED=0 + echo -n "checking direct connection to web server..." run_basic_webclient_request "$WEBSERVER_IP:$WEBSERVER_PORT" / +test "x$?" = "x0" || FAILED=$((FAILED + 1)) echo -n "testing connection through tinyproxy..." run_basic_webclient_request "$TINYPROXY_IP:$TINYPROXY_PORT" "http://$WEBSERVER_IP:$WEBSERVER_PORT/" +test "x$?" = "x0" || FAILED=$((FAILED + 1)) echo -n "requesting statspage via stathost url..." run_basic_webclient_request "$TINYPROXY_IP:$TINYPROXY_PORT" "http://$TINYPROXY_STATHOST_IP" +test "x$?" = "x0" || FAILED=$((FAILED + 1)) + +echo "$FAILED errors" if test "x$TINYPROXY_TESTS_WAIT" = "xyes"; then echo "You can continue using the webserver and tinyproxy." @@ -197,4 +205,4 @@ stop_webserver echo "done" -exit 0 +exit $FAILED |