2019-10-31 23:09:52 +00:00
|
|
|
@echo off
|
2023-02-22 21:12:56 +00:00
|
|
|
setlocal
|
2019-10-31 23:09:52 +00:00
|
|
|
setlocal EnableDelayedExpansion
|
|
|
|
|
2023-02-22 21:12:56 +00:00
|
|
|
set TEST_ARGS=%*
|
|
|
|
|
2019-10-31 23:09:52 +00:00
|
|
|
set BUILD_ROOT=%~dp0\..\build
|
|
|
|
|
|
|
|
:: Unlike building, we don't need to limit ourselves to the Platform of the command window
|
2023-02-22 21:12:56 +00:00
|
|
|
set COMPILERS=clang msvc
|
|
|
|
set ARCHITECTURES=32 64
|
|
|
|
set BUILD_TYPES=debug release relwithdebinfo minsizerel
|
|
|
|
|
|
|
|
for %%c in (%COMPILERS%) do (
|
|
|
|
for %%a in (%ARCHITECTURES%) do (
|
|
|
|
for %%b in (%BUILD_TYPES%) do (
|
|
|
|
call :execute_tests %%c%%a%%b
|
|
|
|
if !ERRORLEVEL! NEQ 0 ( goto :eof )
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2019-10-31 23:09:52 +00:00
|
|
|
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:execute_tests
|
|
|
|
set BUILD_DIR=%BUILD_ROOT%\%1
|
|
|
|
if not exist %BUILD_DIR% ( goto :eof )
|
|
|
|
|
|
|
|
pushd %BUILD_DIR%
|
|
|
|
echo Running tests from %CD%
|
|
|
|
call :execute_test app witest.app.exe
|
2023-02-22 21:12:56 +00:00
|
|
|
if %ERRORLEVEL% NEQ 0 ( goto :execute_tests_done )
|
2019-10-31 23:09:52 +00:00
|
|
|
call :execute_test cpplatest witest.cpplatest.exe
|
2023-02-22 21:12:56 +00:00
|
|
|
if %ERRORLEVEL% NEQ 0 ( goto :execute_tests_done )
|
2019-10-31 23:09:52 +00:00
|
|
|
call :execute_test noexcept witest.noexcept.exe
|
2023-02-22 21:12:56 +00:00
|
|
|
if %ERRORLEVEL% NEQ 0 ( goto :execute_tests_done )
|
2019-10-31 23:09:52 +00:00
|
|
|
call :execute_test normal witest.exe
|
2023-02-22 21:12:56 +00:00
|
|
|
if %ERRORLEVEL% NEQ 0 ( goto :execute_tests_done )
|
|
|
|
call :execute_test sanitize-address witest.asan.exe
|
|
|
|
if %ERRORLEVEL% NEQ 0 ( goto :execute_tests_done )
|
|
|
|
call :execute_test sanitize-undefined-behavior witest.ubsan.exe
|
|
|
|
if %ERRORLEVEL% NEQ 0 ( goto :execute_tests_done )
|
|
|
|
call :execute_test win7 witest.win7.exe
|
|
|
|
if %ERRORLEVEL% NEQ 0 ( goto :execute_tests_done )
|
|
|
|
|
|
|
|
:execute_tests_done
|
|
|
|
set EXIT_CODE=%ERRORLEVEL%
|
2019-10-31 23:09:52 +00:00
|
|
|
popd
|
2023-02-22 21:12:56 +00:00
|
|
|
exit /B %EXIT_CODE%
|
2019-10-31 23:09:52 +00:00
|
|
|
|
|
|
|
:execute_test
|
|
|
|
if not exist tests\%1\%2 ( goto :eof )
|
|
|
|
echo Running %1 tests...
|
2023-02-22 21:12:56 +00:00
|
|
|
tests\%1\%2 %TEST_ARGS%
|
2019-10-31 23:09:52 +00:00
|
|
|
goto :eof
|