From: Ian Jackson Subject: [OSSTEST PATCH 5/5] Emails: Provide X-Osstest-Failures Date: Tue, 30 Jun 2015 14:49:08 +0100 Message-ID: <1435672148-6183-6-git-send-email-ian.jackson@eu.citrix.com> References: <1435672148-6183-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z9vue-0007zL-EQ for xen-devel@lists.xenproject.org; Tue, 30 Jun 2015 13:49:24 +0000 In-Reply-To: <1435672148-6183-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Specifically: * $cat now contains SORTLETTER BLOCKSTATUS DESCRIPTION... * Rewrap the lines setting $cat * Add $notsucceeds{$cat}[][2] containing one line for the new header * Generate the new header * Document the new header Signed-off-by: Ian Jackson --- README.email | 21 +++++++++++++++++++++ sg-report-flight | 26 +++++++++++++++++++------- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/README.email b/README.email index be79f88..6dc992a 100644 --- a/README.email +++ b/README.email @@ -112,6 +112,27 @@ Email information headers Test report emails sent by osstest have some extra information in the email headers, where applicable: +X-Osstest-Failures: + osstest:test-armhf-armhf-xl-midway:guest-start:fail:heisenbug + osstest:test-amd64-amd64-xl-rtds:xen-boot:fail:blocked + ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^ ^^^^^^^ + branch job | | | + step testid | analysis + | + step status + +The `analysis' field may be: + + regression "Tests which did not succeed and are blocking" + heisenbug "Tests which are failing intermittently (not blocking)" + allowable "Regressions which are regarded as allowable" + nonblocking "Tests which did not succeed, but are not blocking" + fail "Tests which did not succeed" (non-regression-test flights) + +When using email filtering, you should filter on the relevant From: +line as well as X-Osstest-Failures, as there is nothing in +X-Osstest-Failures identifying the instance. + X-Osstest-Versions-This: osstest=cc8b79ce9586d2b0fbddbd4260e876eab1d408d4 X-Osstest-Versions-That: diff --git a/sg-report-flight b/sg-report-flight index 76d6ab7..a5b9e6c 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -587,18 +587,21 @@ END my $heisenflightp= $failv->{Flight} != $specflight; print DEBUG "PRINTOUT ",Dumper($failv); if (!keys %{ $specver{that} }) { - $cat= "A Tests which did not succeed,\n". + $cat= "A fail ". +"Tests which did not succeed,\n". "including tests which could not be run:"; } elsif ($failv->{Blocker}) { - $cat= "A Tests which did not succeed and are blocking,\n". + $cat= "A regression ". +"Tests which did not succeed and are blocking,\n". "including tests which could not be run:"; } elsif ($failv->{Heisen}) { - $cat= "K Tests which are failing intermittently (not blocking):"; + $cat= "K heisenbug ". +"Tests which are failing intermittently (not blocking):"; } elsif ($failv->{Allow}) { - $cat= "M ". + $cat= "M allowable ". "Regressions which are regarded as allowable (not blocking):"; } else { - $cat= "P ". + $cat= "P nonblocking ". "Tests which did not succeed, but are not blocking:"; } my $heisencat= \$heisenreported_jobstep{"$j->{job} $s->{testid}"}; @@ -614,13 +617,22 @@ END $text =~ s/ *$//; while (length($text) > $cw) { last unless $text =~ s/(.* ) /$1/; } - push @{ $notsucceeds{$cat} }, [ "$s->{status} $xstatus", $text ]; + $cat =~ m/\w+ (\S+) / or die "$cat ?"; + my $blockstatus = $1; + + push @{ $notsucceeds{$cat} }, [ + "$s->{status} $xstatus", + $text, + "$branch:$j->{job}:$s->{testid}:$s->{status}:$blockstatus", + ]; } + headerprint "X-Osstest-Failures:\n" if %notsucceeds; foreach my $cat (sort keys %notsucceeds) { - $cat =~ m/^\w+ / or die; + $cat =~ m/^\w+ \S+ / or die; bodyprint "\n$'\n"; foreach (sort { $a->[0] cmp $b->[0] } @{ $notsucceeds{$cat} }) { bodyprint $_->[1], "\n"; + headerprint " $_->[2]\n"; } } -- 1.7.10.4