@echo off
if [%1] NEQ [] (
    set CONFIGURATION=%1
) else (
    set CONFIGURATION=.
)

if "%CONFIGURATION%" EQU "." (
    echo Testing configuration '@CMAKE_BUILD_TYPE@'
) else (
    echo Testing configuration '%CONFIGURATION%'
)

set PATH=@EXTRA_PATH@%PATH%

set SCRIPT_DIR=%~dp0
cd "%SCRIPT_DIR%"

cmd /c @VIGRA_TEST_EXECUTABLE@
IF %ERRORLEVEL% NEQ 0 (
    rem this is the Windows version of 'touch'
    copy /b testsuccess.cxx+,, > NUL
    exit %ERRORLEVEL%
)
