From f839cf6d8f4783da62cadf42f1adfde2a467e0ea Mon Sep 17 00:00:00 2001 From: Kenneth Giusti Date: Thu, 26 Aug 2021 10:09:02 -0400 Subject: [PATCH 1/2] NO-JIRA: Travis CI update: - remove MacOS - remove test configurations already covered by Github Actions - All tests run either TSAN or ASAN checkers - whitespace fixups --- .travis.yml | 194 +++++++++++++++++++--------------------------------- macports.sh | 90 ------------------------ 2 files changed, 70 insertions(+), 214 deletions(-) delete mode 100644 macports.sh diff --git a/.travis.yml b/.travis.yml index 08947b9bb2..f43b353e95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,83 +20,77 @@ language: c cache: ccache os: linux -dist: xenial +dist: focal jobs: fast_finish: true allow_failures: - - os: osx - arch: arm64 - arch: s390x include: - - name: "apache-rat:check" - os: linux - env: [] - language: java - addons: - apt: - packages: [] - install: [] - before_script: [] - script: - - mvn apache-rat:check - before_cache: - - rm -rf $HOME/.m2/repository/org/apache/qpid/* - cache: - directories: - - $HOME/.m2/repository - after_script: - - cat target/rat.txt || true - # prepending /usr/bin to PATH to avoid mismatched python interpreters in /opt - - name: "qdrouterd:Debug (gcc on xenial)" - os: linux - env: - - QPID_SYSTEM_TEST_TIMEOUT=300 - - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True - - PATH="/usr/bin:$PATH" PROTON_VERSION=main BUILD_TYPE=Debug - - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan' - name: "qdrouterd:Coverage" os: linux env: - - QPID_SYSTEM_TEST_TIMEOUT=300 - - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True - - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 BUILD_TYPE=Coverage - - name: "qdrouterd:RelWithDebInfo+MemoryDebug (gcc on xenial)" + - QPID_SYSTEM_TEST_TIMEOUT=300 + - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True + - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 BUILD_TYPE=Coverage + + - name: "qdrouterd:ASAN (clang13)" os: linux + before_install: + - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - + - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main' -y + - sudo apt-get update -q + - sudo apt-get install -y clang-13 llvm-13-dev + # Install and use the latest Node.js LTS version + - nvm install "lts/*" + # Update pip, it may prevent issues later + - sudo apt-get install -y python3-pip + - python3 -m pip install --user --upgrade pip + - python3 -m pip install --user tox virtualenv + # Install quart, h2 to run the http2 tests. + - python3 -m pip install --user quart h2 + # 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. + - python3 -m pip install --user grpcio protobuf env: - - QPID_SYSTEM_TEST_TIMEOUT=300 - - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True - - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 BUILD_TYPE=RelWithDebInfo - - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG' - - name: "qdrouterd:RelWithDebInfo+MemoryDebug (clang on focal)" + - QPID_SYSTEM_TEST_TIMEOUT=300 + - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True + - QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True + - CC=clang-13 + - CXX=clang++-13 + - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 BUILD_TYPE=RelWithDebInfo + - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON' + + - name: "qdrouterd:TSAN (gcc-11)" os: linux - dist: focal before_install: - - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - - - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main' -y - - sudo apt-get update -q - - sudo apt-get install -y clang-13 llvm-13-dev - # Update pip, it may prevent issues later - - sudo apt-get install -y python3-pip - - python3 -m pip install --user --upgrade pip - - python3 -m pip install --user tox virtualenv - # Install quart, h2 to run the http2 tests. - - python3 -m pip install --user quart h2 - # 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. - - python3 -m pip install --user grpcio protobuf + - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update + - sudo apt-get install -y g++-11 + # Install and use the latest Node.js LTS version + - nvm install "lts/*" + # Update pip, it may prevent issues later + - sudo apt-get install -y python3-pip + - 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. + - python3 -m pip install --user grpcio protobuf env: + - CC=gcc-11 + - CXX=g++-11 - QPID_SYSTEM_TEST_TIMEOUT=300 - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True - QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True - - CC=clang-13 - - CXX=clang++-13 - - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 BUILD_TYPE=RelWithDebInfo - - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG' - - name: "qdrouterd:RelWithDebInfo+MemoryDebug (gcc on focal)" + - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 + - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=tsan' + + - name: "qdrouterd:ASAN on s390x" arch: s390x os: linux - dist: focal before_install: # Install and use the latest Node.js LTS version - nvm install "lts/*" @@ -116,11 +110,11 @@ jobs: - QPID_SYSTEM_TEST_TIMEOUT=300 - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True - PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo - - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON -DDISPATCH_TEST_TIMEOUT=500' - - name: "qdrouterd:RelWithDebInfo+MemoryDebug (clang on focal) on arm64" + - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON' + + - name: "qdrouterd:TSAN (clang12) on arm64" arch: arm64 os: linux - dist: focal compiler: clang before_install: - sudo apt-get install clang-12 llvm-12-dev @@ -141,56 +135,7 @@ jobs: - CC=clang-12 - CXX=clang++-12 - PROTON_VERSION=0.36.0 BUILD_TYPE=RelWithDebInfo - - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON -DDISPATCH_TEST_TIMEOUT=500' - - name: "qdrouterd:Default Build" - os: linux - env: - - QPID_SYSTEM_TEST_TIMEOUT=300 - - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True - - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 - - name: "qdrouterd:TSAN" - os: linux - dist: focal - before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update - - sudo apt-get install -y g++-11 - # Update pip, it may prevent issues later - - sudo apt-get install -y python3-pip - - 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. - - python3 -m pip install --user grpcio protobuf - env: - - CC=gcc-11 - - CXX=g++-11 - - QPID_SYSTEM_TEST_TIMEOUT=300 - - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True - - QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True - - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 - - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=tsan' - - name: "qdrouterd:RelWithDebInfo+MemoryDebug (clang on macOS)" - os: osx - osx_image: xcode11 - env: - - QPID_SYSTEM_TEST_TIMEOUT=300 - - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True - - PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH" PROTON_VERSION=main - - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON -DDISPATCH_TEST_TIMEOUT=500' - # exclude tests that require raw_connection functionality; not available in libuv proactor - - DISPATCH_CTEST_EXTRA='-E system_tests_tcp_adaptor|system_tests_http1_adaptor|system_tests_http2|system_tests_grpc|system_tests_http1_over_tcp' - before_install: - - bash ./macports.sh - - export COLUMNS=80 - - yes | sudo port install cmake swig swig-python libuv jsoncpp libwebsockets nghttp2 cyrus-sasl2 pkgconfig python37 py37-pip - # set aliases for CMake's PythonInterp and PythonLibs to find MacPort's `python` on the path first - - sudo port select --set python python37 - - sudo port select --set python3 python37 - - python3 -m venv p3venv - - source p3venv/bin/activate + - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=tsan' addons: apt: @@ -202,23 +147,26 @@ addons: - sasl2-bin - swig - libnghttp2-dev - # documentation - - asciidoc - - asciidoctor - - dblatex + - libwebsockets-dev # unit test requirement - tox # code coverage - lcov before_install: -# Install and use the latest Node.js LTS version -- nvm install "lts/*" -# Install Python 3.6.8 -# Travis by itself would activate a virtualenv; CMake < 3.15 deals badly with this -- curl -sSf --retry 5 -o python-3.6.8.tar.bz2 https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/16.04/x86_64/python-3.6.8.tar.bz2 -- sudo tar xjf python-3.6.8.tar.bz2 --directory / -- PATH="/opt/python/3.6.8/bin:${PATH}" + # Install and use the latest Node.js LTS version + - nvm install "lts/*" + # Update pip, it may prevent issues later + - sudo apt-get install -y python3-pip + - python3 -m pip install --user --upgrade pip + - python3 -m pip install --user tox virtualenv + # Install quart, h2 to run the http2 tests. + - python3 -m pip install --user quart h2 + # 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. + - python3 -m pip install --user grpcio protobuf + install: - NPROC=2 @@ -245,8 +193,6 @@ script: - pushd ../qpid-proton - echo $(echo "Current proton commit:") $(git rev-parse HEAD) "(${PROTON_VERSION})" - popd -# Workaround on macOS for PROTON-808 Binaries have their library locations stripped -- if [[ "${OSTYPE}" == "darwin"* ]]; then install_name_tool -add_rpath $PREFIX/lib/. $PREFIX/lib/proton/bindings/python/_cproton.so; fi - ctest --timeout 1200 -V ${DISPATCH_CTEST_EXTRA} && if [ "$BUILD_TYPE" = "Coverage" ]; then cmake --build . --target coverage; fi after_success: diff --git a/macports.sh b/macports.sh deleted file mode 100644 index 6b0fb05724..0000000000 --- a/macports.sh +++ /dev/null @@ -1,90 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Based on https://github.com/GiovanniBussi/macports-ci - -set -Exeuo pipefail - -export COLUMNS=80 - -MACPORTS_VERSION=2.6.4 -MACPORTS_PREFIX=/opt/local -MACPORTS_SYNC=tarball - -pushd "$(mktemp -d)" - -OSX_VERSION="$(sw_vers -productVersion | sed 's/\.[^\.]*$//')" - -if test "$OSX_VERSION" == 10.10 ; then - OSX_NAME=Yosemite -elif test "$OSX_VERSION" == 10.11 ; then - OSX_NAME=ElCapitan -elif test "$OSX_VERSION" == 10.12 ; then - OSX_NAME=Sierra -elif test "$OSX_VERSION" == 10.13 ; then - OSX_NAME=HighSierra -elif test "$OSX_VERSION" == 10.14 ; then - OSX_NAME=Mojave -else - echo "macports-ci: Unknown OSX version $OSX_VERSION" - exit 1 -fi - -echo "macports-ci: OSX version $OSX_VERSION $OSX_NAME" - -MACPORTS_PKG=MacPorts-${MACPORTS_VERSION}-${OSX_VERSION}-${OSX_NAME}.pkg - -URL="https://distfiles.macports.org/MacPorts" -URL="https://github.com/macports/macports-base/releases/download/v$MACPORTS_VERSION/" - -echo "macports-ci: Base URL is $URL" - -# download installer: -curl -LO $URL/$MACPORTS_PKG -# install: -sudo installer -verbose -pkg $MACPORTS_PKG -target / - -# update: -export PATH="$MACPORTS_PREFIX/bin:$PATH" - -i=1 -# run through a while to retry upon failure -while true -do - echo "macports-ci: Trying to selfupdate (iteration $i)" -# here I test for the presence of a known portfile -# this check confirms that ports were installed -# notice that port -N selfupdate && break is not sufficient as a test -# (sometime it returns a success even though ports have not been installed) -# for some misterious reasons, running without "-d" does not work in some case - sudo port -d -N selfupdate 2>&1 | grep -v DEBUG | awk '{if($1!="x")print}' - port info xdrfile > /dev/null && break || true - sleep 5 - i=$((i+1)) - if ((i>20)) ; then - echo "macports-ci: Failed after $i iterations" - exit 1 - fi -done - -echo "macports-ci: Selfupdate successful after $i iterations" - -dir="$PWD" -popd -sudo rm -rf $dir From 94b3671422ae5c074acc56590e8442092ea72667 Mon Sep 17 00:00:00 2001 From: Kenneth Giusti Date: Sun, 6 Feb 2022 19:02:11 -0500 Subject: [PATCH 2/2] fixup: skip http2 large file upload test --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index f43b353e95..5d0de6acb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ jobs: env: - QPID_SYSTEM_TEST_TIMEOUT=300 - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True + - QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True - PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0 BUILD_TYPE=Coverage - name: "qdrouterd:ASAN (clang13)" @@ -109,6 +110,7 @@ jobs: env: - QPID_SYSTEM_TEST_TIMEOUT=300 - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True + - QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True - PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON' @@ -132,6 +134,7 @@ jobs: env: - QPID_SYSTEM_TEST_TIMEOUT=300 - QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True + - QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True - CC=clang-12 - CXX=clang++-12 - PROTON_VERSION=0.36.0 BUILD_TYPE=RelWithDebInfo