Skip to content

Commit

Permalink
Enable s390x Travis CI build; Add coredump analyzer for Travis (skupp…
Browse files Browse the repository at this point in the history
…erproject#654)

* [travis] Install PyPI packages from requirements-dev.txt

* [travis] Install test dependencies

* [travis] Add coredump analyzer

* DISPATCH-2196 Fix compile options for c_unittests on s390x

* Document the -DSANITIZE_PYTHON=OFF CMake option

* [travis] Disable Python leak sanitization (Travis has Python 3.8)

* [travis] Remove QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST suppression

* [travis] Fix broken quart

* [travis] skip grpcio pypi install on s390x because it fails

* require new websockets

* disallow s390x failure!

* lower requirements for python 3.6
  • Loading branch information
jiridanek authored Aug 5, 2022
1 parent 4d24215 commit e6c90dd
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 deletions.
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
allow_failures:
- arch: arm64
- arch: ppc64le
- arch: s390x
exclude:
- arch: s390x
env: RUNTIME_CHECK=tsan QD_ENABLE_ASSERTIONS=OFF
Expand All @@ -60,5 +59,13 @@ addons:
- libwebsockets-dev
# code coverage
- lcov
# tests
- curl
- ncat
# coredump analysis
- gdb

script: scripts/travisci_build.sh
script:
- ulimit -c unlimited
- scripts/travisci_build.sh
- find -name 'core' -exec ${TRAVIS_BUILD_DIR}/scripts/gha_analyze_coredump.sh {} \;
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,13 @@ set(QPID_DISPATCH_CONFDIR ${SYSCONF_INSTALL_DIR}/skupper-router)
# Set up runtime checks (valgrind, sanitizers etc.)
include(cmake/RuntimeChecks.cmake)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZE_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZE_FLAGS}")
# DISPATCH-2196 Linking object files containing instances of the same C++ template fails on s390x with sanitizers enabled
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x")
# set the sanitizer flags only for linking, not for compilation; this workarounds the failure
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SANITIZE_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZE_FLAGS}")
endif()

##
## Include directories used by all sub-directories.
Expand Down
4 changes: 4 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ Other options include `Debug` (disables optimizations) and `Coverage`.
|`-DRUNTIME_CHECK=`
|Enables C/C++ runtime checkers. See "Run Time Validation" chapter above.

|`-DSANITIZE_PYTHON=OFF`
|Enables Leak Sanitizer suppressions for libpython3.
Use it to disable sanitization with older Python version (< 3.9).

|`-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON`
|With CMake 3.9+, compiles the project with LTO (Link Time Optimization) enabled.
Older versions of `CMake`` only honor this option with the Intel compiler on Linux.
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ pytest
pytest-instafail
pytest-timeout

grpcio
grpcio; platform_machine != 's390x'
h2
protobuf
quart
selectors
websockets
websockets>=9.1
psutil
9 changes: 2 additions & 7 deletions scripts/travisci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ set -Exeuo pipefail
#

PREFIX=$PWD/install
DISPATCH_CMAKE_ARGS="-DRUNTIME_CHECK=${RUNTIME_CHECK} -DQD_ENABLE_ASSERTIONS=${QD_ENABLE_ASSERTIONS} -DDISPATCH_TEST_TIMEOUT=500"
DISPATCH_CMAKE_ARGS="-DRUNTIME_CHECK=${RUNTIME_CHECK} -DQD_ENABLE_ASSERTIONS=${QD_ENABLE_ASSERTIONS} -DDISPATCH_TEST_TIMEOUT=500 -DSANITIZE_PYTHON=OFF"
DISPATCH_CTEST_EXTRA='-E ^python-checker$'
export NPROC=3
export QPID_SYSTEM_TEST_TIMEOUT=300
export QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True
export QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True

echo '==='
echo 'Install additional prerequisites'
Expand All @@ -44,11 +43,6 @@ fi

# Update pip, it may prevent issues later
python3 -m pip install --user --upgrade pip
python3 -m pip install --user tox virtualenv
# Install quart to run the http2 tests.
python3 -m pip install --user quart
# DISPATCH-1883: Install selectors to run tcp echo server/client tools
python3 -m pip install --user selectors
# Install grpcio and protobuf to run the grpc tests.
# Installation on s390x currently broken https://github.com/grpc/grpc/pull/25363
# Binary wheel is not available in PyPI for s390x and source install requires fetching git submodules first
Expand All @@ -58,6 +52,7 @@ else
python3 -m pip install --user protobuf
sudo apt install python3-grpcio
fi
python3 -m pip install --user --ignore-installed -r requirements-dev.txt

echo '==='
echo 'Build and install qpid-proton from source'
Expand Down
7 changes: 0 additions & 7 deletions tests/c_unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
# -fno-inline: just to be extra sure, no particular reason so far
# -fno-builtin: GCC would optimize e.g. abs() and we would not be able to stub
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD_FLAGS} -fno-inline -fno-builtin -fno-stack-protector")
# DISPATCH-2196 Linking object files containing instances of the same C++ template fails on s390x with sanitizers enabled
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x")
# set the sanitizer flags only for linking, not for compilation; this workarounds the failure
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SANITIZE_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZE_FLAGS}")
endif()

add_library(static_accessors_server_c SHARED
static_accessors_server_c.c)
Expand Down

0 comments on commit e6c90dd

Please sign in to comment.