Skip to content

Commit

Permalink
Target patterns query: don't use tests(...)
Browse files Browse the repository at this point in the history
Don't query for the exact list of tests in the
target patterns, just run the query with the
user-specified patterns.

It's beneficial to run the query because it
expands target pattern wildcards like "//src/..."
but it's unnecessary to list all tests because
that'll expand test_suites and beat the purpose
of bazelbuild/bazel@088f611

Change-Id: I902a8ea5fa769f39fda836a81482d05e58af689c
  • Loading branch information
laszlocsomor committed Sep 20, 2017
1 parent 7f2a6aa commit 61b5986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jenkins/lib/src/build/bazel/ci/BazelUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class BazelUtils implements Serializable {
// Lambda are not working well with CPS, so NonCPS...
def quote = isWindows ? { s -> s.replace('"', '""') } : { s -> s.replace("'", "'\\''") }
def q = isWindows ? '"' : "'"
return "query ${q}tests(${tests.collect(quote).join(' + ')})${q}"
return "query ${q}${tests.collect(quote).join(' + ')}${q}"
}

// Execute a bazel tests
Expand Down

0 comments on commit 61b5986

Please sign in to comment.