LIMIT 1000
),
retest_flights AS (
- SELECT DISTINCT f1.flight flight, f1.blessing blessing
+ SELECT DISTINCT
+ f1.flight flight,
+ f0.flight xflight,
+ f1.blessing blessing
FROM flights f1
- JOIN jobs j USING (flight)
+ JOIN jobs j USING (flight)
CROSS JOIN relevant_flights f0
WHERE ($cmdline_flight_cond)
AND (
AND r.name LIKE '%buildjob'
)
)
- SELECT flight, jobs.status
+ SELECT flight, xflight, jobs.status
FROM (
- SELECT * FROM relevant_flights
- UNION SELECT * FROM retest_flights
+ SELECT flight, flight xflight, blessing FROM relevant_flights
+ UNION SELECT flight, xflight, blessing FROM retest_flights
) all_relevant_flights
$flightsq_jobs_join
WHERE (1=1)
WHERE flight=?
END
- while (my ($tflight, $tjstatus) = $flightsq->fetchrow_array) {
+ while (my ($tflight, $xflight, $tjstatus) = $flightsq->fetchrow_array) {
# Recurse from the starting flight looking for relevant build
# jobs. We start with all jobs in $tflight, and for each job
# we also process any other jobs it refers to in *buildjob runvars.
# actually interested in (ii) the kind of continuous update
# thing seen with freebsdbuildjob.
#
+ # However, when we are looking at a retest flight (offered to
+ # us with --refer-to-flights, or found because it was
+ # specified on the command line) we look at its build flight;
+ # that's what $xflight is;
+ #
# (This is rather different to cs-bisection-step, which is
# less focused on changes in a particular set of trees.)
#
while (@binfos_todo) {
my ($why,$bflight,$bjob) = @{ shift @binfos_todo };
next if $binfos{$bflight}{$bjob};
- next unless $bflight == $tflight;
+ next unless $bflight == $tflight || $bflight == $xflight;
$binfos{$bflight}{$bjob} = $why;
$buildjobsq->execute($bflight,$bjob);
$binfos_queue->($bflight,$buildjobsq,$why);