qa: simple infrastructure to test output expectations
This commit is contained in:
parent
7ab8fecd80
commit
5c8200b9da
6
qa/check
6
qa/check
|
@ -9,13 +9,17 @@ if(~ $dir '') dir=/qa
|
||||||
l = `{du -a /arch/$objtype/$dir|awk '{print $2}'|sort}
|
l = `{du -a /arch/$objtype/$dir|awk '{print $2}'|sort}
|
||||||
|
|
||||||
failed = ()
|
failed = ()
|
||||||
|
ce=.check
|
||||||
|
|
||||||
for(t in $l){
|
for(t in $l){
|
||||||
if(test -x $t) {
|
if(test -x $t) {
|
||||||
echo -n $t:
|
echo -n $t:
|
||||||
$t > /tmp/qa.log >[2=1]
|
$t > /tmp/qa.log >[2=1]
|
||||||
st = $status
|
st = $status
|
||||||
if(~ `{echo $st|field 3} PASS) { rm /tmp/qa.log && echo PASS }
|
if(~ `{echo $st|field 3} PASS) {
|
||||||
|
if( test -x $t$ce ) { cp /tmp/qa.log /tmp/qa.previous.log }
|
||||||
|
rm /tmp/qa.log && echo PASS
|
||||||
|
}
|
||||||
if not { echo $st && cat /tmp/qa.log; exit $st}
|
if not { echo $st && cat /tmp/qa.log; exit $st}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/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
|
||||||
|
}
|
|
@ -24,6 +24,7 @@
|
||||||
"Post": [
|
"Post": [
|
||||||
"mkdir -p $JEHANNE/arch/$ARCH/qa/lib/newlib/testsuite",
|
"mkdir -p $JEHANNE/arch/$ARCH/qa/lib/newlib/testsuite",
|
||||||
"find -type f -perm /a+x -exec cp {} $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/",
|
||||||
"git clean -xdf ."
|
"git clean -xdf ."
|
||||||
],
|
],
|
||||||
"Pre": [
|
"Pre": [
|
||||||
|
|
Loading…
Reference in New Issue