summaryrefslogtreecommitdiffstats
path: root/test/travis_run_linux.sh
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2020-07-30 16:39:01 +0200
committerJoe Orton <jorton@apache.org>2020-07-30 16:39:01 +0200
commit262a5f499d4b7414847f2bb4a8b580118896c0ad (patch)
treebdd8ac720c87e32c12853ac58638d60319164b84 /test/travis_run_linux.sh
parentUpdate some conditions. [skip ci] (diff)
downloadapache2-262a5f499d4b7414847f2bb4a8b580118896c0ad.tar.xz
apache2-262a5f499d4b7414847f2bb4a8b580118896c0ad.zip
For non-trunk run a simpler APLOGNO() test using grep which
only catches missing arguments, but this is better than nothing. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1880453 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/travis_run_linux.sh')
-rwxr-xr-xtest/travis_run_linux.sh29
1 files changed, 22 insertions, 7 deletions
diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh
index f52b5fd94a..d1925f5b2d 100755
--- a/test/travis_run_linux.sh
+++ b/test/travis_run_linux.sh
@@ -1,13 +1,28 @@
#!/bin/bash -ex
-# Test for empty APLOGNO() macro use; if the script changes
-# any files, the git diff will be non-empty and fail.
+# Test for APLOGNO() macro errors (duplicates, empty args) etc. For
+# trunk, run the updater script to see if it fails. If it succeeds
+# and changes any files (because there was a missing argument), the
+# git diff will be non-empty, so fail for that case too. For
+# non-trunk use a grep and only catch the empty argument case.
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
+ if test -f docs/log-message-tags/update-log-msg-tags; then
+ find server modules os -name \*.c | \
+ xargs perl docs/log-message-tags/update-log-msg-tags
+ git diff --exit-code .
+ : PASSED
+ exit 0
+ else
+ set -o pipefail
+ if find server modules os -name \*.c | \
+ xargs grep -C1 --color=always 'APLOGNO()'; then
+ : FAILED
+ exit 1
+ else
+ : PASSED
+ exit 0
+ fi
+ fi
fi
### Installed apr/apr-util don't include the *.m4 files but the