test.bat 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. @echo off
  2. rem file : examples/test.bat
  3. rem copyright : Copyright (c) 2013-2014 Code Synthesis Tools CC
  4. rem license : MIT; see accompanying LICENSE file
  5. setlocal
  6. set "tests=roundtrip processing persistence inheritance hybrid performance"
  7. set "confs=Debug Release"
  8. set "plats=Win32 x64"
  9. set "curdir=%CD%"
  10. set "topdir=%curdir%\.."
  11. set "failed="
  12. goto start
  13. rem
  14. rem %1 - test directory
  15. rem %2 - configuration
  16. rem %3 - platform
  17. rem
  18. :run_test
  19. cd %1
  20. if "_%3_" == "_Win32_" (
  21. set "dir=%2"
  22. ) else (
  23. set "dir=%3\%2"
  24. )
  25. if exist %dir%\driver.exe (
  26. echo %1\%3\%2
  27. call %topdir%\tester.bat example %2 %3
  28. if errorlevel 1 (
  29. set "failed=%failed% %1\%3\%2"
  30. )
  31. )
  32. cd %curdir%
  33. goto :eof
  34. :start
  35. for %%t in (%tests%) do (
  36. for %%c in (%confs%) do (
  37. for %%p in (%plats%) do (
  38. call :run_test %%t %%c %%p
  39. )
  40. )
  41. )
  42. if not "_%failed%_" == "__" goto error
  43. echo.
  44. echo ALL EXAMPLES PASSED
  45. echo.
  46. goto end
  47. :usage
  48. echo.
  49. echo usage: test.bat
  50. echo.
  51. :error
  52. if not "_%failed%_" == "__" (
  53. echo.
  54. for %%t in (%failed%) do echo FAILED: %%t
  55. echo.
  56. )
  57. endlocal
  58. exit /b 1
  59. :end
  60. endlocal