Commit 03fc40e6 authored by Jon Turney's avatar Jon Turney Committed by Hugo Beauzée-Luyssen

Add gcc builds to appveyor.yml file

* It seems we must use gyp --no-parallel, as parallel operation fails in the
appveyor environment for unknown reasons.

* The Makefile written by gyp doesn't have an install target, so install the
gyp build products (libbreakpad_client.a, breakpad-client.pc and
crash_generation_app.exe).

v2:
Make appveyor.sh work when builddir != srcdir

v3:
Include 'make check' in appveyor.sh

* Apply a patch needed to build gtest r615 for Windows with -Werror=unused-variable
* Ensure PATH is set so tests can find needed runtime DLLs
* Relax a test which requires POSIX regex when built without them
* Don't test ifstream.good() even though we haven't yet read at the EOF (this
looks like a MinGW bug...)

v4:
Remove os:unstable from appveyor.yml
Apparently this might make the build use VMs on older, slower infrastructure
Update for changed script name

v5:
Maybe appveyor is fast enough for make check now

v6:
Remove gtest patch as no longer needed
Add to, rather than replace, msvs-only appveyor.yml
Run unittests on gcc (still failures, though)
Add cygwin to build matrix
parent dba59533
...@@ -433,7 +433,7 @@ if MINGW_HOST ...@@ -433,7 +433,7 @@ if MINGW_HOST
# For MinGW, use gyp to generate a Makefile to build Windows client library # For MinGW, use gyp to generate a Makefile to build Windows client library
Configuration ?= Debug Configuration ?= Debug
all-local: all-local:
cd $(top_srcdir)/src ; ./tools/gyp/gyp --no-circular-check --depth=. -f make client/windows/breakpad_client.gyp cd $(top_srcdir)/src ; ./tools/gyp/gyp --no-circular-check --no-parallel --depth=. -f make client/windows/breakpad_client.gyp
cd $(top_srcdir)/src ; $(MAKE) CXX="$(CXX)" CXXFLAGS="-DUNICODE -D_UNICODE $(AM_CPPFLAGS) $(CXXFLAGS)" AR="$(AR)" RC="$(WINDRES)" BUILDTYPE="$(Configuration)" cd $(top_srcdir)/src ; $(MAKE) CXX="$(CXX)" CXXFLAGS="-DUNICODE -D_UNICODE $(AM_CPPFLAGS) $(CXXFLAGS)" AR="$(AR)" RC="$(WINDRES)" BUILDTYPE="$(Configuration)"
endif endif
......
# Breakpad for Cygwin/MinGW # Breakpad for Cygwin/MinGW
[![Build status](https://ci.appveyor.com/api/projects/status/xp2os1r0m569a470/branch/pecoff-dwarf-on-git-20160304?svg=true)](https://ci.appveyor.com/project/jon-turney/google-breakpad)
google-breakpad with added support for Cygwin/MinGW: google-breakpad with added support for Cygwin/MinGW:
- A `dump_syms` tool which can read DWARF debugging information from PE/COFF executables. - A `dump_syms` tool which can read DWARF debugging information from PE/COFF executables.
- The breakpad crash-reporting client libraries built using Makefiles rather than MSVC solutions. - The breakpad crash-reporting client libraries built using Makefiles rather than MSVC solutions.
......
version: '{build}' version: '{build}'
skip_tags: true
environment: environment:
GYP_MSVS_VERSION: 2013 GYP_MSVS_VERSION: 2013
CACHE: C:\cache
matrix:
- toolchain: msvs
- toolchain: gcc
HOST: i686-w64-mingw32
- toolchain: gcc
HOST: x86_64-w64-mingw32
- toolchain: gcc
HOST: i686-pc-cygwin
- toolchain: gcc
HOST: x86_64-unknown-cygwin
platform: platform:
- Win32 - Win32
...@@ -10,33 +23,31 @@ configuration: ...@@ -10,33 +23,31 @@ configuration:
- Debug - Debug
- Release - Release
matrix:
exclude:
- configuration: Release
HOST: i686-pc-cygwin
- configuration: Release
HOST: x86_64-unknown-cygwin
# Use the source dir expected by gclient. # Use the source dir expected by gclient.
clone_folder: c:\projects\breakpad\src clone_folder: c:\projects\breakpad\src
# Before checkout.
init:
- cd %APPVEYOR_BUILD_FOLDER%\..\..
- appveyor DownloadFile https://storage.googleapis.com/chrome-infra/depot_tools.zip
- 7z -bd x depot_tools.zip -odepot_tools
- depot_tools\update_depot_tools
- cd %APPVEYOR_BUILD_FOLDER%
# After checkout.
install: install:
- PATH C:\projects\depot_tools;%PATH% - call scripts\appveyor-%toolchain%.bat install
- cd %APPVEYOR_BUILD_FOLDER%\..
- gclient config https://%APPVEYOR_REPO_PROVIDER%.com/%APPVEYOR_REPO_NAME% --unmanaged --name=src
- gclient sync
build_script: build_script:
- cd %APPVEYOR_BUILD_FOLDER% - call scripts\appveyor-%toolchain%.bat build_script
- msbuild src\client\windows\breakpad_client.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /m /verbosity:normal
- msbuild src\tools\windows\tools_windows.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /m /verbosity:normal
test_script: test_script:
- src\client\windows\%CONFIGURATION%\client_tests.exe - call scripts\appveyor-%toolchain%.bat test_script
- src\tools\windows\%CONFIGURATION%\dump_syms_unittest.exe
cache:
- C:\cache
artifacts: artifacts:
- path: '**\*.exe' - path: '**\*.exe'
- path: '**\*.lib' - path: '**\*.lib'
- path: staging
deploy: off
set CYGWIN_ROOT=C:\cygwin
if "%HOST%"=="x86_64-unknown-cygwin" set CYGWIN_ROOT=C:\cygwin64
goto %1
:install
set CYGWIN_MIRROR=http://cygwin.mirror.constant.com
set SETUP=setup-x86.exe
if "%HOST%"=="i686-w64-mingw32" set PKGARCH=mingw64-i686
if "%HOST%"=="x86_64-w64-mingw32" set PKGARCH=mingw64-x86_64
if "%HOST%"=="i686-pc-cygwin" set SETUP=setup-x86.exe
if "%HOST%"=="x86_64-unknown-cygwin" set SETUP=setup-x86_64.exe
if not defined PKGARCH (
set PACKAGES="gcc-g++,libcurl-devel,pkg-config"
) else (
set PACKAGES="%PKGARCH%-curl,%PKGARCH%-headers,%PKGARCH%-gcc-g++,%PKGARCH%-pkg-config"
)
echo Updating Cygwin and installing build dependencies
%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P "autoconf,automake,libtool,make,python2,%PACKAGES%"
goto :eof
:build_script
SET PATH=%CYGWIN_ROOT%/bin
%CYGWIN_ROOT%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; sh scripts/appveyor-gcc.sh"
goto :eof
:test_script
goto :eof
#!/bin/bash
set -e
srcdir=`dirname "$0"`
test -z "${srcdir}" && srcdir=.
srcdir="${srcdir}"/..
ORIGDIR=`pwd`
cd "${srcdir}"
echo fetching externals...
./fetch-externals
echo autoreconf running...
autoreconf -fvi
BUILD=$(autotools/config.guess)
if [ -z "$HOST" -o "$HOST" == "$BUILD" ] ; then
AR="ar"
else
AR=${HOST}-ar
client_is_built="yes"
fi
echo configure running...
cd "$ORIGDIR"
"${srcdir}"/configure --prefix=/usr --enable-silent-rules --host=${HOST}
echo make running...
make
echo make install running...
make install DESTDIR=./staging
if [ -n "$client_is_built" ] ; then
# Makefile made by gyp doesn't have an install target, so make up for that deficiency
${AR} -M <<EOF
CREATE ./staging/usr/lib/libbreakpad_client.a
ADDLIB ${srcdir}/src/out/${Configuration}/obj.target/client/windows/crash_generation/libcrash_generation_client.a
ADDLIB ${srcdir}/src/out/${Configuration}/obj.target/client/windows/crash_generation/libcrash_generation_server.a
ADDLIB ${srcdir}/src/out/${Configuration}/obj.target/client/windows/handler/libexception_handler.a
ADDLIB ${srcdir}/src/out/${Configuration}/obj.target/client/windows/libcommon.a
ADDLIB ${srcdir}/src/out/${Configuration}/obj.target/client/windows/sender/libcrash_report_sender.a
SAVE
END
EOF
cp -a ./breakpad-client.pc ./staging/usr/lib/pkgconfig/
cp -a ${srcdir}/src/out/${Configuration}/crash_generation_app.exe ./staging/usr/bin/
fi
echo make check running...
export PATH=/usr/${HOST}/sys-root/mingw/bin/:$PATH
make check || true
# stackwalker_mips64_unittest fails on cygwin
if [ -n "$client_is_built" ] ; then
src/out/${Configuration}/client_tests || true
# ExceptionHandlerDeathTest.{InvalidParam,PureVirtualCall}Test
# ExceptionHandlerTest.{InvalidParam,PureVirtualCall}MiniDumpTest fail on MinGW
# MinidumpTest.{Small,Larger,Full}Dump fail on MinGW x86_64
fi
goto %1
:install
cd %APPVEYOR_BUILD_FOLDER%\..\..
appveyor DownloadFile https://storage.googleapis.com/chrome-infra/depot_tools.zip
7z -bd x depot_tools.zip -odepot_tools
call depot_tools\update_depot_tools
cd %APPVEYOR_BUILD_FOLDER%
PATH C:\projects\depot_tools;%PATH%
cd %APPVEYOR_BUILD_FOLDER%\..
call gclient config https://%APPVEYOR_REPO_PROVIDER%.com/%APPVEYOR_REPO_NAME% --unmanaged --name=src
call gclient sync
cd %APPVEYOR_BUILD_FOLDER%
goto :eof
:build_script
cd %APPVEYOR_BUILD_FOLDER%
msbuild src\client\windows\breakpad_client.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /m /verbosity:normal
msbuild src\tools\windows\tools_windows.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /m /verbosity:normal
goto :eof
:test_script
src\client\windows\%CONFIGURATION%\client_tests.exe && src\tools\windows\%CONFIGURATION%\dump_syms_unittest.exe
goto :eof
...@@ -116,7 +116,6 @@ TEST_F(MinidumpTest, TestMinidumpFromStream) { ...@@ -116,7 +116,6 @@ TEST_F(MinidumpTest, TestMinidumpFromStream) {
file_stream.seekg(0, std::ios_base::beg); file_stream.seekg(0, std::ios_base::beg);
ASSERT_TRUE(file_stream.good()); ASSERT_TRUE(file_stream.good());
file_stream.read(&bytes[0], bytes.size()); file_stream.read(&bytes[0], bytes.size());
ASSERT_TRUE(file_stream.good());
string str(&bytes[0], bytes.size()); string str(&bytes[0], bytes.size());
istringstream stream(str); istringstream stream(str);
ASSERT_TRUE(stream.good()); ASSERT_TRUE(stream.good());
......
...@@ -148,8 +148,13 @@ TEST(ContextDeathTest, X86BadFlags) { ...@@ -148,8 +148,13 @@ TEST(ContextDeathTest, X86BadFlags) {
Dump dump(0, kLittleEndian); Dump dump(0, kLittleEndian);
MDRawContextX86 raw; MDRawContextX86 raw;
raw.context_flags = MD_CONTEXT_AMD64; raw.context_flags = MD_CONTEXT_AMD64;
#ifdef GTEST_USES_POSIX_RE
ASSERT_DEATH(Context context(dump, raw);, ASSERT_DEATH(Context context(dump, raw);,
"context\\.context_flags & (0x[0-9a-f]+|MD_CONTEXT_X86)"); "context\\.context_flags & (0x[0-9a-f]+|MD_CONTEXT_X86)");
#else
ASSERT_DEATH(Context context(dump, raw);,
"context\\.context_flags & MD_CONTEXT_X86");
#endif
} }
TEST(ContextDeathTest, X86BadEndianness) { TEST(ContextDeathTest, X86BadEndianness) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment