Francois Gouget : testbot/CheckWineTestBot: Use NotifyAdministrator() to send admin notifications.
Alexandre Julliard
julliard at winehq.org
Tue Sep 10 13:33:03 CDT 2019
Module: tools
Branch: master
Commit: db373eba1c6407bd9607a0c15b4cdba80d0a5ce2
URL: https://source.winehq.org/git/tools.git/?a=commit;h=db373eba1c6407bd9607a0c15b4cdba80d0a5ce2
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Sep 10 11:08:03 2019 +0200
testbot/CheckWineTestBot: Use NotifyAdministrator() to send admin notifications.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/scripts/CheckWineTestBot.pl | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/testbot/scripts/CheckWineTestBot.pl b/testbot/scripts/CheckWineTestBot.pl
index 3ca4fde..aa271db 100755
--- a/testbot/scripts/CheckWineTestBot.pl
+++ b/testbot/scripts/CheckWineTestBot.pl
@@ -36,6 +36,7 @@ sub BEGIN
}
use WineTestBot::Config;
+use WineTestBot::Utils;
use WineTestBot::Engine::Notify;
my $rc = 0;
@@ -47,27 +48,21 @@ if (! PingEngine())
sleep 5;
}
- open (SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq");
- print SENDMAIL <<"EOF";
-From: $RobotEMail
-To: $AdminEMail
-Subject: WineTestBot engine died
-
-EOF
+ my $Body;
if ($> != 0)
{
- print SENDMAIL "Insufficient permissions to restart the engine\n";
+ $Body = "Insufficient permissions to restart the engine\n";
$rc = 1;
}
elsif (PingEngine())
{
- print SENDMAIL "The engine was restarted successfully\n";
+ $Body = "The engine was restarted successfully\n";
}
else
{
- print SENDMAIL "Unable to restart the engine\n";
+ $Body = "Unable to restart the engine\n";
$rc = 1;
}
- close(SENDMAIL);
+ NotifyAdministrator("WineTestBot engine died", $Body);
}
exit($rc);
More information about the wine-cvs
mailing list