diff mbox

[rdma-core,2/3] travis: Do not loose ninja output if ninja fails during sparse

Message ID 20180115211347.5651-3-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Gunthorpe Jan. 15, 2018, 9:13 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

It turns out that cgcc is an older version of gcc on travis
and can produce warnings that the prior gcc runs didn't, but
due to how the output is filtered the messages are discarded
totally.

Ensure any output from ninja that is not a progress print is
displayed.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/travis-build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/buildlib/travis-build b/buildlib/travis-build
index bf86baa7432c6b..0efcbc60d18be5 100755
--- a/buildlib/travis-build
+++ b/buildlib/travis-build
@@ -30,9 +30,9 @@  cd ../build-sparse
 mv ../CMakeLists.txt ../CMakeLists-orig.txt
 grep -v "# NO SPARSE" ../CMakeLists-orig.txt > ../CMakeLists.txt
 CC=cgcc CFLAGS="-Werror" cmake -GNinja ..
-ninja > out
+ninja | grep -v '^\[' | tee out
 # sparse does not fail gcc on messages
-if grep -v '^\[' out; then
+if [ -s out ]; then
    false
 fi
 mv ../CMakeLists-orig.txt ../CMakeLists.txt