From fef5f7383a1e8224c9d6dc173000d3f43cda25ed Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 22 Mar 2009 20:41:33 +0000 Subject: [PATCH] add runtests.bat to 2.8 branch to allow running 2.8 unit tests in buildbot builds git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@59737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/runtests.bat | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/runtests.bat diff --git a/tests/runtests.bat b/tests/runtests.bat new file mode 100644 index 0000000000..65d44ee8e4 --- /dev/null +++ b/tests/runtests.bat @@ -0,0 +1,28 @@ +@echo off + +REM Runs wxWidgets CppUnit tests +REM This script is used to return the correct return value to the caller +REM which is required by Buildbot to recognize failures. +REM $Id: runtests.bat 59695 2009-03-21 13:49:20Z FM $ + +set failure=0 + +for /d %%x in (*) do @( + if exist %%x\test.exe ( + %%x\test.exe + if %errorlevel% GEQ 1 set failure=1 + ) + if exist %%x\test_gui.exe ( + %%x\test_gui.exe + if %errorlevel% GEQ 1 set failure=1 + ) +) + +REM exit with code 1 if any of the test failed +if %failure% EQU 1 exit /b 1 + +REM remove the failure env var: +set failure= + +REM exit with code 0 (all tests passed successfully) +exit /b 0