diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-04 16:45:19 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-04 16:45:19 +0100 |
commit | 906a05442673059039f41fd6c3769debaeea5e17 (patch) | |
tree | 6e18adc69b6f5ea8f2b3ead74f4753fed2161ee7 | |
parent | 5e54d6c126e32b82826e8b9d6992046f64914747 (diff) |
greplogs: New script for extracting interesting parts of build logs
Add a new script 'greplogs' which will look at the *.par logfiles
produced by apply-pullreq and print out the interesting parts
(ie the errors).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-x | greplogs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/greplogs b/greplogs new file mode 100755 index 0000000..c11453d --- /dev/null +++ b/greplogs @@ -0,0 +1,54 @@ +#!/bin/sh + +# This script is intended to parse the '/tmp/par*.par' logs +# that parallel-buildtest creates; just run greplogs with +# no arguments and then cut-and-paste the .par filenames +# into its standard output. +# +# A successful test run looks something like: +# Darwin manooth.archaic.org.uk 14.5.0 x86_64 +# OK DONE osx +# Linux gcc1-power7.osuosl.org 3.17.2-200.fc20.ppc64p7 ppc64 +# OK DONE ppc64be +# Linux moonshot-dsg-11 4.2.0-30-generic aarch64 +# OK DONE 64-bit ARM +# Linux moonshot-dsg-07 4.2.0-30-generic aarch64 +# OK DONE 32-bit ARM +# Linux e104462 4.4.0-31-generic x86_64 +# OK DONE x86 +# +# Problems will manifest as missing 'OK DONE' lines and/or +# error or warning messages. (These should also have resulted +# in parallel-buildtest exiting with a failure status; this +# script is (a) a sanity check on that and (b) a quick way +# to see exactly which logfile has the error messages to pass +# back to the pull request submitter.) + +# No set -e because we don't care about the fact that +# the grep exit status is nonzero if there are no matches + +echo "Expecting logfile names on standard input..." + +while read f; do + [ -e "$f" ] || continue + if ! [ -s "$f" ]; then + echo "[WARNING: $f empty!]" + continue + fi + head -1 "$f" + # Ignored warnings: + # (1) linker complaints about using getpwuid_r etc in statically linked + # applications (which happen because of a glib awkwardness where it puts + # those functions in the same .o as functions we use) + # (2) clang sanitizer runtime errors about left shifts + # [TODO these can probably be better suppressed with a ubsan flag + # now we're using a newer clang build] + # (3) a complaint about null_auth being an overridden common between + # libnfs and libc when statically linking + egrep -i '(error:|warning:|OK DONE|assert)' < "$f" | \ + grep -v 'statically linked applications' | \ + grep -v 'runtime error:.*left shift.*cannot be represented' | \ + grep -v 'runtime error:.*left shift of negative value' | \ + grep -v 'rpc_common.o.*definition of.*null_auth.*overriding common' | \ + grep -v 'libnfs.a(libnfs_la-libnfs-zdr.o): warning: common is here' +done |