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