]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't get the date of the build from the mail header. It is
authorFlorian Krohm <florian@eich-krohm.de>
Fri, 28 Oct 2011 02:45:15 +0000 (02:45 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Fri, 28 Oct 2011 02:45:15 +0000 (02:45 +0000)
often off-by one. Instead extract it from the message body,
namely, when the build was kicked off.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12247

auxprogs/nightly-build-summary

index e98f0e75885ef9df721feebe8775194a8d51fba4..ed3cf553f597f69d35551f541aa4bf9046ad3ca3 100755 (executable)
@@ -103,24 +103,13 @@ sub get_raw_data {
 
     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 @@ sub get_raw_data {
         }
     }
 
+# 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) {