Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PERL email script name and parameter list. #26244

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions util/cron/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use FindBin;
use lib "$FindBin::Bin";

use nightlysubs;
use nightly_email;
use nightly_email_file;
# Mailing lists.
$failuremail = "chapel+tests\@discoursemail.com";
$replymail = "";
Expand Down Expand Up @@ -879,7 +879,7 @@ if ($runtests == 0) {
# FIXME: Pass correct args here!
# `$chplhomedir/util/cron/nightly_email.pl $status "$rawsummary" "$sortedsummary" "$prevsummary" "$mailer" "$nochangerecipient" "$recipient" "$subjectid" "$config_name" "$revision" "$rawlog" "$starttime" "$endtime" "$crontab" "$testdirs" $debug`;
# Write the test results to the summary log.
writeFile($status, "$rawsummary", "$sortedsummary", "$prevsummary", "$mysystemlog", "$prevmysystemlog", "", "$nochangerecipient", "$recipient", "$subjectid", "$config_name", "$revision", "$rawlog", "$starttime", "$endtime", "$crontab", "$testdirs", $debug);
nightly_email_file($status, "$rawsummary", "$sortedsummary", "$prevsummary", "$mysystemlog", "$prevmysystemlog", "$nochangerecipient", "$recipient", "$subjectid", "$config_name", "$revision", "$rawlog", "$starttime", "$endtime", "$crontab", "$testdirs", $debug);
#
# analyze memory leaks tests
#
Expand All @@ -905,4 +905,3 @@ if ($runtests == 0) {
}
}
exit 0;

40 changes: 22 additions & 18 deletions util/cron/nightly_email.pm → util/cron/nightly_email_file.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,40 @@ use lib "$FindBin::Bin";

use nightlysubs;

sub writeFile{
sub nightly_email_file{
$num_args = @_;

if ($num_args != 18) {
print "usage: nightly_email.pm \$status \$rawsummary \$sortedsummary \n";
print " \$prevsummary \$mysystemlog \$prevmysystemlog \$mailer \$nochangerecipient \$recipient \n";
if ($num_args != 17) {
print "usage: nightly_email_file.pm \$status \$rawsummary \$sortedsummary \n";
print " \$prevsummary \$mysystemlog \$prevmysystemlog \$nochangerecipient \$recipient \n";
print " \$subjectid \$config_name \$revision \$rawlog \$starttime \n";
print " \$endtime \$crontab \$testdirs \$debug\n";

print "INFO: Number of arguments is $num_args\n";
for my $i (0 .. $#_) {
print "INFO: Argument $i: $_[$i]\n";
}
exit 1;
}
my ($status, $rawsummary, $sortedsummary, ,$prevsummary, $mysystemlog, $prevmysystemlog, $mailer, $nochangerecipient, $recipient, $subjectid, $config_name, $revision, $rawlog, $starttime, $endtime, $crontab, $testdirs, $debug)=@_;
my ($status, $rawsummary, $sortedsummary, ,$prevsummary, $mysystemlog, $prevmysystemlog, $nochangerecipient, $recipient, $subjectid, $config_name, $revision, $rawlog, $starttime, $endtime, $crontab, $testdirs, $debug)=@_;

$status = $_[0];
$rawsummary = $_[1];
$sortedsummary = $_[2];
$prevsummary = $_[3];
$mysystemlog = $_[4];
$prevmysystemlog = $_[5];
$mailer = $_[6];
tzinsky marked this conversation as resolved.
Show resolved Hide resolved
$nochangerecipient = $_[7];
$recipient = $_[8];
$subjectid = $_[9];
$config_name = $_[10];
$revision = $_[11];
$rawlog = $_[12];
$starttime = $_[13];
$endtime = $_[14];
$crontab = $_[15];
$testdirs = $_[16];
$debug = $_[17];
$nochangerecipient = $_[6];
$recipient = $_[7];
$subjectid = $_[8];
$config_name = $_[9];
$revision = $_[10];
$rawlog = $_[11];
$starttime = $_[12];
$endtime = $_[13];
$crontab = $_[14];
$testdirs = $_[15];
$debug = $_[16];

# Nothing sorts the system log for us; do that now, so that 'comm' is
# given a lexically sorted input as it expects.
Expand Down Expand Up @@ -154,4 +158,4 @@ sub writeFile{

return(0);
}
return(1);
return(1);