# # # patch "visualc/runtests.bat" # from [ae094a8fe0b9fb8aa93225102fdca4bd70f12954] # to [175fbfac8ca171429e654893d4cb2c1f7c0ed036] # ============================================================ --- visualc/runtests.bat ae094a8fe0b9fb8aa93225102fdca4bd70f12954 +++ visualc/runtests.bat 175fbfac8ca171429e654893d4cb2c1f7c0ed036 @@ -1,31 +1,39 @@ set PATH=%CD%\visualc\Release;%PATH% SETLOCAL set PATH=%CD%\visualc\Release;%PATH% +set fail_count=0 + unit_tests.exe if %ERRORLEVEL%=="0" goto tester-testsuite.lua address@hidden unit-tests failed, skipping remaining tests. -goto error address@hidden unit-tests failed. +set fail_count=1 :tester-testsuite.lua tester.exe tester-testsuite.lua if NOT %ERRORLEVEL%=="0" goto testsuite.lua address@hidden tester-testsuite.lua failed, skipping remaining tests. -goto error address@hidden tester-testsuite.lua failed. +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 end +if NOT %ERRORLEVEL%=="0" goto nomore @echo testsuite.lua failed. -goto error +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 - -goto end -:error @rem return an error code address@hidden "===============================" address@hidden %fail_count of 3 tests failed. address@hidden "===============================" exit /B 1 - - :end address@hidden "===============================" address@hidden All tests succeeded! address@hidden "==============================="