]> xenbits.xensource.com Git - osstest.git/commitdiff
Flight restriction: Make report_blessingscond use implicit $maxflight
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 23 Jul 2015 16:54:53 +0000 (17:54 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 28 Jul 2015 14:30:21 +0000 (15:30 +0100)
We have $maxflight in Osstest::Executive now, set appropriately.

Use that in report_blessingscond and all its callers including
report_find_push_age_info and hence in mg-all-branch-statuses and
sg-report-flight and sg-report-job-history.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Osstest/Executive.pm
mg-all-branch-statuses
sg-report-flight
sg-report-job-history

index 05a7268a0c8c8c13ea75aa6cfc105fc60036e522..a1bc0ad1e985b55a73c96e360a59639925d746df 100644 (file)
@@ -277,20 +277,19 @@ sub report_altcolour ($) {
     return "bgcolor=\"#".(qw(d0d0d0 ffffff))[$bool]."\"";
 }
 
-sub report_blessingscond ($$) {
-    my ($blessings, $maxflight) = @_;
+sub report_blessingscond ($) {
+    my ($blessings) = @_;
+    my $flightcond= restrictflight_cond();
     my $blessingscond= '('.join(' OR ', map {
        die if m/[^-_.0-9a-z]/;
        "blessing='$_'"
                                } @$blessings).')';
-    if (defined $maxflight) {
-       $blessingscond= "( flight <= $maxflight AND $blessingscond )";
-    }
+    return "( $flightcond AND $blessingscond )";
     return $blessingscond;
 }
 
-sub report__find_test ($$$$$$$$) {
-    my ($blessings, $maxflight, $branches, $tree,
+sub report__find_test ($$$$$$$) {
+    my ($blessings, $branches, $tree,
        $revision, $selection, $extracond, $sortlimit) = @_;
     # Reports information about a flight which tried to test $revision
     # of $tree.  ($revision may be undef);
@@ -332,7 +331,7 @@ END
 END
     }
 
-    my $blessingscond = report_blessingscond($blessings,$maxflight);
+    my $blessingscond = report_blessingscond($blessings);
     $querytext .= <<END;
          AND $blessingscond
 END
@@ -354,8 +353,8 @@ END
     return $row;
 }
 
-sub report_find_push_age_info ($$$$$$) {
-    my ($blessings, $maxflight, $branches, $tree,
+sub report_find_push_age_info ($$$$$) {
+    my ($blessings, $branches, $tree,
        $basis_revision, $tip_revision) = @_;
     # Reports information about tests of $tree.
     # (Subject to @$blessings, $maxflight, @$branches)
@@ -377,7 +376,7 @@ sub report_find_push_age_info ($$$$$$) {
 
     my $findtest = sub {
        my ($revision,$selection,$extracond,$sortlimit) = @_;
-       report__find_test($blessings,$maxflight,$branches,$tree,
+       report__find_test($blessings,$branches,$tree,
                         $revision,$selection,$extracond,$sortlimit);
     };
 
index 8b86e3b991e192877a5ff506849742d2240b73cd..bba7216f000ae35ffbc8466a5d81cf1ae1953272 100755 (executable)
@@ -53,7 +53,7 @@ gather_info()
        my ($branch,$tree,$basis,$tip) = @ARGV;
        print DEBUG "branch=$branch tree=$tree basis=$basis tip=$tip\n";
        my $info = report_find_push_age_info([qw(real adhoc play)],
-                                             undef, [($branch)],
+                                             [($branch)],
                                              $tree, $basis, $tip);
        print DEBUG Dumper $info;
        my $onevar = sub {
index bdfbfb65b9fe234122cf35aa505ca065fc1469b8..78c91dabe40254348720f07854d762b596c2da07 100755 (executable)
@@ -128,7 +128,7 @@ our $cw= 79;
 our $tl= 20;
 our $htmlleaf= "info.html";
 
-our $blessingscond= report_blessingscond(\@blessings, $maxflight);
+our $blessingscond= report_blessingscond(\@blessings);
 
 sub displayflightnum ($) {
     my ($flight) = @_;
@@ -523,7 +523,7 @@ sub print_pushgate_summary () {
     my $tree = $thistree[0];
 
     my $info = report_find_push_age_info(
-       [ $blessings[0] ], $maxflight, [ $branch ],
+       [ $blessings[0] ], [ $branch ],
        $tree, $specver{that}{$tree}, $specver{this}{$tree}
        );
     bodyprint "\n";
index ec2776bf2126cb724474d57c9da4bef1522f4b9f..e8cf50fbd19640428b689c45cb36a53e55bd434e 100755 (executable)
@@ -119,7 +119,7 @@ sub processjobbranch ($$) {
     my @rev_grid_cols;
     my @test_rows;
 
-    my $blessingscond= report_blessingscond(\@blessings, $maxflight);
+    my $blessingscond= report_blessingscond(\@blessings);
     my $cond = "job = ? AND $blessingscond";
     my (@params) = ($j);
     if (defined $bra) {