24 lines
370 B
Plaintext
24 lines
370 B
Plaintext
|
#!/cmd/rc
|
||
|
|
||
|
runner=$0
|
||
|
test = `{echo $runner|sed 's/.runner//'}
|
||
|
test_output = /tmp/output-`{basename $test}
|
||
|
|
||
|
if ( test -e $test_output) rm $test_output
|
||
|
|
||
|
$test $test_output &
|
||
|
testpid=$apid
|
||
|
sleep 1
|
||
|
echo hi > /proc/$testpid/note
|
||
|
|
||
|
wait $testpid
|
||
|
|
||
|
if ( cat $test_output | grep 'PASS' > /dev/null ) {
|
||
|
rm $test_output
|
||
|
echo PASS
|
||
|
exit PASS
|
||
|
}
|
||
|
cat $test_output
|
||
|
echo FAIL
|
||
|
exit FAIL
|