bazel-lib
bazel-lib copied to clipboard
fix: Set size to a default value as well as timeout.
Currently, we are unable to run our write_source_files tests in our pre-upload checks, because we have --test_size_filter=small, and setting size will attempt to set it on both the run rule and the test rule, the former being invalid.
See here for more details.
Changes are visible to end-users: no
Test plan
- Manual testing; please provide instructions so we can reproduce:
bazel test //... --test_size_filters=small
Before: 5 tests run After: 152 tests run
I just realized a better way to do it.
Previously:
- Neither specified -> size = "medium", timeout = "short"
- Timeout only -> size = "medium", timeout = timeout
- size only -> size = size, timeout = inferred by bazel based on size
- both -> size = size, timeout = timeout
Now:
- (changed) Neither specified -> size = "small", timeout = inferred by bazel based on size (so always short)
- (changed) Timeout only -> size = "small", timeout = timeout
- size only -> size = "size", timeout = inferred by bazel based on size
- both -> size = size, timeout = timeout
Any chance we can get this merged?