]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
cs-bisection-step: Properly handle external job refs in template
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 4 Sep 2015 10:46:37 +0000 (11:46 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 4 Sep 2015 11:08:18 +0000 (12:08 +0100)
cs-bisection-step has had, for a long time, code which is supposed to
handle the situation where the template flight contains build job
references to other flights.

However:

 - The regexp to spot these other-flight job reference runvars would
   never match because it said \s where \S was probably intended (and
   . would be better);

 - If it were to match, the flight and job arguments to the recursive
   preparejob invocation were the wrong way round.  preparejob takes
   the job name first.

Fix these two bugs.  Now it does seem to work properly.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
cs-bisection-step

index 37efbeac6c020913c36fbf96007788aaf70bec52..b6760446aa43b0149189b39a547a948621edde01 100755 (executable)
@@ -1190,8 +1190,8 @@ END
     foreach my $subjob (@$subjobs) {
         my $target;
         my $jobspec= $subjob->{val};
-        if ($jobspec =~ m/^(\d+)\.(\s+)$/) {
-            $target= preparejob($1, $2, 1);
+        if ($jobspec =~ m/^(\d+)\.(.+)$/) {
+            $target= preparejob($2, $1, 1);
         } else {
             $target= preparejob($jobspec, $copyflight, 1);
         }