qa: introduce runners and more tests for newlib
For each test, if a script exists with the same name of the test plus the .runner suffix, the runner is run instead of the test. As a first example qa/lib/newlib/testsuite/atexit is run by qa/lib/newlib/testsuite/atexit.runner. These .runner scripts allow more complex checks of the side effects generated by the test.
This commit is contained in:
18
qa/lib/newlib/100-files.runner
Normal file
18
qa/lib/newlib/100-files.runner
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/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 > /dev/null
|
||||
if ( cat $test_output | grep 'fprintf works.' > /dev/null ) {
|
||||
if ( cat $test_output | grep 'fputs works.' > /dev/null ) {
|
||||
rm $test_output
|
||||
echo PASS
|
||||
exit PASS
|
||||
}
|
||||
}
|
||||
cat $test_output
|
||||
echo FAIL
|
||||
exit FAIL
|
Reference in New Issue
Block a user