diff options
author | philwo <philwo@google.com> | 2017-05-02 20:25:12 +0200 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2017-05-03 10:57:08 +0200 |
commit | da21ba7a48ea4f3a1b67dbecfc3d30c93b42beac (patch) | |
tree | 8c54e7ca24108491c83015f13a75d76757d4af03 /site | |
parent | 4b7df4f24c25bb84af968234c1adebc8f56eefb0 (diff) |
Set the local CPU reservation for tests based on their "cpu:<n>" tag.
This lets users specify that their test needs a minimum of <n> CPU cores
to run and not be flaky. Example for a reservation of 4 CPUs:
sh_test(
name = "test",
size = "large",
srcs = ["test.sh"],
tags = ["cpu:4"],
)
This could also be used by remote execution strategies to tune their
resource adjustment.
RELNOTES: You can increase the CPU reservation for tests by adding a "cpu:<n>" (e.g. "cpu:4" for four cores) tag to their rule in a BUILD file. This can be used if tests would otherwise overwhelm your system if there's too much parallelism.
PiperOrigin-RevId: 154856091
Diffstat (limited to 'site')
-rw-r--r-- | site/versions/master/docs/test-encyclopedia.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/site/versions/master/docs/test-encyclopedia.html b/site/versions/master/docs/test-encyclopedia.html index b0eca8bdc2..6a9b0e85e9 100644 --- a/site/versions/master/docs/test-encyclopedia.html +++ b/site/versions/master/docs/test-encyclopedia.html @@ -332,7 +332,9 @@ resolve.</p> <h4>Other resources</h4> <p>Tests are granted at least one CPU core. Others may be available but this -is not guaranteed. Other performance aspects of this core are not specified.</p> +is not guaranteed. Other performance aspects of this core are not specified. +You can increase the reservation to a higher number of CPU cores by adding the +tag "cpu:n" (where n is a positive number) to a test rule.</p> <p>Tests may create subprocesses, but not process groups or sessions.</p> |