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, write to the Free Software 24# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25# 26# Copyright (C) IBM Corporation, 2011 27# 28# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> 29 30T=$1 31title=$2 32 33if grep -q CC < $T 34then 35 : 36else 37 echo $title no build 38 exit 1 39fi 40 41if egrep -q "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T 42then 43 echo $title build errors: 44 egrep "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T 45 exit 2 46fi 47exit 0 48