summaryrefslogtreecommitdiff
path: root/test/test.sh
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-05 14:41:46 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-05 14:41:46 -0400
commitcd74c4ec3bf8d0da228ae384b504f4c7dc152a36 (patch)
treeec4a8fe26db515c4c054f96df56c07cbd3623b33 /test/test.sh
parent21be3dff746f5cc86b9d0aa22b32c9f3d5a6d480 (diff)
downloadlibevent-cd74c4ec3bf8d0da228ae384b504f4c7dc152a36.tar.gz
More abstraction in test.sh
Diffstat (limited to 'test/test.sh')
-rwxr-xr-xtest/test.sh60
1 files changed, 20 insertions, 40 deletions
diff --git a/test/test.sh b/test/test.sh
index 08a4cddb..8ab4f656 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -65,6 +65,8 @@ run_tests () {
return
fi
+ $TEST_DIR/test-eof
+
announce_n " test-eof: "
if $TEST_DIR/test-eof >>"$TEST_OUTPUT_FILE" ;
then
@@ -114,49 +116,27 @@ run_tests () {
fi
}
+do_test() {
+ setup
+ announce "$1 $2"
+ unset EVENT_NO$1
+ if test "$2" = "(changelist)" ; then
+ EVENT_EPOLL_USE_CHANGELIST=yes; export EVENT_EPOLL_USE_CHANGELIST
+ fi
+ run_tests
+}
+
announce "Running tests:"
# Need to do this by hand?
-setup
-unset EVENT_NOEVPORT
-announce "EVPORT"
-run_tests
-
-setup
-unset EVENT_NOKQUEUE
-announce "KQUEUE"
-run_tests
-
-setup
-unset EVENT_NOEPOLL
-announce "EPOLL"
-run_tests
-
-setup
-unset EVENT_NOEPOLL
-EVENT_EPOLL_USE_CHANGELIST=yes; export EVENT_EPOLL_USE_CHANGELIST
-announce "EPOLL (changelist)"
-run_tests
-
-setup
-unset EVENT_NODEVPOLL
-announce "DEVPOLL"
-run_tests
-
-setup
-unset EVENT_NOPOLL
-announce "POLL"
-run_tests
-
-setup
-unset EVENT_NOSELECT
-announce "SELECT"
-run_tests
-
-setup
-unset EVENT_NOWIN32
-announce "WIN32"
-run_tests
+do_test EVPORT
+do_test KQUEUE
+do_test EPOLL
+do_test EPOLL "(changelist)"
+do_test DEVPOLL
+do_test POLL
+do_test SELECT
+do_test WIN32
if test "$FAILED" = "yes"; then
exit 1