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

Undesired output behavior for cc_test srcs #16174

Closed
jfirebaugh opened this issue Aug 26, 2022 · 3 comments
Closed

Undesired output behavior for cc_test srcs #16174

jfirebaugh opened this issue Aug 26, 2022 · 3 comments
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug

Comments

@jfirebaugh
Copy link

Description of the bug:

This is a UX bug in Bazel's output for bazel test <target> when <target> is a cc_test with srcs.

Rather than printing an individual "Compiling foo.cpp" line for each file in cc_tests srcs, as it does for cc_library or cc_binary, bazel prints a combined "Testing //:test [2s, 4s]" line. This is misleading because it's not testing at that point, and undesired because it hides useful information about what's happening with the build.

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Minimal example: https://github.com/jfirebaugh/bazel_cc_test_output

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

release 5.3.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 ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

benjaminp added a commit to benjaminp/bazel that referenced this issue Aug 26, 2022
A target with test actions may have other actions registered that should not be reported in the UI as tests themselves.

Fixes bazelbuild#16174.
benjaminp added a commit to benjaminp/bazel that referenced this issue Aug 26, 2022
A target with test actions may have other actions registered that should not be reported in the UI as tests themselves.

Fixes bazelbuild#16174.
@ShreeM01
Copy link
Contributor

Hello @jfirebaugh, Could you please provide the complete steps to reproduce the above request like sample repo? Thanks!

@jfirebaugh
Copy link
Author

@kshyanashree It's in the description. https://github.com/jfirebaugh/bazel_cc_test_output

@oquenchil oquenchil added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) and removed untriaged labels Oct 26, 2022
@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Jan 23, 2023
@ShreeM01
Copy link
Contributor

@bazel-io fork 6.1.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Jan 26, 2023
ShreeM01 added a commit that referenced this issue Jan 27, 2023
A target with test actions may have other actions registered that should not be reported in the UI as tests themselves.

Fixes #16174.

Closes #16176.

PiperOrigin-RevId: 503961303
Change-Id: I7df82a6f7c01532cd8f2feac50078daf599fc56a

Co-authored-by: Benjamin Peterson <benjamin@engflow.com>
hvadehra pushed a commit that referenced this issue Feb 14, 2023
A target with test actions may have other actions registered that should not be reported in the UI as tests themselves.

Fixes #16174.

Closes #16176.

PiperOrigin-RevId: 503961303
Change-Id: I7df82a6f7c01532cd8f2feac50078daf599fc56a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants