Abolish $maxflight. All the users outside Osstest::Executive have
been eliminated, so this is fine. Replace it with
$restrictflight_cond, which can accumulate multiple conditions.
There is a minor functional change: when multiple --max-flight options
are specified, _all_ of them take effect (effectively using the lowest
value). That option is not used in production, and I don't expect
people elsewhere to be passing multiple different such options.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
@EXPORT = qw(get_harness_rev grabrepolock_reexec
findtask @all_lock_tables
restrictflight_arg restrictflight_cond
- $maxflight
report_run_getinfo report_altcolour
report_blessingscond report_find_push_age_info
tcpconnect_queuedaemon plan_search
#---------- history reporting ----------
-our $maxflight;
+our $restrictflight_cond = 'TRUE';
sub restrictflight_arg ($) {
my ($arg) = @_;
if ($arg =~ m/^--max-flight\=([1-9]\d*)$/) {
- $maxflight = $1;
+ $restrictflight_cond .= " AND flight <= $1";
return 1;
} else {
return 0;
}
sub restrictflight_cond () {
- return defined($maxflight) ? "(flight <= $maxflight)" : "TRUE";
+ return "($restrictflight_cond)";
}
our $green= '#008800';