From: Ian Jackson Date: Thu, 19 Nov 2020 16:24:32 +0000 (+0000) Subject: sg-report-flight: Actually look at retest flights (part 1) X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f7ebab6c7b705e20d0657bec33b5c4019392ca7f;p=osstest.git sg-report-flight: Actually look at retest flights (part 1) The existing approach does not find retest flights. This is because it starts by looking for flights whose runvars say they built the version in question, and then looks to see if they contain the relevant job. Retest flights don't contain build jobs; they reuse the builds from the primary flight. Rather than making a fully general recursion scheme (which would involve adding another index so we could quickly find all flights which refer to this one), we add a one-level recursion. This recursion is restricted to the flights named on the command line. This means it takes nearly no time (as opposed to searching the whole db for things that might be relevant - see above re need for an index). We filter the command line flights, looking ones which refer to the only the primarily found flights as build jobs. Signed-off-by: Ian Jackson --- diff --git a/sg-report-flight b/sg-report-flight index 40a3cc9..70cad23 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -315,6 +315,11 @@ END # Sadly this trick is not formally documented but it is our # best option. + my $cmdline_flight_cond = + join ' OR ', + (defined $specflight ? "f1.flight=$specflight" : "FALSE"), + map { "f1.flight=$_->{Flight}" } @refer_to_flights; + my $flightsq= <