Skip to content

incompatible_windows_native_test_wrapper: enables Bash-less test execution on Windows #6622

Closed

Description

@laszlocsomor

Description

The option --incompatible_windows_native_test_wrapper enables using the Bash-less test wrapper on Windows. This flag has NO effect on other platforms.

When using bazel test, Bazel does not execute tests directly. Instead Bazel runs a "test wrapper" as a subprocess, which sets up the environment for the test and runs the test.

By default, Bazel uses a Bash script (@bazel_tools//tools/test:test-setup.sh) as the test wrapper, on all platforms. The new flag allows using an alternative test wrapper written in C++ that does not depend on Bash.

When the flag is enabled, Bazel uses the C++ test wrapper from @bazel_tools//tools/test:tw. This test wrapper does not depend on Bash, but it's new and has not yet been battle-tested.

When the flag is disabled, Bazel uses the Bash script test wrapper also used on every other platform, from @bazel_tools//tools/test:test-setup.sh. This script requires Bash. It has always been the way to run tests with Bazel, so it's battle-tested.

Related bug: #5508

Backwards-compatibility

The new test wrapper is designed to be backwards-compatible with the Bash-script based one. We do not expect any incompatibilities.

Migration recipe

None, as of 2019-03-06.

If you do find that this flag breaks your tests, please let us know so we can find a solution.

Rollout plan

Bazel 0.24.0 will not support this flag.
Bazel 0.25.0 is expected to support this flag, with default value being false.
Bazel 0.26.0 is expected to flip this flag to true.
Bazel 0.27.0 is expected to remove this flag.

Activity

  1. added
    area-Windows
    incompatible-change
    on Nov 7, 2018
  2. self-assigned this
    on Nov 7, 2018
  3. laszlocsomor commented on Nov 7, 2018

    @laszlocsomor
    ContributorAuthor

    Current status:

    • flag is called "incompatible_windows_native_test_wrapper", will be renamed by a PR soon that will reference this issue.
    • remaining logic behind the flag will be implemented in the same PR
  4. changed the title [-]Windows: enable `--incompatible_windows_native_test_wrapper` by default[/-] [+]--incompatible_windows_native_test_wrapper: enables Bash-less test execution on Windows[/+] on Feb 18, 2019
  5. changed the title [-]--incompatible_windows_native_test_wrapper: enables Bash-less test execution on Windows[/-] [+]incompatible_windows_native_test_wrapper: enables Bash-less test execution on Windows[/+] on Feb 18, 2019
  6. 72 remaining items

  7. laszlocsomor commented on Jul 29, 2019

    @laszlocsomor
    ContributorAuthor

    Status:

    • this is in danger for Bazel 1.0 because some downstream projects on Bazel CI cannot yet use this flag
    • I'll try to add --incompatible_windows_native_test_wrapper to every downstream project that is ready, and migrate the rest one by one
  8. dslomov commented on Sep 2, 2019

    @dslomov
    Contributor

    What are the ETA for the flag flip?

  9. dslomov commented on Sep 3, 2019

    @dslomov
    Contributor
  10. meteorcloudy commented on Sep 3, 2019

    @meteorcloudy
    Member

    We have one last broken project, fix is here: bazelbuild/rules_typescript#469
    I think we can flip this now to catch up the 1.0 cut.

  11. dslomov commented on Sep 3, 2019

    @dslomov
    Contributor

    lovely, let's do it.

  12. laszlocsomor commented on Sep 6, 2019

    @laszlocsomor
    ContributorAuthor

    Thank you 😂

  13. added
    team-OSS
    on Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1area-Windowsincompatible-changeplatform: windowsteam-OSS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions