From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30319 invoked by alias); 7 Apr 2009 14:17:53 -0000 Received: (qmail 30296 invoked by uid 22791); 7 Apr 2009 14:17:51 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from vexpert.dbai.tuwien.ac.at (HELO vexpert.dbai.tuwien.ac.at) (128.131.111.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Apr 2009 14:17:47 +0000 Received: from acrux.dbai.tuwien.ac.at (acrux [128.131.111.60]) by vexpert.dbai.tuwien.ac.at (Postfix) with ESMTP id BA9A639120; Tue, 7 Apr 2009 16:17:44 +0200 (CEST) Received: by acrux.dbai.tuwien.ac.at (Postfix, from userid 1203) id EA64110059; Tue, 7 Apr 2009 16:17:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by acrux.dbai.tuwien.ac.at (Postfix) with ESMTP id DA2B81003D; Tue, 7 Apr 2009 16:17:46 +0200 (CEST) Date: Tue, 07 Apr 2009 14:17:00 -0000 From: Gerald Pfeifer To: gcc-patches@gcc.gnu.org cc: Alexandre Oliva Subject: test_summary: Only include LAST_UPDATED if it exists. Message-ID: User-Agent: Alpine 1.99 (LSU 1142 2008-08-13) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg00523.txt.bz2 I got sufficiently annoyed by the error message of my nightly tester complaining about LAST_UPDATED not existing that I brushed up my AWK a bit a whipped up the patch below. Tested by running the script as is and using a filename that exists on my system. Unless someone has any issue with this, or a suggestion I plan on committing this in some two days. Gerald 2009-04-05 Gerald Pfeifer * test_summary: Only include LAST_UPDATED if it exists. Complete copyright years. Index: test_summary =================================================================== --- test_summary (revision 145616) +++ test_summary (working copy) @@ -1,6 +1,7 @@ #! /bin/sh -# (C) 1998, 1999, 2000, 2002 Free Software Foundation +# (C) 1998, 1999, 2000, 2002, 2003, 2004, 2003, 2004, 2007, 2009 +# Free Software Foundation # Originally by Alexandre Oliva # This script is Free Software, and it can be copied, distributed and @@ -106,9 +107,11 @@ sub(/^s,@TOPLEVEL_CONFIGURE_ARGUMENTS@,/, "", configflags); srcdir = configflags; sub(/\/configure .*/, "", srcdir); - printf "LAST_UPDATED: "; - system("tail -1 " srcdir "/LAST_UPDATED"); - print ""; + if ( system("test -f " srcdir "/LAST_UPDATED") == 0 ) { + printf "LAST_UPDATED: "; + system("tail -1 " srcdir "/LAST_UPDATED"); + print ""; + } sub(/^[^ ]*\/configure */, " ", configflags); sub(/,;t t $/, " ", configflags);