]> Pileus Git - ~andy/linux/blobdiff - tools/testing/selftests/rcutorture/bin/parse-build.sh
rcutorture: Flag errors and warnings with color coding
[~andy/linux] / tools / testing / selftests / rcutorture / bin / parse-build.sh
index 2e0e9f7ebbb0fe17c4058291b832f955c06bdb56..9da2c7ba3fce481abcdd434132fbb5848fb1ad9f 100755 (executable)
 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