Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--test_output=streamed disables validation for subsequent --test_strategy flag #4178

Open
laszlocsomor opened this issue Nov 28, 2017 · 4 comments
Labels
not stale Issues or PRs that are inactive but not considered stale P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: feature request

Comments

@laszlocsomor
Copy link
Contributor

laszlocsomor commented Nov 28, 2017

Description of the problem / feature request / question:

If I use --test_output=streamed, then pass --test_strategy=X, Bazel doesn't give a warning about the invalid strategy, nor does it indicate that it'll ignore the flag.

If I change streamed to errors, or remove the --test_output flag, then Bazel correctly errors out that X is not a valid strategy.

I guess the reason is --test_output=streamed implies --test_strategy=exclusive, but unless you know this, it can be confusing to expect for example a sandboxed test execution but get an exclusive (non-sandboxed) one, without any warning from Bazel.

If possible, provide a minimal example to reproduce the problem:

  $ cat BUILD
sh_test(
    name = 'foo_test',
    srcs = ['foo_test.sh'],
)


  $ cat foo_test.sh 
#!/bin/bash


  $ bazel test //:foo_test --test_output=streamed --test_strategy=X
WARNING: Streamed test output requested. All tests will be run locally, without sharding, one at a time
INFO: Analysed target //:foo_test (0 packages loaded).
INFO: Found 1 test target...
Target //:foo_test up-to-date:
  bazel-bin/foo_test
INFO: Elapsed time: 0.168s, Critical Path: 0.00s
INFO: Build completed successfully, 1 total action
//:foo_test                                                     (cached) PASSED in 0.1s

Executed 0 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.


  $ bazel test //:foo_test --test_output=errors --test_strategy=X
ERROR: 'X' is an invalid value for test strategy. Valid values are: exclusive, experimental_worker, standalone
INFO: Elapsed time: 0.140s
FAILED: Build did NOT complete successfully (0 packages loaded)
ERROR: Couldn't start the build. Unable to run tests


  $ bazel test //:foo_test --test_strategy=X
ERROR: 'X' is an invalid value for test strategy. Valid values are: exclusive, experimental_worker, standalone
INFO: Elapsed time: 0.135s
FAILED: Build did NOT complete successfully (0 packages loaded)
ERROR: Couldn't start the build. Unable to run tests

Environment info

  • Operating System:
    Ubuntu 14.04

  • Bazel version (output of bazel info release):
    0.8.0

@philwo philwo added category: misc > testing P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request labels Dec 5, 2017
@jin jin added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed category: misc > testing labels Sep 3, 2019
@meisterT
Copy link
Member

This is still an issue.

@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2.5 years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Mar 16, 2023
@meisterT meisterT added team-Core Skyframe, bazel query, BEP, options parsing, bazelrc and removed team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website stale Issues or PRs that are stale (no activity for 30 days) labels Mar 16, 2023
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label May 20, 2024
@laszlocsomor
Copy link
Contributor Author

Still an issue with Bazel 7.1.2 and 8.0.0-pre.20240422.4

@brentleyjones brentleyjones added not stale Issues or PRs that are inactive but not considered stale and removed stale Issues or PRs that are stale (no activity for 30 days) labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not stale Issues or PRs that are inactive but not considered stale P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants