@EXPORT = qw(get_harness_rev grabrepolock_reexec
findtask @all_lock_tables
report_run_getinfo report_altcolour
+ report_blessingscond
tcpconnect_queuedaemon plan_search
alloc_resources alloc_resources_rollback_begin_work
resource_check_allocated resource_shared_mark_ready
return "bgcolor=\"#".(qw(d0d0d0 ffffff))[$bool]."\"";
}
+sub report_blessingscond ($$) {
+ my ($blessings, $maxflight) = @_;
+ my $blessingscond= '('.join(' OR ', map {
+ die if m/[^-_.0-9a-z]/;
+ "blessing='$_'"
+ } @$blessings).')';
+ if (defined $maxflight) {
+ $blessingscond= "( flight <= $maxflight AND $blessingscond )";
+ }
+ return $blessingscond;
+}
+
#---------- host (and other resource) allocation ----------
our $taskid;
our $tl= 20;
our $htmlleaf= "info.html";
-our $blessingscond= '('.join(' OR ', map { "blessing=?" } @blessings).')';
-
-if (defined $maxflight) {
- $blessingscond= "( flight <= $maxflight AND $blessingscond )";
-}
+our $blessingscond= report_blessingscond(\@blessings, $maxflight);
sub displayflightnum ($) {
my ($flight) = @_;
ORDER BY blessing ASC, flight DESC
END
$flightsq= db_prepare($flightsq);
- $flightsq->execute(@flightsq_params, @blessings);
+ $flightsq->execute(@flightsq_params);
my $buildflightsq= db_prepare(<<END);
SELECT val FROM runvars
next;
}
- $anypassq->execute($j->{job}, $s->{testid}, @blessings);
+ $anypassq->execute($j->{job}, $s->{testid});
if (!$anypassq->fetchrow_hashref()) {
print MRO "never-passed $j->{job} $s->{testid} $st\n";
print DEBUG " never passed\n";