sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

runtests.sh (312B)


      1 #!/bin/sh
      2 
      3 export TZ=UTC
      4 
      5 cleanup()
      6 {
      7 	st=$?
      8 	rm -f test.res
      9 	exit $st
     10 }
     11 
     12 trap cleanup EXIT HUP INT TERM
     13 
     14 for i in *-*.sh
     15 do
     16 	printf "Test: %s\n\n" $i >> test.log
     17 	(./$i >> test.log 2>&1 && printf '[PASS]\t' || printf '[FAIL]\t'
     18 	echo "$i") | tee -a test.log
     19 done |
     20 tee test.res
     21 
     22 ! grep FAIL test.res >/dev/null