From: Florian Krohm Date: Fri, 28 Oct 2011 02:45:15 +0000 (+0000) Subject: Don't get the date of the build from the mail header. It is X-Git-Tag: svn/VALGRIND_3_8_0~601 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7938607baead0f2fdff6bb3ee9392e0aeb495af6;p=thirdparty%2Fvalgrind.git 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. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12247 --- diff --git a/auxprogs/nightly-build-summary b/auxprogs/nightly-build-summary index e98f0e7588..ed3cf553f5 100755 --- a/auxprogs/nightly-build-summary +++ b/auxprogs/nightly-build-summary @@ -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) {