Skip to content

Windows: Bash-less test execution #5508

Closed

Description

@laszlocsomor

Description of the problem / feature request:

Design and implement a way to run tests without requiring tools/test/test-setup.sh.

Current functionality includes:

  • setting up environment variables, including making execution-root-relative paths absolute
  • handling signals by post-processing the test's output and transforming into an XML file
  • running the test either in a subshell or directly as a subprocess, and streaming its output to stdout
  • zipping up undeclared output files and writing the undeclared outputs manifest

I think the most complicated item is signal handling: on Windows, Bazel calls TerminateProcess when the user interrupts the test, which kills the test process without a chance to clean up. We may need to run two processes per test on Windows, one running the test and the other doing the cleanup work as soon as the first process is terminated.

Feature requests: what underlying problem are you trying to solve with this feature?

Motivation: #4319

Deliverables: (must be added to / linked from this GH issue):

  • doc explaining current test-setup.sh functionality
  • design doc explaining proposed Windows native approach and how the approach implements all important features of test-setup.sh
  • log of outcome of manual testing on a clean Windows installation without Bash
  • commits implementing this feature nativly on Windows
  • commits adding integration and regression tests for all features of test-setup.sh
  • commit dropping test-setup.sh usage on Windows and using only the new code path

Signals:

  • running the newly added tests
  • manual testing: running "bazel test //foo:bar_test" on a clean Windows installation without Bash

What operating system are you running Bazel on?

Windows 10

What's the output of bazel info release?

release 0.15.0

Activity

  1. self-assigned this
    on Jul 3, 2018
  2. laszlocsomor commented on Jul 18, 2018

    @laszlocsomor
    ContributorAuthor

    doc explaining current test-setup.sh functionality

    laszlocsomor/proposals@332fa53

    I won't merge this branch, instead I'll embed the text in the eventual design doc.

  3. 149 remaining items

  4. added a commit that references this issue on Jun 6, 2019
  5. laszlocsomor commented on Nov 29, 2019

    @laszlocsomor
    ContributorAuthor

    Closing this, since Bazel 1.0 rolled out Bash-less test execution.

  6. 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-Windowscategory: misc > testingplatform: windowsteam-OSStype: feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions