qa/check: allow tests to SKIP themselves

This commit is contained in:
Giacomo Tesio 2017-08-31 00:29:52 +02:00
parent 60d71d421d
commit 6fd5c75ab3
1 changed files with 8 additions and 2 deletions

View File

@ -18,10 +18,16 @@ for(t in $l){
echo -n $t:
$t > /tmp/qa.log >[2=1]
st = $status
if(~ `{echo $st|field 3} PASS) {
switch( `{echo $st|field 3} ){
case PASS
rm /tmp/qa.log && echo PASS
}
if not { echo $st && cat /tmp/qa.log; exit $st}
case SKIP
echo -n ' SKIP: ' && cat /tmp/qa.log && rm /tmp/qa.log
case FAIL
echo $st && cat /tmp/qa.log; exit $st
case *
echo Unexpected test result: $st && cat /tmp/qa.log; exit $st
}
}
}
}