Skip to content

Windows: two tests hard-require GNU sleep/true on PATH — green on CI runners, red on a stock local shell #293

Description

@dracic

Summary

Two tests depend on GNU coreutils being resolvable on Windows PATH:

  • tests/test_runs.py::test_stop_run_signals_live_process — spawns its victim with subprocess.Popen(["sleep", "30"]). No sleep.exe on PATH → FileNotFoundError before the test's subject (SIGTERM delivery to a live engine pid) even starts.
  • tests/test_verify.py::test_verify_review_happy_and_commands — uses VerifyPolicy(commands=("true",)) (and ("true", "false")) as the happy/fail commands. cmd has no true/false builtins, so the happy path exits 9009 and the assertion fails.

GitHub's windows-latest runners ship C:\Program Files\Git\usr\bin on PATH, so CI is green. A stock local shell (only Git\cmd on PATH — the default Git for Windows install) fails both. Verified during the #254 full-suite runs: both fail on a clean PATH and both pass once Git\usr\bin is prepended.

Suggested fix

Remove the coreutils dependency instead of documenting it:

  • The sleeper: subprocess.Popen([sys.executable, "-c", "import time; time.sleep(30)"]) — same lifetime semantics, zero PATH dependency, and the pid is a real process the SIGTERM path can kill on any OS.
  • The verify commands: tests/conftest.py already centralizes cross-shell verify verbs (_OK = "exit 0" honored by both cmd /c and sh -c); use that pattern for the happy command and an exit 1 equivalent for the failing one.

Refs: #254

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