jehanne/qa/check

34 lines
561 B
Bash
Executable File

#!/cmd/rc
rfork
dir=$1
if(~ $dir '') dir=/qa
l = `{du -a /arch/$objtype/$dir|awk '{print $2}'|sort}
failed = ()
runner=.runner
for(t in $l){
if(test -x $t) {
if( test -x $t$runner ) { }
if not {
echo -n $t:
$t > /tmp/qa.log >[2=1]
st = $status
switch( `{echo $st|field 3} ){
case PASS
rm /tmp/qa.log && echo PASS
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
}
}
}
}