Merge tag 'iwlwifi-for-john-2014-11-10' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-drm-fsl-dcu.git] / tools / testing / selftests / rcutorture / bin / parse-build.sh
1 #!/bin/bash
2 #
3 # Check the build output from an rcutorture run for goodness.
4 # The "file" is a pathname on the local system, and "title" is
5 # a text string for error-message purposes.
6 #
7 # The file must contain kernel build output.
8 #
9 # Usage: parse-build.sh file title
10 #
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, you can access it online at
23 # http://www.gnu.org/licenses/gpl-2.0.html.
24 #
25 # Copyright (C) IBM Corporation, 2011
26 #
27 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
28
29 T=$1
30 title=$2
31
32 . functions.sh
33
34 if grep -q CC < $T
35 then
36         :
37 else
38         print_bug $title no build
39         exit 1
40 fi
41
42 if grep -q "error:" < $T
43 then
44         print_bug $title build errors:
45         grep "error:" < $T
46         exit 2
47 fi
48 exit 0
49
50 if egrep -q "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T
51 then
52         print_warning $title build errors:
53         egrep "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T
54         exit 2
55 fi
56 exit 0