# # # patch "visualc/runtests.bat" # from [24c5d6360a316e5bc8cf1e44ca3da2d788c64b1c] # to [1ef850fd7a0e4234df2cb961dcdd88f82868dc47] # ============================================================ --- visualc/runtests.bat 24c5d6360a316e5bc8cf1e44ca3da2d788c64b1c +++ visualc/runtests.bat 1ef850fd7a0e4234df2cb961dcdd88f82868dc47 @@ -1,33 +1,32 @@ SETLOCAL SETLOCAL -set PATH=%CD%\visualc\Release;%PATH% +set EXE_PATH=visualc\Release +set PATH=%CD%\%EXE_PATH%;%PATH% set fail_count=0 -cd %CD%\test - unit_tests.exe -if %ERRORLEVEL%=="0" goto tester-testsuite.lua +if %ERRORLEVEL%==0 goto tester-testsuite.lua @echo unit-tests failed. set fail_count=1 :tester-testsuite.lua -tester.exe tester-testsuite.lua -if NOT %ERRORLEVEL%=="0" goto testsuite.lua +%EXE_PATH%\tester.exe tester-testsuite.lua +if %ERRORLEVEL%==0 goto testsuite.lua @echo tester-testsuite.lua failed. -if %fail_count%=="1" set fail_count=2 -if %fail_count%=="0" set fail_count=1 +if %fail_count%==1 set fail_count=2 +if %fail_count%==0 set fail_count=1 :testsuite.lua -tester.exe testsuite.lua -if NOT %ERRORLEVEL%=="0" goto nomore +%EXE_PATH%\tester.exe testsuite.lua +if %ERRORLEVEL%==0 goto nomore @echo testsuite.lua failed. -if %fail_count%=="2" set fail_count=3 -if %fail_count%=="1" set fail_count=2 -if %fail_count%=="0" set fail_count=1 +if %fail_count%==2 set fail_count=3 +if %fail_count%==1 set fail_count=2 +if %fail_count%==0 set fail_count=1 :nomore -if %fail_count%=="0" goto end +if %fail_count%==0 goto end @rem return an error code @echo ===============================