1#!/bin/sh 2 3setup () { 4 EVENT_NOKQUEUE=yes; export EVENT_NOKQUEUE 5 EVENT_NODEVPOLL=yes; export EVENT_NODEVPOLL 6 EVENT_NOPOLL=yes; export EVENT_NOPOLL 7 EVENT_NOSELECT=yes; export EVENT_NOSELECT 8 EVENT_NOEPOLL=yes; export EVENT_NOEPOLL 9 EVENT_NOEVPORT=yes; export EVENT_NOEVPORT 10} 11 12test () { 13 if ./test-init 2>/dev/null ; 14 then 15 true 16 else 17 echo Skipping test 18 return 19 fi 20 21echo -n " test-eof: " 22if ./test-eof >/dev/null ; 23then 24 echo OKAY ; 25else 26 echo FAILED ; 27fi 28echo -n " test-weof: " 29if ./test-weof >/dev/null ; 30then 31 echo OKAY ; 32else 33 echo FAILED ; 34fi 35echo -n " test-time: " 36if ./test-time >/dev/null ; 37then 38 echo OKAY ; 39else 40 echo FAILED ; 41fi 42echo -n " regress: " 43if ./regress >/dev/null ; 44then 45 echo OKAY ; 46else 47 echo FAILED ; 48fi 49} 50 51echo "Running tests:" 52 53# Need to do this by hand? 54setup 55unset EVENT_NOKQUEUE 56export EVENT_NOKQUEUE 57echo "KQUEUE" 58test 59 60setup 61unset EVENT_NODEVPOLL 62export EVENT_NODEVPOLL 63echo "DEVPOLL" 64test 65 66setup 67unset EVENT_NOPOLL 68export EVENT_NOPOLL 69echo "POLL" 70test 71 72setup 73unset EVENT_NOSELECT 74export EVENT_NOSELECT 75echo "SELECT" 76test 77 78setup 79unset EVENT_NOEPOLL 80export EVENT_NOEPOLL 81echo "EPOLL" 82test 83 84setup 85unset EVENT_NOEVPORT 86export EVENT_NOEVPORT 87echo "EVPORT" 88test 89 90 91 92