From 6d40cc0cb4311d0c5aa4a106cc86a3d45a9ad86c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 28 Oct 2013 06:34:22 -0700 Subject: rcutorture: Flag errors and warnings with color coding The output of the rcutorture scripts often requires interpretation, so this commit simplifies this interpretation by tagging messages as BUGs (colored red) or WARNINGs (colored yellow). Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/parse-build.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'tools/testing/selftests/rcutorture/bin/parse-build.sh') diff --git a/tools/testing/selftests/rcutorture/bin/parse-build.sh b/tools/testing/selftests/rcutorture/bin/parse-build.sh index 2e0e9f7ebbb0..9da2c7ba3fce 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-build.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-build.sh @@ -30,18 +30,28 @@ T=$1 title=$2 +. functions.sh + if grep -q CC < $T then : else - echo $title no build + print_bug $title no build exit 1 fi -if egrep -q "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T +if grep -q "error:" < $T +then + print_bug $title build errors: + grep "error:" < $T + exit 2 +fi +exit 0 + +if egrep -q "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T then - echo $title build errors: - egrep "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T + print_warning $title build errors: + egrep "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T exit 2 fi exit 0 -- cgit v1.2.3-59-g8ed1b