|
From: <sv...@va...> - 2011-10-28 02:50:12
|
Author: florian
Date: 2011-10-28 03:45:15 +0100 (Fri, 28 Oct 2011)
New Revision: 12247
Log:
Don't get the date of the build from the mail header. It is
often off-by one. Instead extract it from the message body,
namely, when the build was kicked off.
Modified:
trunk/auxprogs/nightly-build-summary
Modified: trunk/auxprogs/nightly-build-summary
===================================================================
--- trunk/auxprogs/nightly-build-summary 2011-10-28 00:11:44 UTC (rev 12246)
+++ trunk/auxprogs/nightly-build-summary 2011-10-28 02:45:15 UTC (rev 12247)
@@ -103,24 +103,13 @@
my %hash = ();
-# 1) Get the date from the mail header. This comes first
- for ($i = 0; $i < $n; ++$i) {
- $line = $lines[$i];
-
- if ($line =~ /^Date:/) {
- $date = (split(/ /, $line))[1];
- last;
- }
- }
- die "no date found in message $msgno" if ($i == $n);
-
-# 2) Locate the section with the info about the environment of this nightly run
+# 1) Locate the section with the info about the environment of this nightly run
for ($i = $i + 1; $i < $n; ++$i) {
last if ($lines[$i] =~ /^valgrind revision:/);
}
die "no info block in message $msgno" if ($i == $n);
-# 3) Read the info about the build: compiler, valgrind revision etc.
+# 2) Read the info about the build: compiler, valgrind revision etc.
# and put it into a hash.
for ( ; $i < $n; ++$i) {
$line = $lines[$i];
@@ -137,6 +126,19 @@
}
}
+# 3) Get the date from when the build was kicked off.
+ for ( ; $i < $n; ++$i) {
+ $line = $lines[$i];
+
+ if ($line =~ /^Started at[ ]+([^ ]+)/) {
+ $date = $1;
+ print "DATE = $date\n";
+ last;
+ }
+ }
+ die "no date found in message $msgno" if ($i == $n);
+
+
# 4) Find out if the regression run failed or passed
$hash{"failures"} = [];
for ($i = $i + 1; $i < $n; ++$i) {
|