@@ -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);