From: Ian Jackson Date: Fri, 17 Jul 2020 17:01:13 +0000 (+0100) Subject: sg-report-flight: Provide --refer-to-flight option X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c5d1f4d78b7e1788772ff8e964652087e58d7ea2;p=osstest.git sg-report-flight: Provide --refer-to-flight option This just generates an extra heading and URL at the top of the output. In particular, it doesn't affect the algorithms which calculate regressions. Signed-off-by: Ian Jackson --- diff --git a/sg-report-flight b/sg-report-flight index 2ab1637..bcd896a 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -42,6 +42,7 @@ our $htmldir; our $want_info_headers; our ($branch, $branches_cond_q); our @allows; +our (@refer_to_flights); our (@includebeginfiles,@includefiles); open DEBUG, ">/dev/null"; @@ -66,6 +67,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) { push @includebeginfiles, $1; } elsif (m/^--include=(.*)$/) { push @includefiles, $1; + } elsif (m/^--refer-to-flight=(.*)$/) { + push @refer_to_flights, $1; } elsif (restrictflight_arg($_)) { # Handled by Executive } elsif (m/^--allow=(.*)$/) { @@ -504,6 +507,16 @@ END die unless defined $specflight; } } +sub find_refer_to_flights () { + my $ffq = $dbh_tests->prepare("SELECT * FROM flights WHERE flight=?"); + @refer_to_flights = map { + my $flight = $_; + $ffq->execute($flight); + my $row = $ffq->fetchrow_hashref(); + die "refer to flight $flight not found\n" unless $row; + { Flight => $flight, FlightInfo => $row }; + } @refer_to_flights; +} sub examineflight ($) { my ($flight) = @_; @@ -804,6 +817,10 @@ END printout_flightheader($r); + foreach my $ref_r (@refer_to_flights) { + printout_flightheader($ref_r); + } + if (defined $r->{Overall}) { bodyprint "\n"; bodyprint $r->{Overall}; @@ -1878,6 +1895,7 @@ db_retry($dbh_tests, [], sub { if (defined $mro) { open MRO, "> $mro.new" or die "$mro.new $!"; } + find_refer_to_flights(); findspecflight(); my $fi= examineflight($specflight); my @fails= justifyfailures($fi);