Skip to content

feature request: testonly run targets with captured outputs #465

@novas0x2a

Description

@novas0x2a

I was trying to write a weird test, and in my case it would be a lot easier if I could run some commands in the child workspace, but then have the output of that come back to the main workspace and have the main test actually run there. This avoids the need to do a bunch of heavy setup in the child workspace. Something like:

default_test_runner(
    name = "cquery",
    # do something that violates transitive closure, so can't be a genquery
    bazel_cmds = ["cquery --output files ..."] ,
)

bazel_integration_run(
    name = "child_data_stdout",
    test_runner = ":cquery",
    testonly = True,
    ...
)

sh_test(
    name = "test",
    data = [
        ":child_data_stdout",
        ":lots_of",
        ":local_targets",
    ],
    ...
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions