]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
ts-hosts-allocate-Executive: Do not prefer fast hosts for tests
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 11 Nov 2014 18:30:56 +0000 (18:30 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 17 Nov 2014 17:32:10 +0000 (17:32 +0000)
Introduce $duration_for_cost and set it to the previous formula for
build jobs, or 0 for test jobs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
ts-hosts-allocate-Executive

index 67b8891c2a0dcf162966f2c6c717533484c08dea..fc54cdafb5211616156d2e17c587a53f62bf2772 100755 (executable)
@@ -496,15 +496,16 @@ sub hid_recurse ($$) {
 
     $duration_rightaway_adjust=0 if $start_time;
 
+    my $duration_for_cost = 0;
     if ($jobinfo->{recipe} =~ m/build/) {
         $variation_age= 0;
+       $duration_for_cost= $duration + $duration_rightaway_adjust;
     } elsif ($variation_age > 5*86400) {
        $variation_age= 5*86400;
     }
 
     my $cost= $start_time
-       + $duration
-       + $duration_rightaway_adjust
+       + $duration_for_cost
         - $previously_failed * 366*86400
         + ($previously_failed ? + $variation_age * 10 : - $variation_age / 30)
        - $share_reuse * 10000;