runall 473 B

123456789101112131415161718
  1. #!/bin/rc
  2. # Script to run all tests in 'tests'. If any test fails, this script fails.
  3. # Skip folders or files beginning in '_'
  4. tests=`{du -a /bin/regress | awk '{print $2}' | grep -v /_}
  5. finalstatus=PASS
  6. for (file in $tests) {
  7. if (test -f $file && test -x $file) {
  8. $file >[2=1] >/dev/null
  9. teststatus = $status
  10. if (! ~ $teststatus '') { echo FAIL $file $teststatus }
  11. if not { echo PASS $file; finalstatus=FAIL }
  12. }
  13. }
  14. if (~ $finalstatus FAIL) exit $finalstatus