1
0

check 681 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/cmd/rc
  2. rfork
  3. if( ! test -d /dev/posix ){
  4. sys/posixly -d /tmp/qa-posixly.log -p $PID &
  5. # sys/ctrace -o /tmp/posixly.trace $APID &
  6. }
  7. dir=$1
  8. if(~ $dir '') dir=/qa
  9. l = `{du -a /arch/$OBJTYPE/$dir|awk '{print $2}'|sort}
  10. failed = ()
  11. runner=.runner
  12. for(t in $l){
  13. if(test -x $t) {
  14. if( test -x $t$runner ) { }
  15. if not {
  16. echo -n $t:
  17. $t > /tmp/qa.log >[2=1]
  18. st = $STATUS
  19. switch( `{echo $st|field 3} ){
  20. case PASS
  21. rm /tmp/qa.log && echo PASS
  22. case SKIP
  23. echo -n ' SKIP: ' && cat /tmp/qa.log && rm /tmp/qa.log
  24. case FAIL
  25. echo $st && cat /tmp/qa.log; exit $st
  26. case *
  27. echo Unexpected test result: $st && cat /tmp/qa.log; exit $st
  28. }
  29. }
  30. }
  31. }