]> xenbits.xensource.com Git - osstest.git/commitdiff
cs-bisection-step: Break out qtxt_common_ok
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 31 Jul 2020 11:06:41 +0000 (12:06 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 6 Aug 2020 09:23:19 +0000 (10:23 +0100)
Make this bit of query into a subref which takes a $table argument.

No change to the generated query.

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

cs-bisection-step

index f11726aa9e01edfe35b57c20f06b888c459a68d5..ba0c642411e0a55836f4217cc0b5150b88640888 100755 (executable)
@@ -190,6 +190,13 @@ sub flight_rmap ($$) {
 END
     };
 
+    my $qtxt_common_tree_ok = sub {
+       my ($table) = @_;
+       [<<END];
+             $table.name LIKE E'tree\\_%'
+END
+    };
+
     $dbh_tests->do(<<END, {});
           CREATE TEMP TABLE tmp_build_info (
               use varchar NOT NULL,
@@ -267,7 +274,7 @@ $qtxt_common_tables
 
            WHERE
 @{ $qtxt_common_rev_ok->('rev') } AND
-                 url.name LIKE E'tree\\_%'
+@{ $qtxt_common_tree_ok->('url') }
             AND  url.use = rev.use
             AND  url.job = rev.job
             AND (rev.name = 'built_revision_' || substr(url.name,6) OR