Skip to content

Commit

Permalink
Clarify test_suite behaviour in the Platforms docs
Browse files Browse the repository at this point in the history
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 #12870.

PiperOrigin-RevId: 353293585
  • Loading branch information
philsc authored and copybara-github committed Jan 22, 2021
1 parent 59f172e commit c71697c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions site/docs/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ $ bazel build --platforms=//:myplatform //...`
$ bazel build --platforms=//:myplatform //:all`
```

Incompatible tests in a [`test_suite`](be/general.html#test_suite) are
similarly skipped if the `test_suite` is specified on the command line with
[`--expand_test_suites`](command-line-reference.html#flag--expand_test_suites).
In other words, `test_suite` targets on the command line behave like `:all` and
`...`. Using `--noexpand_test_suites` prevents expansion and causes
`test_suite` targets with incompatible tests to also be incompatible.

Explicitly specifying an incompatible target on the command line results in an
error message and a failed build.

Expand Down

0 comments on commit c71697c

Please sign in to comment.