Merge branch 'appveyor-tests'

Fix several problems in tests under MSW (mostly with MinGW) and enable
building and running them on AppVeyor CI.
This commit is contained in:
Vadim Zeitlin
2017-11-25 19:18:14 +01:00
20 changed files with 381 additions and 255 deletions

49
build/tools/appveyor-test.bat Executable file
View File

@@ -0,0 +1,49 @@
echo.
echo --- Running tests.
echo.
cd c:\projects\wxwidgets\tests
goto %TOOLSET%
:msbuild
PATH=C:\projects\wxwidgets\lib\vc_x64_dll;%PATH%
.\vc_x64_mswudll\test.exe
if errorlevel 1 goto :error
.\vc_x64_mswudll\test_gui.exe
goto :eof
:nmake
if "%BUILD%"=="debug" set debug_suffix=d
.\vc_mswu%debug_suffix%\test.exe
if errorlevel 1 goto :error
.\vc_mswu%debug_suffix%\test_gui.exe
goto :eof
:mingw
.\gcc_mswud\test.exe
if errorlevel 1 goto :error
.\gcc_mswud\test_gui.exe
goto :eof
:msys2
PATH=C:\projects\wxwidgets\lib;%PATH%
.\test.exe
if errorlevel 1 goto :error
.\test_gui.exe
goto :eof
:cygwin
PATH=C:\projects\wxwidgets\lib;%PATH%
.\test.exe
.\test_gui.exe
echo.
echo --- Note: ignoring possible test failures under Cygwin
echo.
exit /b 0
:error
echo.
echo !!! Non-GUI test failed.
echo.
goto :eof

View File

@@ -3,27 +3,33 @@ goto %TOOLSET%
:msbuild
cd build\msw
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" wx_vc12.sln
cd ..\..\tests
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" test_vc12.sln
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" test_gui_vc12.sln
goto :eof
:nmake
cd build\msw
call "C:\Program Files (x86)\Microsoft Visual Studio %VS%\VC\vcvarsall.bat" %ARCH%
nmake -f makefile.vc BUILD=%BUILD%
cd ..\..\tests
nmake -f makefile.vc BUILD=%BUILD%
goto :eof
:mingw
cd build\msw
path C:\MinGW\bin;%path%
echo --- Tools versions:
g++ --version | head -1
mingw32-make --version | head -1
ar --version | head -1
path C:\MinGW\bin;
g++ --version | "C:\Program Files\Git\usr\bin\head" -n 1
mingw32-make --version | "C:\Program Files\Git\usr\bin\head" -n 1
ar --version | "C:\Program Files\Git\usr\bin\head" -n 1
echo.
echo --- Starting the build
echo.
mingw32-make -f makefile.gcc setup_h BUILD=debug SHARED=0
mingw32-make -j3 -f makefile.gcc BUILD=debug SHARED=0
cd ..\..\tests
mingw32-make -j3 -f makefile.gcc BUILD=debug SHARED=0
goto :eof
:msys2
@@ -32,7 +38,7 @@ set CHERE_INVOKING=yes
:: Workaround for "configure: Bad file descriptor"
perl -i".bak" -pe "s/^test -n \".DJDIR\"/#$&/" configure
bash -lc "g++ --version"
bash -lc "CXXFLAGS=-Wno-deprecated-declarations ./configure --disable-optimise && make -j3"
bash -lc "CXXFLAGS=-Wno-deprecated-declarations ./configure --disable-optimise && make -j3 && make -j3 -C tests"
goto :eof
:cygwin
@@ -42,5 +48,5 @@ set CHERE_INVOKING=yes
:: Workaround for "configure: Bad file descriptor"
perl -i".bak" -pe "s/^test -n \".DJDIR\"/#$&/" configure
bash -lc "g++ --version"
bash -lc "LDFLAGS=-L/usr/lib/w32api ./configure --disable-optimise --disable-shared && make -j3"
bash -lc "LDFLAGS=-L/usr/lib/w32api ./configure --disable-optimise --disable-shared && make -j3 && make -j3 -C tests"
goto :eof