2
0

run-tests.sh 639 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # "print_tests" returns relative paths to all the tests
  3. TESTS=$(make -s -C ../.. print_tests)
  4. echo "-----------------------------------------------------------------";
  5. echo "Starting tests";
  6. echo "Tests found: ${TESTS}";
  7. echo "-----------------------------------------------------------------";
  8. echo "Starting" > pids.txt
  9. for i in $TESTS
  10. do
  11. echo "Testing $i" ;
  12. ./test.sh "$i" &
  13. pid=($!)
  14. pids+=($pid)
  15. echo "$pid $i" >> pids.txt
  16. echo "----------------" ;
  17. done
  18. for pid in "${pids[@]}"
  19. do
  20. echo "$pid waiting" >> pids.txt
  21. wait "$pid"
  22. echo "$pid finished" >> pids.txt
  23. done
  24. echo "Done running tests!"