]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Travis changes:
authorJoe Orton <jorton@apache.org>
Tue, 30 Jun 2020 14:24:43 +0000 (14:24 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 30 Jun 2020 14:24:43 +0000 (14:24 +0000)
a) add job to check for empty APLOGNO() macros
b) don't install CPAN stuff if SKIP_TESTING is set
c) don't tail the error_log on test suite failure since it's almost
   always irrelevant shutdown stuff and obscures the actual failures
d) use coloured grep output when showing segfaults to make them obvious in the
   travis error_log output.
   e.g. https://travis-ci.org/github/apache/httpd/jobs/703517978#L2537

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879370 13f79535-47bb-0310-9956-ffa450edef68

.travis.yml
test/travis_run_linux.sh

index b2d4e9608fc20fc75a75d81cf57cd009dd7928f4..14d00d74d83283aaa3da82603dd413e42e5b0a2c 100644 (file)
@@ -43,6 +43,9 @@ jobs:
   include:
     - name: Linux Ubuntu, Default module set
     # -------------------------------------------------------------------------
+    - name: Empty APLOGNO() test
+      env: SKIP_TESTING=1 TEST_LOGNO=1
+    # -------------------------------------------------------------------------
     - name: Linux s390x Ubuntu, all-modules
       arch: s390x
       env: CONFIG="--enable-mods-shared=reallyall"
@@ -296,7 +299,7 @@ jobs:
 # CC=gcc, e.g. for the CC="gcc -m32" case the builds are not correct
 # otherwise.
 before_install:
-  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
+  - if [ "$TRAVIS_OS_NAME" = "linux" -a ! -v SKIP_TESTING ]; then
         cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib);
         CC=gcc cpanm --notest Net::SSL LWP::Protocol::https ExtUtils::Embed Test::More AnyEvent DateTime HTTP::DAV Protocol::HTTP2::Client FCGI Apache::Test;
     fi
index 818e39a504caa7083cac30a2829b486e506ea862..109494b1678fe54c1e330f4b357a29cd5dde3425 100755 (executable)
@@ -1,4 +1,15 @@
 #!/bin/bash -ex
+
+# Test for empty APLOGNO() macro use; if the script changes
+# any files, the git diff will be non-empty and fail.
+if test -v TEST_LOGNO; then
+    find server modules os -name \*.c | xargs perl \
+               docs/log-message-tags/update-log-msg-tags
+    git diff --exit-code .
+    : PASSED
+    exit 0
+fi
+
 ### Installed apr/apr-util don't include the *.m4 files but the
 ### Debian packages helpfully install them, so use the system APR to buildconf
 ./buildconf --with-apr=/usr/bin/apr-1-config ${BUILDCONFIG}
@@ -75,7 +86,7 @@ if ! test -v SKIP_TESTING; then
     fi
 
     if grep -q 'Segmentation fault' test/perl-framework/t/logs/error_log; then
-        grep -C5 'Segmentation fault' test/perl-framework/t/logs/error_log
+        grep --color=always -C5 'Segmentation fault' test/perl-framework/t/logs/error_log
         RV=2
     fi
 
@@ -88,13 +99,9 @@ if ! test -v SKIP_TESTING; then
     # malloc errors are detected.  This should get caught by the
     # segfault grep above, but in case it is not, catch it here too:
     if grep 'glibc detected' test/perl-framework/t/logs/error_log; then
-        grep -C20 'glibc detected' test/perl-framework/t/logs/error_log
+        grep --color=always -C20 'glibc detected' test/perl-framework/t/logs/error_log
         RV=4
     fi
 
-    if test $RV -ne 0 -a -r test/perl-framework/t/logs/error_log; then
-        tail -n200 test/perl-framework/t/logs/error_log
-    fi
-
     exit $RV
 fi