1
0

awake_note1.runner 370 B

1234567891011121314151617181920212223
  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 &
  7. testpid=$APID
  8. sleep 1
  9. echo hi > /proc/$testpid/note
  10. wait $testpid
  11. if ( cat $test_output | grep 'PASS' > /dev/null ) {
  12. rm $test_output
  13. echo PASS
  14. exit PASS
  15. }
  16. cat $test_output
  17. echo FAIL
  18. exit FAIL