diff --git a/util/cron/lookForTabs.cron b/util/cron/lookForTabs.cron deleted file mode 100755 index 55e4ec3dd525..000000000000 --- a/util/cron/lookForTabs.cron +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env perl - -use Cwd 'abs_path'; -use File::Basename; - -$user = `whoami`; -chomp($user); -$mailcommand = "| mail -s \"Cron Nightly TAB check\" $user\@hpe.com"; -$cwd = abs_path(dirname(__FILE__)); -$chplhomedir = abs_path("$cwd/../.."); - -$matchfile = "$chplhomedir/match.out"; - -mysystem("export CHPL_HOME=$chplhomedir && util/devel/lookForTabs > $matchfile", "looking for tabs", 1, 1); -$matches = `wc -l $matchfile`; -chomp($matches); -if ($matches != 0) { - print "matches!\n"; - if (!exists($ENV{"CHPL_TEST_NOMAIL"}) or grep {$ENV{"CHPL_TEST_NOMAIL"} =~ /^$_$/i} ('','\s*','0','f(alse)?','no?')) { - open(MAIL, "| mail -s 'Cron Nightly TAB check' chapel_dev\@cray.com"); - open(MESSAGE, "<$matchfile"); - while () { - my($line) = $_; - print MAIL "$line"; - } - close(MAIL); - } else { - print "CHPL_TEST_NOMAIL: No mail\n"; - } -} else { - print "no matches!\n"; -} - -exit 0; - - -# -# subroutines -# - -sub mysystem { - $command = $_[0]; - $errorname = $_[1]; - $fatal = $_[2]; - $mailmsg = $_[3]; - - $status = system($command); - if ($status != 0) { - $somethingfailed = 1; - $status = $status / 256; - print "Error $_[1]: $status\n"; - - if ($mailmsg != 0) { - if (!exists($ENV{"CHPL_TEST_NOMAIL"}) or grep {$ENV{"CHPL_TEST_NOMAIL"} =~ /^$_$/i} ('','\s*','0','f(alse)?','no?')) { - open(MAIL, $mailcommand); - print MAIL "=== Summary ===================================================\n"; - print MAIL "ERROR $_[1]: $status\n"; - print MAIL "(workspace left at $tmpdir)\n"; - print MAIL "=== End Summary ===============================================\n"; - close(MAIL); - } else { - print "CHPL_TEST_NOMAIL: No $mailcommand\n"; - } - } - } - $status; -}