runbenchs 757 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/rc
  2. echo benchs...
  3. cd /sys/src/nix/bench
  4. . tools
  5. failed=()
  6. benchs=`{ls -d [0-9]* | sort -n}
  7. if(test -e k[0-9]*)
  8. benchs=($benchs k[0-9]*)
  9. for(t in $benchs){
  10. cd $t || fail cannot cd into benchs $t
  11. if(test -e FAIL)
  12. failed=($failed $t)
  13. if not{
  14. if(! test -e output && ! test -e FAIL) {
  15. echo running bench $t
  16. if(test -x kern && ! test -e koutput){
  17. echo running kern for bench $t
  18. if(! kern >koutput >[2=1]){
  19. touch FAIL
  20. fail bench $t failed
  21. }
  22. reboot
  23. }
  24. if(test -x kern)
  25. cp /dev/kmesg KMESG
  26. if(! runbench>output >[2=1]){
  27. touch FAIL
  28. fail bench $t failed
  29. }
  30. echo bench $t ok
  31. }
  32. }
  33. cd ..
  34. }
  35. if(! ~ $#failed 0)
  36. echo benchs $failed failed
  37. if not
  38. echo all benchs done
  39. rm /cfg/$sysname/runbenchs