]> xenbits.xensource.com Git - osstest.git/commitdiff
sg-check-tested: New --pass-job= option
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 16 Sep 2015 15:48:05 +0000 (16:48 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 22 Sep 2015 15:34:10 +0000 (16:34 +0100)
Specifies that returned information should relate to a flight in which
a particular job existed and passed.  The option can be repeated if
desired (to specify flights in which _all_ those jobs passed).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch

sg-check-tested

index e503cf0e12d6c3bd4afb3308b601a3300eb28282..1a3afa3be33e5da4f73558f784a5b7ce897d8ca2 100755 (executable)
@@ -86,6 +86,16 @@ END
         my @blessings= split /\,/, $1;
         push @conds_vars, @blessings;
         push @conds, "(". (join " OR ", map { "blessing=?" } @blessings). ")";
+    } elsif (m/^--pass-job=(.*)$/) {
+        push @conds_vars, $1;
+       push @conds, <<END;
+            EXISTS
+            (SELECT 1
+               FROM jobs j
+              WHERE j.job = ?
+                AND j.flight = flights.flight
+                AND j.status = 'pass')
+END
     } elsif (m/^--print-revision=(.*)$/) {
         die if $prrev;
         $prrev= $1;