@@ -374,8 +374,8 @@ sub flight_otherjob ($$) {
confess "$otherflightjob ?";
}
-sub other_revision_job_suffix ($$) {
- my ($jobfield, $separator) = @_;
+sub other_revision_job_suffix ($$$) {
+ my ($jobfield, $refrunvar, $separator) = @_;
return <<END
(CASE
WHEN ($jobfield) LIKE 'build-%-prev' THEN '${separator}prev'
@@ -386,7 +386,7 @@ END
sub main_revision_job_cond ($) {
my ($jobfield) = @_;
- return "(${\ other_revision_job_suffix($jobfield,'x') } = '')";
+ return "(${\ other_revision_job_suffix($jobfield,'x','x') } = '')";
}
sub get_harness_rev () {
@@ -232,7 +232,7 @@ END
SELECT url.val AS uval,
rev.val AS rval,
url.job AS job,
- ${\ other_revision_job_suffix('url.job',' ') } AS othrev,
+ ${\ other_revision_job_suffix('url.job','url.use',' ') } AS othrev,
url.name AS longname
FROM tmp_build_info AS rev
@@ -1135,9 +1135,9 @@ our %jobs_created;
our %builds_investigated; # $builds_investigated{$popjob} = 0, or {..row..}
our %recursion_track;
-sub preparejob ($$$);
-sub preparejob ($$$) {
- my ($popjob, $copyflight, $cacheok) = @_;
+sub preparejob ($$$$);
+sub preparejob ($$$$) {
+ my ($popjob, $copyflight, $refrunvar, $cacheok) = @_;
# runs in db_retry qw(flights)
if (exists $jobs_created{$popjob}) {
@@ -1168,13 +1168,13 @@ END
SELECT name FROM runvars
WHERE flight=? AND job=?
AND name = ?
- AND ${\ other_revision_job_suffix('job',' ') } = ?
+ AND ${\ other_revision_job_suffix('job','?',' ') } = ?
END
foreach (my $i=0; $i<@treeinfos; $i++) {
my $name= $treeinfos[$i]{Name};
my $othrev = $name =~ s{ (.+)$}{} ? $1 : '';
my $treevar= 'tree_'.$name;
- $treeq->execute($copyflight, $popjob, $treevar, $othrev);
+ $treeq->execute($copyflight, $popjob, $treevar, $refrunvar, $othrev);
my ($treerow) = $treeq->fetchrow_array();
$treeq->finish();
next unless defined $treerow;
@@ -1312,7 +1312,8 @@ END
print STDERR "Reusing $target for $subjob->{name}".
" in $popflight.$popjob\n";
} else {
- $target= preparejob($subjob->{job}, $subjob->{orgflight}, 1);
+ $target= preparejob($subjob->{job}, $subjob->{orgflight},
+ $subjob->{name}, 1);
}
$jobsetq->execute($target, $popflight, $popjob, $subjob->{name});
}
@@ -1339,7 +1340,7 @@ END
db_retry($popflight,'constructing', $dbh_tests,[qw(flights)], sub {
print STDERR "Populating $popflight...\n";
undef %jobs_created;
- preparejob($job, $latest_flight, 0);
+ preparejob($job, $latest_flight, '', 0);
foreach my $hostspec (split /,/, $hosts) { # /
$hostspec =~ m/=/;
$addvar->execute($popflight, $job, $`, $'); # '
We are going to need this to sort out bisection for freebsd's recursive builds. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> --- Osstest.pm | 6 +++--- cs-bisection-step | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-)