Commit Graph

3 Commits

  • bazel: add PowerShell to Wine test harness (#28120)
    ## Why
    
    Cross-OS tests in the wine environment will be much more faithful if we
    can also test powershell integration.
    
    ## What
    
    Add an x86_64 powershell binary to the bazel wine environment and
    include smoke tests.
  • [codex] Add hermetic Wine exec-server test (#27937)
    ## Why
    
    We want to make it possible for an app-server orchestrator on one OS to
    control an exec-server on another host running a different OS. In
    practice this kinda already works if you get lucky and the two hosts
    have the same path format, but we mangle quite a lot of operations if
    either end is Windows.
    
    This test starts exercising that interaction, although right now the
    initial bootstrap fails. Future changes will expand the test's
    assertions to match improved support.
    
    ## What
    
    Stacked on #27964. This adds a small Windows exec-server fixture and a
    Linux protocol smoke test using the reusable Wine harness, covering
    Windows environment discovery, non-TTY `cmd.exe` execution, output, exit
    status, and working directory.
    
    Once we've got the full codex binary cross-building under Bazel we could
    consider moving to the real binary instead of the stripped down
    exec-server-only binary used here.
  • [codex] Add hermetic Wine test support (#27964)
    ## Why
    
    We want to make it possible for an app-server orchestrator on one OS to
    control an exec-server on another host running a different OS. In
    practice this kinda already works if you get lucky and the two hosts
    have the same path format, but we mangle quite a lot of operations if
    either end is Windows.
    
    We should be able to test the cross-platform interactions for
    exec-server, but we want to do this fairly soon and need a lightweight
    option for testing. Using Wine to run the Windows side is far from
    perfect, but it should give us a decent measure of how well we're
    handling the basics of paths, process spawning, shell interaction, etc.
    
    Future changes will add actual exec-server tests and possibly extensions
    to the Wine testing environment.
    
    ## What
    
    To make the cross-target-triple build easy, these tests are added only
    to the Bazel build. This change adds an x86_64 Wine prebuilt managed by
    Bazel and some build rules that can set up the needed toolchain
    transition.
    
    The support library for running Wine in a test environment created by
    the Bazel rules comes with its own basic unit and integration tests.
    Their primary priority is to make sure we don't leak child processes on
    developer machines and that we can build and launch a basic hello world
    binary.
    
    ## Validation
    
    Confirmed these new tests are running on the [x86_64 bazel ubuntu
    jobs](https://github.com/openai/codex/actions/runs/27446432302/job/81132356855?pr=27937):
    
    ```
    //bazel/rules/testing/wine:wine-smoke-test                      (cached) PASSED in 3.7s
    //bazel/rules/testing/wine:wine-test-support-unit-tests         (cached) PASSED in 15.8s
    ```