Skip to content

LcovMerger not properly declared as a tool by StandaloneTestStrategy #4033

Closed

Description

@benjaminp

If coverage is enabled, TestActionBuilder sticks the LcovMerger tool's FilesToRun into the test action's inputs. This suffices to build the LcovMerger executable and runfiles tree before running the test. However, since StandaloneTestStrategy does not include LcovMerger as a tool in the underlying test-running spawn, the sandbox fails to mount LcovMerger's runfiles tree into the sandbox execroot. This "works" now because the wrapper script for LcovMerger follows symlinks back into the real execroot. Given that such behavior isn't correct, a future stricter sandbox implementation could break coverage.

Activity

  1. damienmg commented on Nov 8, 2017

    @damienmg
    Contributor

    Routing through @lberki to triage.

  2. assigned and unassigned on May 23, 2018
  3. ulfjack commented on May 23, 2018

    @ulfjack
    Contributor

    Depending on where and how fast we're going with coverage, we may not need to fix this.

  4. added
    team-Rules-Server
    P3
    and removed on Dec 3, 2018
  5. Toxicable commented on Feb 3, 2020

    @Toxicable

    We just came into this issue trying to implement bazel coverage in rules_nodejs. bazel-contrib/rules_nodejs#1135
    It dosen't look like this is goign to be fixed anytime soon.
    I think we could work around it by moving the logic that was meant to be in the lcov_merger into the test runner itself.
    Would this be the preferred work around?

  6. added
    stale
    on Feb 17, 2023
  7. sgowroji commented on Feb 17, 2023

    @sgowroji
    Member

    Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen (or ping me to reopen) if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.

  8. fmeum commented on Feb 17, 2023

    @fmeum
    Collaborator

    @sgowroji still relevant

    @cushon Making the lcov merger a native image would be a decent workaround for this problem and also help with remote execution.

  9. added
    not stale
    and removed
    stale
    on Feb 17, 2023
  10. added 2 commits that reference this issue on Nov 20, 2024
    0080c1f
    e7ea302
  11. malt3 commented on Nov 29, 2024

    @malt3
    Contributor

    I think this is fixed in Bazel 8 (tested on 8.0.0rc2). Can anyone else double check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3coveragenot staleteam-Rules-Servertype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions