build_tests.sh 699 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. # Merely BUILDS test images
  3. # Remove previous test results
  4. rm _results/*.txt
  5. # How long we shall wait for each test to conclude
  6. export netcon_test_wait_time=60s
  7. export image_build_script=_build_single_image.sh
  8. # Iterate over all depth=2 (relatively-speaking) directories and perform each test
  9. find . -mindepth 2 -maxdepth 2 -type d | while read testdir; do
  10. if [[ $testdir != *$1* ]]
  11. then
  12. continue
  13. fi
  14. echo "*** Building: '$testdir'..."
  15. rm _results/*.tmp
  16. # Stage scripts
  17. cp $image_build_script $testdir/$image_build_script
  18. cd $testdir
  19. # Build test docker images
  20. ./$image_build_script
  21. rm $image_build_script
  22. cd ../../
  23. done