test_linux.sh 722 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # This script can be called from any path, as long as the first argument sais where this script is located.
  3. TEST_FOLDER=`dirname "$(realpath $0)"`
  4. echo TEST_FOLDER = "${TEST_FOLDER}"
  5. PROJECT_BUILD_SCRIPT="${TEST_FOLDER}/../tools/builder/buildProject.sh"
  6. echo PROJECT_BUILD_SCRIPT = "${PROJECT_BUILD_SCRIPT}"
  7. PROJECT_FILE="${TEST_FOLDER}/TestCaller.DsrProj"
  8. echo PROJECT_FILE = "${PROJECT_FILE}"
  9. # Give execution rights.
  10. chmod +x "${PROJECT_BUILD_SCRIPT}";
  11. # Build TestCaller and all its tests.
  12. "${PROJECT_BUILD_SCRIPT}" "${PROJECT_FILE}" Linux $@;
  13. if [ $? -ne 0 ]
  14. then
  15. exit 1
  16. fi
  17. # Call TestCaller with a path to the folder containing tests.
  18. "${TEST_FOLDER}/TestCaller" "--test" "${TEST_FOLDER}/tests"