Skip to content

Commit c71697c

Browse files
philsccopybara-github
authored andcommitted
Clarify test_suite behaviour in the Platforms docs
The current `test_suite` behaviour in regards to incompatible target skipping is subtle and not necessarily obvious. This patch aims to clear up some of the confusion. Closes bazelbuild#12870. PiperOrigin-RevId: 353293585
1 parent 59f172e commit c71697c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

site/docs/platforms.md

+7
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ $ bazel build --platforms=//:myplatform //...`
156156
$ bazel build --platforms=//:myplatform //:all`
157157
```
158158

159+
Incompatible tests in a [`test_suite`](be/general.html#test_suite) are
160+
similarly skipped if the `test_suite` is specified on the command line with
161+
[`--expand_test_suites`](command-line-reference.html#flag--expand_test_suites).
162+
In other words, `test_suite` targets on the command line behave like `:all` and
163+
`...`. Using `--noexpand_test_suites` prevents expansion and causes
164+
`test_suite` targets with incompatible tests to also be incompatible.
165+
159166
Explicitly specifying an incompatible target on the command line results in an
160167
error message and a failed build.
161168

0 commit comments

Comments
 (0)