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:
@@ -1,12 +0,0 @@
|
||||
#!/cmd/rc
|
||||
|
||||
if ( cat /tmp/qa.previous.log | grep a0cba > /dev/null ) {
|
||||
rm /tmp/qa.previous.log
|
||||
echo PASS
|
||||
exit PASS
|
||||
}
|
||||
if not {
|
||||
echo FAIL
|
||||
cat /tmp/qa.previous.log
|
||||
exit FAIL
|
||||
}
|
18
qa/lib/newlib/testsuite/atexit.runner
Normal file
18
qa/lib/newlib/testsuite/atexit.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
|
||||
if ( cat $test_output | grep a0cba > /dev/null ) {
|
||||
rm $test_output
|
||||
echo PASS
|
||||
exit PASS
|
||||
}
|
||||
if not {
|
||||
cat $test_output
|
||||
echo FAIL
|
||||
exit FAIL
|
||||
}
|
@@ -24,7 +24,7 @@
|
||||
"Post": [
|
||||
"mkdir -p $JEHANNE/arch/$ARCH/qa/lib/newlib/testsuite",
|
||||
"find -type f -perm /a+x -exec cp {} $JEHANNE/arch/$ARCH/qa/lib/newlib/testsuite/ \\;",
|
||||
"cp *.check $JEHANNE/arch/$ARCH/qa/lib/newlib/testsuite/",
|
||||
"cp *.runner $JEHANNE/arch/$ARCH/qa/lib/newlib/testsuite/",
|
||||
"git clean -xdf ."
|
||||
],
|
||||
"Pre": [
|
||||
|
Reference in New Issue
Block a user