]> xenbits.xensource.com Git - osstest.git/commitdiff
cr-daily-branch: Heuristics for when to do immediate retest flight
authorIan Jackson <iwj@xenproject.org>
Mon, 12 Oct 2020 15:48:26 +0000 (16:48 +0100)
committerIan Jackson <iwj@xenproject.org>
Thu, 15 Oct 2020 15:08:27 +0000 (16:08 +0100)
Do not do a retest if it would involve retesting more than 10% of the
original flight, or if it wouldn't get a push even if the retests
pass.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
cr-daily-branch

index 9b1961bda92a8da7478382d27ac539a4c21cbcb3..e54ca227d9f8abc6464847d928a7c8f8e1d07300 100755 (executable)
@@ -497,11 +497,26 @@ while true; do
        OSSTEST_IMMEDIATE_RETRY=false
        retry_jobs=$(
                perl <$mrof -wne '
+                       $n_blockers = $1 if m/^nblockers (\d+)\s*$/;
+                       $n_jobs     = $1 if m/^njobs (\d+)\s*$/;
                        next unless m/^regression (\S+) /;
                        my $j = $1;
                        next if $j =~ m/^build/;
                        $r{$j}++;
+                       sub nope {
+                               print STDERR "no retry: @_\n";
+                               exit 0;
+                       }
                        END {
+                               my $n_retry_jobs = scalar(keys %r);
+                               print STDERR <<"END";
+n_retry_jobs=$n_retry_jobs n_blockers=$n_blockers n_jobs=$n_jobs
+END
+                               nope("other blockers") if 
+                                        $n_retry_jobs < $n_blockers;
+                               nope("too many regressions") if
+                                       $n_retry_jobs > 1 &&
+                                       $n_retry_jobs > $n_jobs/10;
                                print "copy-jobs '$flight' $_ "
                                        foreach sort keys %r;
                        }'