You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WillEngFlow opened this issue
Jul 19, 2022
· 4 comments
Assignees
Labels
coverageP4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)team-CoreSkyframe, bazel query, BEP, options parsing, bazelrctype: buguntriaged
Adding the --bes_backend flag to Bazel appears to alter the end status of an invocation running the coverage command.
It appears as if the existence of the flag changes the build from successful INFO: Build completed successfully, 1 total action
to an error ERROR: No test targets were found, yet testing was requested
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run all commands inside https://github.com/bazelbuild/examples under the {root}/java-tutorial/ directory.
An actual BES is not necessary to repro so the timeout is set to a very short period (10ms) and the BES failure is ignored.
Run bazel --nohome_rc --noworkspace_rc coverage --bes_timeout=10ms
Note the end status is INFO: Build completed successfully, 1 total action
Run bazel --nohome_rc --noworkspace_rc coverage --bes_backend=grpcs://foo.bar --bes_timeout=10ms
Note the end status is ERROR: No test targets were found, yet testing was requested
This error can also be reproduced using the --build_event_json flag: bazel --nohome_rc --noworkspace_rc coverage
vs bazel --nohome_rc --noworkspace_rc coverage --build_event_json_file=foo.json
Which operating system are you running Bazel on?
Ubuntu 20.04.4
What is the output of bazel info release?
release 5.2.0
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
$ git remote get-url origin
https://github.com/bazelbuild/examples
$ git rev-parse main
5a8696429e36090a75eb6fee4ef4e91a3413ef13
$ git rev-parse HEAD
5a8696429e36090a75eb6fee4ef4e91a3413ef13
### Have you found anything relevant by searching the web?
Found nothing.
### Any other information, logs, or outputs that you want to share?
N/A
The text was updated successfully, but these errors were encountered:
team-Core doesn't own coverage specifically, so if the behavior here is due to an implementation in coverage we probably ought not be responsible for fixing it. But we do own BES/BEP and can definitely at least try to debug and give an assessment. @michaeledgar can you please do that?
bazel --nosystem_rc --nohome_rc --noworkspace_rc test --build_event_json_file=foo.json
INFO: Analyzed 0 targets (0 packages loaded, 0 targets configured).
INFO: Found 0 test targets...
INFO: Elapsed time: 0.098s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: No test targets were found, yet testing was requested
INFO: Build Event Protocol files produced successfully.
INFO: Build completed successfully, 1 total action
I actually think that the output with --build_event_json_file=foo.json is correct: there is no pattern specified, so there are no tests to execute, hence the command should fail. The behavior is consistent with what's happening if running bazel test //my/cc_library, which also fails with ERROR: No test targets were found, yet testing was requested
Bazel always prints ERROR: No test targets were found, yet testing was requested when not specifying a target pattern, but overrides that line when BEP is disabled.
Repro: apply the following diff, run bazel --nosystem_rc --nohome_rc --noworkspace_rc test and watch the command-line!
coverageP4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)team-CoreSkyframe, bazel query, BEP, options parsing, bazelrctype: buguntriaged
Description of the bug:
Adding the
--bes_backend
flag to Bazel appears to alter the end status of an invocation running thecoverage
command.It appears as if the existence of the flag changes the build from successful
INFO: Build completed successfully, 1 total action
to an error
ERROR: No test targets were found, yet testing was requested
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run all commands inside
https://github.com/bazelbuild/examples
under the{root}/java-tutorial/
directory.An actual BES is not necessary to repro so the timeout is set to a very short period (10ms) and the BES failure is ignored.
bazel --nohome_rc --noworkspace_rc coverage --bes_timeout=10ms
INFO: Build completed successfully, 1 total action
bazel --nohome_rc --noworkspace_rc coverage --bes_backend=grpcs://foo.bar --bes_timeout=10ms
ERROR: No test targets were found, yet testing was requested
This error can also be reproduced using the
--build_event_json
flag:bazel --nohome_rc --noworkspace_rc coverage
vs
bazel --nohome_rc --noworkspace_rc coverage --build_event_json_file=foo.json
Which operating system are you running Bazel on?
Ubuntu 20.04.4
What is the output of
bazel info release
?release 5.2.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?The text was updated successfully, but these errors were encountered: