From 1a3fe3ce309f9fa39231c2d6ac7f7ad770d7028a Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 14 Jan 2020 08:19:12 +0000 Subject: [PATCH] Merge r1870553, r1870555, r1871091, r1871095, r1871141, r1871815, r1871816, r1871907, r1871908, r1872045, r1872063, r1872073, r1872106, r1872124, r1872309, r1872372, r1872373, r1872389, r1872392, r1872519, r1872544, r1872588, r1872590 from trunk: Skip "PCRE 1" job for 2.4.x since there's no PCRE 2 support. Enable ppc64le builds, caching now seems to work in Travis for non-x86. travis: enable email notifications on success as test adding myself for debugging (happy 113th birthday to the inventor of that term\!) does this work?? travis: send notification to httpd-dev@ only on failure Due to a combination of Daniel's work and probably some fix on Travis end, we are now finally getting Travis emails in httpd-dev@. Since having notifications for successful builds might become a little spammy, let's just alert when a build fails (like we do with buildbot IIUC). travis: sync trunk's notification config with 2.4.x test/travis_before_linux.sh: add a simple bash retry to svn export Sometimes a build is killed by Travis due to svn export taking a long time to complete (> 10m). This change should be a test to see if a simple workaround reduces the noise to the dev@ mailing list. test/travis_before_linux.sh: remove bash -e flag To allow a proper fail/retry, -e needs to be removed. Ideally this shouldn't happen, so I'd consider this a test to see if the bash for workaround is a viable option or not. test/travis_before_linux.sh: make for loop more resilient This is a follow up to my last commit to this file, to make the for loop more resilient with the following: - use --force in svn export, otherwise the second attempt will always fail due to the dest directory already present. - exit 1 in case the 5 tries end up in a non zero exit code (to fail fast the build). travis: temporary disable notifications to dev@ There seem to be some issues to iron out, disabling email notifications to avoid spamming dev@. test/travis_before_linux.sh: move retry logic to function Move the retry logic to a bash function and restore the -e failure policy in the script (to have cleaner log traces in base of build failures). Work around a build failure when a cached APR branch install is used but APR-util needs to be rebuilt; currently this fails because the APR build directory is not available. e.g. https://travis-ci.org/apache/httpd/jobs/630885203 Disable caching for this combination for now. travis: restore email notifications for dev@ The issue with ppcle64 seems to be fixed from [1], and Joe fixed the APR 1.7.x issue as well. Builds are back to normal. [1]: https://travis-ci.community/t/ppc64le-an-error-occurred-while-generating-the-build-script/6598/6 test/travis_before_linux.sh: increase backoff time before executing svn export Cache SVN checkout of test/framework across Travis builds. Should improve reliability (the checkout fails frequently) and performance, plus reduces load on ASF infra. Github: closes #85 Add Travis job which runs tests in random order. Github: closes #86 travis: add verbose config to perl test suite for Ubuntu Worker All Modules For some reason we get sporadic failures only in Ubuntu Worker All Modules' test: t/apache/rwrite.t ................... 53/? # Failed test 113 in /home/travis/build/apache/httpd/test/perl-framework/blib/lib/Apache/TestCommon.pm at line 56 fail #113 t/apache/rwrite.t ................... Failed 1/114 subtests Recent examples: https://travis-ci.org/apache/httpd/jobs/632425202 https://travis-ci.org/apache/httpd/jobs/633250739 Add "-verbose" as test option to capture more data about the failure when it happens. travis: disable email notifications There are still some spurious failures to iron out, turn off email notification to avoid too many failure emails to dev@. Add arm64 support for Travis testing. This support is experimental. travis: remove verbose arg for Ubuntu Worker Add Travis job running the litmus WebDAV test suite. Enable verbose test output to debug failures on arm. Submitted by: jorton, elukey, humbedoohy, mrumph Github: closes #90 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1872757 13f79535-47bb-0310-9956-ffa450edef68 --- .travis.yml | 46 +++++++++++++++++++++++++++-- test/README.travis | 1 + test/travis_before_linux.sh | 58 +++++++++++++++++++++++++++++++++++-- test/travis_run_linux.sh | 17 ++++++++--- 4 files changed, 112 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3322786d7c3..1092d010cc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,9 +39,22 @@ matrix: arch: s390x env: CONFIG="--enable-mods-shared=reallyall" # ------------------------------------------------------------------------- + - name: Linux ppc64le Ubuntu, all-modules + arch: ppc64le + env: CONFIG="--enable-mods-shared=reallyall" + # ------------------------------------------------------------------------- + - name: Linux arm64 Ubuntu, all-modules + arch: arm64 + env: CONFIG="--enable-mods-shared=reallyall" + TEST_ARGS="-v" + # ------------------------------------------------------------------------- - name: Linux Ubuntu, Default, all-modules env: CONFIG="--enable-mods-shared=reallyall" # ------------------------------------------------------------------------- + - name: Linux Ubuntu, Default, all-modules, random test order + env: CONFIG="--enable-mods-shared=reallyall" + TEST_ARGS="-order=random" + # ------------------------------------------------------------------------- - name: Linux Ubuntu, Prefork MPM, all-modules env: CONFIG="--enable-mods-shared=reallyall --with-mpm=prefork" # ------------------------------------------------------------------------- @@ -56,7 +69,8 @@ matrix: env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-7" SKIP_TESTING=1 # ------------------------------------------------------------------------- - - name: Linux Ubuntu, PCRE 1, GCC 7 maintainer-mode w/-Werror + - if: branch != 2.4.x + name: Linux Ubuntu, PCRE 1, GCC 7 maintainer-mode w/-Werror os: linux env: CONFIG="--enable-mods-shared=reallyall --with-pcre=/usr/bin/pcre-config --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-7" # ------------------------------------------------------------------------- @@ -115,6 +129,7 @@ matrix: env: APR_VERSION=1.7.x APU_VERSION=1.7.x CONFIG="--enable-mods-shared=reallyall" APU_CONFIG="--with-crypto" + CLEAR_CACHE=1 # ------------------------------------------------------------------------- - name: Linux Ubuntu, APR 1.7.0 --enable-pool-debug, APR-util 1.6.1 env: APR_VERSION=1.7.0 APR_CONFIG="--enable-pool-debug" @@ -122,6 +137,29 @@ matrix: APU_CONFIG="--with-crypto" CONFIG="--enable-mods-shared=reallyall" # ------------------------------------------------------------------------- + - name: Linux Ubuntu, litmus WebDAV tests + env: CONFIG="--enable-dav --enable-dav-fs" + LITMUS=1 TEST_ARGS="t/modules/dav.t" + addons: + apt: + update: false + sources: + - sourceline: 'deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe' + packages: + - cpanminus + - libtool-bin + - libapr1-dev + - libaprutil1-dev + - perl-doc + - lua5.3-dev + - libbrotli-dev + - libcurl4-openssl-dev + - libsystemd-dev + - libnghttp2-dev + - libjansson-dev + - libpcre2-dev + - litmus + # ------------------------------------------------------------------------- - if: branch = 2.4.x name: Linux Ubuntu, APR 1.5.1, APR-util 1.5.4 env: APR_VERSION=1.5.1 APU_VERSION=1.5.4 @@ -147,5 +185,7 @@ script: notifications: irc: "chat.freenode.net#httpd-dev" - email: - - dev@httpd.apache.org + # Disabled to avoid too many failure emails to dev@, + # some builds occasionally fail. + #email: + # - dev@httpd.apache.org diff --git a/test/README.travis b/test/README.travis index 1d422d81637..0954c3576e6 100644 --- a/test/README.travis +++ b/test/README.travis @@ -47,6 +47,7 @@ TODO list - non-x86_64 images lack installed cpanminus and don't enable caching. ppc64le builds seem unreasonably slow to install CPAN deps each time (15-20 minutes) - not sure why. s390x is enabled & seems reasonably fast. + - Testing support for arm64. * Use containers for non-Ubuntu-based Linux testing * E-mail notifications * VPATH builds diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index 94287947c13..0a8e056d46c 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -1,8 +1,39 @@ -#!/bin/bash -ex -if ! test -v SKIP_TESTING; then - svn export -q https://svn.apache.org/repos/asf/httpd/test/framework/trunk test/perl-framework +#!/bin/bash -xe + +if test -v CLEAR_CACHE; then + rm -rf $HOME/root fi +# Use a rudimental retry workflow as workaround to svn export hanging for minutes. +# Travis automatically kills a build if one step takes more than 10 minutes without +# reporting any progress. +function run_svn_export() { + local url=$1 + local revision=$2 + local dest_dir=$3 + local max_tries=$4 + + # Disable -e to allow fail/retry + set +e + + for i in $(seq 1 $max_tries) + do + timeout 60 svn export -r ${revision} --force -q $url $dest_dir + if [ $? -eq 0 ]; then + break + else + if [ $i -eq $max_tries ]; then + exit 1 + else + sleep 180 + fi + fi + done + + # Restore -e behavior after fail/retry + set -e +} + function install_apx() { local name=$1 local version=$2 @@ -39,6 +70,27 @@ function install_apx() { touch ${prefix}/.revision-is-${revision} } + +if ! test -v SKIP_TESTING; then + # The test/framework checkout is cached at ~/root/framework, which + # is copied to test/framework within the httpd build directory. + # Renew the cache here if the last-changed revision is stale. + framework=https://svn.apache.org/repos/asf/httpd/test/framework/trunk + fcache=$HOME/root/framework + frev=`svn info --no-newline --show-item last-changed-revision ${framework}` + if [ -d ${fcache} -a ! -f ${fcache}/.revision-is-${frev} ]; then + : Purging stale cache at ${fcache} + rm -rf ${fcache} + fi + + if [ ! -d ${fcache} ]; then + run_svn_export ${framework} ${frev} ${fcache} 5 + touch ${fcache}/.revision-is-${frev} + fi + + cp -a ${fcache} test/perl-framework +fi + if test -v APR_VERSION; then install_apx apr ${APR_VERSION} "${APR_CONFIG}" APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}" diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index db2917e0257..90ac2c81389 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -27,11 +27,20 @@ fi make $MFLAGS if ! test -v SKIP_TESTING; then if test -v WITH_TEST_SUITE; then - make check + make check TESTS="${TEST_ARGS}" else make install - cd test/perl-framework - perl Makefile.PL -apxs $HOME/build/httpd-root/bin/apxs - make test + pushd test/perl-framework + perl Makefile.PL -apxs $HOME/build/httpd-root/bin/apxs + make test APACHE_TEST_EXTRA_ARGS="${TEST_ARGS}" + popd + fi + if test -v LITMUS; then + pushd test/perl-framework + mkdir -p t/htdocs/modules/dav + ./t/TEST -start + litmus http://localhost:8529/modules/dav/ + ./t/TEST -stop + popd fi fi -- 2.47.3