From: Ian Jackson Date: Mon, 27 Jul 2020 11:22:51 +0000 (+0100) Subject: cs-bisection-step: Generalise qtxt_common_rev_ok X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0ad06e3f99e426d416fea03ab499b075ac9acec7;p=osstest.git cs-bisection-step: Generalise qtxt_common_rev_ok * Make it into a subref which takes a $table argument. * Change the two references into function calls using the @{...} syntax * Move the definition earlier in the file No change to the generated query. Signed-off-by: Ian Jackson --- v2: New patch. --- diff --git a/cs-bisection-step b/cs-bisection-step index 9a0fee3..5d4e179 100755 --- a/cs-bisection-step +++ b/cs-bisection-step @@ -182,6 +182,14 @@ END sub flight_rmap ($$) { my ($flight, $need_urls) = @_; + my $qtxt_common_rev_ok = sub { + my ($table) = @_; + [<do(<('rev') } ORDER by rev.name; @@ -262,7 +266,7 @@ $qtxt_common_tables CROSS JOIN tmp_build_info AS url WHERE -$qtxt_common_rev_condition +@{ $qtxt_common_rev_ok->('rev') } AND url.name LIKE E'tree\\_%' AND url.use = rev.use AND url.job = rev.job