Tests on Windows: no console for CLI children, .exe for the Go oracle; CI test timeout

A hidden console on Windows runners let a confirmation prompt wait
forever, and the oracle built without .exe could not be run.
This commit is contained in:
Andy Dixon
2026-10-13 14:23:43 +01:00
parent f62e74a3e9
commit c9725f18d4
3 changed files with 8 additions and 1 deletions
+1
View File
@@ -27,6 +27,7 @@ jobs:
matrix: matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel, windows-2025] os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel, windows-2025]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
# The Go toolchain builds the test-only oracle; vault itself needs no Go. # The Go toolchain builds the test-only oracle; vault itself needs no Go.
+4
View File
@@ -54,6 +54,10 @@ impl Env {
if let Some(p) = pass { if let Some(p) = pass {
c.env("VAULT_PASSPHRASE", p); c.env("VAULT_PASSPHRASE", p);
} }
// No console, as Unix tests have no terminal: CI runners have a
// hidden one, where a prompt would wait forever.
#[cfg(windows)]
std::os::windows::process::CommandExt::creation_flags(&mut c, 0x0000_0008); // DETACHED_PROCESS
c c
} }
+3 -1
View File
@@ -34,7 +34,9 @@ pub fn go_oracle() -> Option<PathBuf> {
if !have_go() { if !have_go() {
return None; return None;
} }
let out = root().join("target").join("vault-go-oracle"); let out = root()
.join("target")
.join(format!("vault-go-oracle{}", std::env::consts::EXE_SUFFIX));
let st = Command::new("go") let st = Command::new("go")
.args(["build", "-o"]) .args(["build", "-o"])
.arg(&out) .arg(&out)