|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 4/5] Emails: Provide X-Osstest-Versions-This and That headers
Specifically:
* Provide headerprint() in sg-report-flight
* Use it to add X-Osstest-Versions headers based on %specver
* Cause cr-daily-branch to always enable the feature
* Document this in README.email
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
README.email | 14 ++++++++++++++
cr-daily-branch | 2 +-
sg-report-flight | 10 ++++++++++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/README.email b/README.email
index 3f95fa8..be79f88 100644
--- a/README.email
+++ b/README.email
@@ -104,3 +104,17 @@ history. Here are some examples:
The flight numbers quoted in these step failure summaries may
sometimes be suffixed with `-bisect' to show that the indicated flight
was part of a bisection attempt, rather than a main test flight.
+
+
+Email information headers
+-------------------------
+
+Test report emails sent by osstest have some extra information in the
+email headers, where applicable:
+
+X-Osstest-Versions-This:
+ osstest=cc8b79ce9586d2b0fbddbd4260e876eab1d408d4
+X-Osstest-Versions-That:
+ osstest=280a18b2b2612174e473a1c1a137ddd47c49aab9
+ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ tree revision
diff --git a/cr-daily-branch b/cr-daily-branch
index c7d1071..34b6d2b 100755
--- a/cr-daily-branch
+++ b/cr-daily-branch
@@ -246,7 +246,7 @@ $DAILY_BRANCH_POSTMAKE_HOOK
heading=tmp/$flight.heading-info
: >$heading
-sgr_args+=" --include-begin=$heading"
+sgr_args+=" --info-headers --include-begin=$heading"
if $force_baseline; then
subject_prefix="[$branch baseline test] "
diff --git a/sg-report-flight b/sg-report-flight
index bfc8787..76d6ab7 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -37,6 +37,7 @@ our %specver;
our (@blessings, @branches_also);
our $mro;
our $htmldir;
+our $want_info_headers;
our ($branch, $branches_cond_q);
our @allows;
our (@includebeginfiles,@includefiles);
@@ -56,6 +57,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
open MRO, "> $mro.new" or die "$mro.new $!";
} elsif (m/^--html-dir=(.*)$/) {
$htmldir= $1;
+ } elsif (m/^--info-headers$/) {
+ $want_info_headers = 1;
} elsif (m/^--blessings?=(.*)$/) {
push @blessings, split ',', $1;
} elsif (m/^--branches-also?=(.*)$/) {
@@ -496,11 +499,18 @@ our $body_text;
sub bodyprint { $body_text .= $_ foreach @_; }
sub bodyprintf { my $fmt = shift @_; $body_text .= sprintf $fmt, @_; }
+sub headerprint {
+ return unless $want_info_headers;
+ $header_text .= $_ foreach @_;
+}
+
sub printversions ($) {
my ($thisthat) = @_;
my ($sv) = $specver{$thisthat};
+ headerprint "X-Osstest-Versions-\u$thisthat:\n" if %$sv;
foreach my $k (sort keys %$sv) {
bodyprintf " %-${tl}s %s\n", $k, $sv->{$k};
+ headerprint " $k=$sv->{$k}\n";
print MRO "version $thisthat $k $sv->{$k}\n" or die $!;
}
}
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |