diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-03 03:58:02 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-03 03:58:02 +0000 |
commit | c46c2bfb3f76ab61d06fb6009f369c1045b0c123 (patch) | |
tree | 4e35018ec0bdaa335b12160c0ed67c14d381f3f8 /bin | |
parent | d50dc29b95530bb7a78eb0c4ef5c7bd3ed4f2944 (diff) | |
download | ATCD-c46c2bfb3f76ab61d06fb6009f369c1045b0c123.tar.gz |
ChangeLogTag: Wed Feb 02 21:56:32 2000 David L. Levine <levine@cs.wustl.edu>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/check_build_logs | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/bin/check_build_logs b/bin/check_build_logs index 7573935101d..178ab1983c5 100755 --- a/bin/check_build_logs +++ b/bin/check_build_logs @@ -8,7 +8,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use strict; -my $usage="$0 [-l log directory] [-m mail recipient(s)]\n"; +my $usage="$0 [-l log directory] [-m mail recipient(s)] [-p purify output]\n"; #### #### Configuration parameters. @@ -29,6 +29,7 @@ $ENV{'USER'} = $ENV{'LOGNAME'}; my $log_directory = '/project/danzontmp/levine/build-logs'; my $mail_recipients = ''; +my $purify = ''; #### #### Process command line args. @@ -50,6 +51,14 @@ while ($#ARGV >= $[) { print STDERR "$0: must provide argument for -m option\n"; die $usage; } + } elsif ($ARGV[0] eq '-p') { + if ($ARGV[1] !~ /^-/) { + $purify = $ARGV[1]; + shift; + } else { + print STDERR "$0: must provide argument for -p option\n"; + die $usage; + } } elsif ($ARGV[0] eq '-?') { print "$usage"; exit; @@ -87,6 +96,30 @@ close EGREP; #### +#### Check a Purify output file for bad things. +#### +if ("$purify") { + my $found_anomaly = 0; + + open (PURIFY, "$purify") || + die "$0: unable to open $purify\n"; + while (<PURIFY>) { + if (/^[A-Z][A-Z][A-Z]:/) { + unless ($found_anomaly) { + push @output, "\n"; + push @output, "Purify detected anomalies!!!!\n"; + push @output, "See $purify:\n"; + $found_anomaly = 1; + } + + push @output, $_; + } + } + close PURIFY; +} + + +#### #### Produce output, if there were any problems. #### if ($#output == -1) { |