]> git.saurik.com Git - wxWidgets.git/blame - tests/runtests.bat
wxDataViewCtrl: Fully prepare renderer for Activate() call.
[wxWidgets.git] / tests / runtests.bat
CommitLineData
1dd8319a
FM
1@echo off
2
3REM Runs wxWidgets CppUnit tests
4REM This script is used to return the correct return value to the caller
5REM which is required by Buildbot to recognize failures.
7749be12
FM
6REM Note that in DOS error level is not the return code of the previous
7REM command; it is for (some!) built-in DOS commands like FIND but
8REM in general it's not. Thus to get the return code of the test utility
9REM we need some hack; see the guide:
10REM http://www.infionline.net/~wtnewton/batch/batguide.html
11REM for general info about DOS batch files.
12
13REM Author: Francesco Montorsi
1dd8319a
FM
14REM $Id$
15
ddaf7a11 16rem set the path for running the tests if they use DLL build of wx
5c5e59f8 17for /d %%x in ("..\lib\*_dll") do @set PATH=%%x;%PATH%
ddaf7a11 18
1dd8319a
FM
19set failure=0
20
21for /d %%x in (*) do @(
22 if exist %%x\test.exe (
7749be12
FM
23 %%x\test.exe >tmp
24
25 REM show the output of the test in the buildbot log:
26 type tmp
27
28 REM hack to understand if the tests succeeded or not
29 REM (failure=1 is set if "OK" does not appear in the test output)
30 type tmp | find "OK" >NUL
31 if ERRORLEVEL 1 set failure=1
8405285c
FM
32
33 REM separe the output of the test we just executed from the next one
34 echo.
35 echo.
36 echo ========================================================================
37 echo ========================================================================
38 echo.
39 echo.
1dd8319a 40 )
8405285c 41
1dd8319a 42 if exist %%x\test_gui.exe (
7749be12
FM
43 %%x\test_gui.exe >tmp
44
45 REM show the output of the test in the buildbot log:
46 type tmp
47
48 REM hack to understand if the tests succeeded or not
49 REM (failure=1 is set if "OK" does not appear in the test output)
50 type tmp | find "OK" >NUL
51 if ERRORLEVEL 1 set failure=1
1dd8319a
FM
52 )
53)
54
55REM exit with code 1 if any of the test failed
7749be12
FM
56del tmp
57if %failure% EQU 1 (
58 echo.
59 echo One or more test failed
60 echo.
61 exit 1
62)
1dd8319a
FM
63
64REM remove the failure env var:
65set failure=
66
67REM exit with code 0 (all tests passed successfully)
8405285c 68exit 0