libevent/test/test.sh

92 lines
1.2 KiB
Bash
Raw Normal View History

2003-09-25 17:55:17 +00:00
#!/bin/sh
2003-10-05 22:02:49 +00:00
setup () {
EVENT_NOKQUEUE=yes; export EVENT_NOKQUEUE
EVENT_NODEVPOLL=yes; export EVENT_NODEVPOLL
EVENT_NOPOLL=yes; export EVENT_NOPOLL
EVENT_NOSELECT=yes; export EVENT_NOSELECT
EVENT_NOEPOLL=yes; export EVENT_NOEPOLL
EVENT_NOEVPORT=yes; export EVENT_NOEVPORT
2003-09-25 17:55:17 +00:00
}
2003-10-05 22:02:49 +00:00
test () {
if ./test-init 2>/dev/null ;
2003-09-25 17:55:17 +00:00
then
true
else
2003-09-25 17:55:17 +00:00
echo Skipping test
return
fi
echo -n " test-eof: "
if ./test-eof >/dev/null ;
then
echo OKAY ;
else
echo FAILED ;
fi
echo -n " test-weof: "
if ./test-weof >/dev/null ;
then
echo OKAY ;
else
echo FAILED ;
fi
echo -n " test-time: "
if ./test-time >/dev/null ;
then
echo OKAY ;
else
echo FAILED ;
fi
echo -n " regress: "
if ./regress >/dev/null ;
then
echo OKAY ;
else
echo FAILED ;
fi
}
echo "Running tests:"
# Need to do this by hand?
setup
unset EVENT_NOKQUEUE
export EVENT_NOKQUEUE
2003-09-25 17:55:17 +00:00
echo "KQUEUE"
test
2004-07-30 04:57:21 +00:00
setup
unset EVENT_NODEVPOLL
export EVENT_NODEVPOLL
2004-07-30 04:57:21 +00:00
echo "DEVPOLL"
test
2003-09-25 17:55:17 +00:00
setup
unset EVENT_NOPOLL
export EVENT_NOPOLL
2003-09-25 17:55:17 +00:00
echo "POLL"
test
setup
unset EVENT_NOSELECT
export EVENT_NOSELECT
2003-09-25 17:55:17 +00:00
echo "SELECT"
test
setup
unset EVENT_NOEPOLL
export EVENT_NOEPOLL
2003-09-25 17:55:17 +00:00
echo "EPOLL"
test
setup
unset EVENT_NOEVPORT
export EVENT_NOEVPORT
echo "EVPORT"
test
2003-09-25 17:55:17 +00:00