summaryrefslogtreecommitdiff
path: root/test/test.sh
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-05-26 13:31:41 -0400
committerNick Mathewson <nickm@torproject.org>2010-05-26 13:43:01 -0400
commitfaf2a04fa5e4c44a356d635502cc7e2dbead34d3 (patch)
tree25104119752944273569a5812661b1ab7828855d /test/test.sh
parent8bc1e3d6d109c4f72b2c3962e721c0b9399fb855 (diff)
downloadlibevent-faf2a04fa5e4c44a356d635502cc7e2dbead34d3.tar.gz
Make test.sh exit with nonzero status if tests fail
This behavior makes "make verify" actually fail when the tests fail, which is what it's supposed to do.
Diffstat (limited to 'test/test.sh')
-rwxr-xr-xtest/test.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test.sh b/test/test.sh
index e132fc38..5b6b5378 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+FAILED=no
+
if test "x$TEST_OUTPUT_FILE" = "x"
then
TEST_OUTPUT_FILE=/dev/null
@@ -62,6 +64,7 @@ run_tests () {
announce OKAY ;
else
announce FAILED ;
+ FAILED=yes
fi
announce_n " test-weof: "
if $TEST_DIR/test-weof >>"$TEST_OUTPUT_FILE" ;
@@ -69,6 +72,7 @@ run_tests () {
announce OKAY ;
else
announce FAILED ;
+ FAILED=yes
fi
announce_n " test-time: "
if $TEST_DIR/test-time >>"$TEST_OUTPUT_FILE" ;
@@ -76,6 +80,7 @@ run_tests () {
announce OKAY ;
else
announce FAILED ;
+ FAILED=yes
fi
announce_n " regress: "
if $TEST_DIR/regress >>"$TEST_OUTPUT_FILE" ;
@@ -83,6 +88,7 @@ run_tests () {
announce OKAY ;
else
announce FAILED ;
+ FAILED=yes
fi
}
@@ -123,3 +129,7 @@ setup
unset EVENT_NOWIN32
announce "WIN32"
run_tests
+
+if test "$FAILED" = "yes"; then
+ exit 1
+fi