|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 3/5] cs-bisection-step: Refactor $subjobs calculations a bit
Parse the runvar name earlier, adding job and orgflight members to the
row hashes we got from the db. This slightly unifies the call to
preparejob, but more relevantly, makes the effective job and flight
information available earlier. That will be useful in a moment.
No functional change.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
cs-bisection-step | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/cs-bisection-step b/cs-bisection-step
index 0d0e08f..01ee6e5 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -1197,6 +1197,17 @@ END
my $subjobs= $jobq->fetchall_arrayref( {} );
$jobq->finish();
+ foreach my $subjob (@$subjobs) {
+ my $jobspec= $subjob->{val};
+ if ($jobspec =~ m/^(\d+)\.(.+)$/) {
+ $subjob->{job} = $2;
+ $subjob->{orgflight} = $1;
+ } else {
+ $subjob->{job} = $jobspec;
+ $subjob->{orgflight} = $copyflight;
+ }
+ }
+
# See if there's a build we can reuse
my ($recipe) = $dbh_tests->selectrow_array(<<END,{}, $copyflight,$popjob);
@@ -1277,12 +1288,7 @@ END
END
foreach my $subjob (@$subjobs) {
my $target;
- my $jobspec= $subjob->{val};
- if ($jobspec =~ m/^(\d+)\.(.+)$/) {
- $target= preparejob($2, $1, 1);
- } else {
- $target= preparejob($jobspec, $copyflight, 1);
- }
+ $target= preparejob($subjob->{job}, $subjob->{orgflight}, 1);
$jobsetq->execute($target, $popflight, $popjob, $subjob->{name});
}
$jobsetq->finish();
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |