test_windows.bat 926 B

12345678910111213141516171819202122232425262728293031323334
  1. @echo off
  2. rem This script can be called from any path, as long as the first argument sais where this script is located.
  3. echo Starting test on MS-Windows.
  4. rem Get the test folder's path from the called path.
  5. set TEST_FOLDER=%~dp0
  6. echo TEST_FOLDER = %TEST_FOLDER%
  7. set PROJECT_BUILD_SCRIPT=%TEST_FOLDER%..\tools\builder\buildProject.bat
  8. echo PROJECT_BUILD_SCRIPT = %PROJECT_BUILD_SCRIPT%
  9. set PROJECT_FILE=%TEST_FOLDER%TestCaller.DsrProj
  10. echo PROJECT_FILE = %PROJECT_FILE%
  11. rem Build TestCaller and all its tests.
  12. call "%PROJECT_BUILD_SCRIPT%" "%PROJECT_FILE%" Windows %@%
  13. if errorlevel 0 (
  14. echo Done building TestCaller.
  15. ) else (
  16. echo Failed building TestCaller.
  17. exit /b 1
  18. )
  19. rem Call TestCaller with a path to the folder containing tests.
  20. echo Starting tests.
  21. call "%TEST_FOLDER%\TestCaller.exe" --test "%TEST_FOLDER%\tests"
  22. if errorlevel 0 (
  23. echo Done running tests.
  24. ) else (
  25. echo Failed running tests.
  26. exit /b 1
  27. )