broken.runner 352 B

123456789101112131415161718192021222324
  1. #!/cmd/rc
  2. runner=$0
  3. test = `{echo $runner|sed 's/.runner//'}
  4. test_output = /tmp/output-`{basename $test}
  5. if ( test -e $test_output) rm $test_output
  6. $test > $test_output >[2=1] &
  7. testpid=$APID
  8. wait $testpid
  9. sleep 5
  10. if ( cat $test_output | grep suicide > /dev/null ) {
  11. rm $test_output
  12. echo PASS
  13. exit PASS
  14. }
  15. cat $test_output
  16. echo FAIL
  17. exit FAIL