2017-05-07 19:32:55 +02:00
|
|
|
#!/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 &
|
2017-10-20 02:05:13 +02:00
|
|
|
testpid=$APID
|
2017-05-07 19:32:55 +02:00
|
|
|
sleep 5
|
|
|
|
|
|
|
|
if ( cat $test_output | grep 'PASS' > /dev/null ) {
|
|
|
|
cat $test_output
|
|
|
|
echo FAIL
|
|
|
|
exit FAIL
|
|
|
|
}
|
|
|
|
|
|
|
|
echo start > /proc/$testpid/ctl
|
|
|
|
wait $testpid
|
|
|
|
|
|
|
|
if ( cat $test_output | grep 'PASS' > /dev/null ) {
|
|
|
|
rm $test_output
|
|
|
|
echo PASS
|
|
|
|
exit PASS
|
|
|
|
}
|
|
|
|
cat $test_output
|
|
|
|
echo FAIL
|
|
|
|
exit FAIL
|