mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:22:05 +00:00
Run core integration tests against a Wine-backed Windows executor (#28401)
## Why We want to exercise a linux app-server against a windows exec-server without having to repeat every test case. This approach has slight precedent in the remote docker test setup. ## What Run the shared `codex-core` integration suite against Windows exec-server behavior from Linux. This makes cross-OS path and shell regressions visible while keeping unsupported cases owned by individual tests. - Add `local`, `docker`, and `wine-exec` test environment selection with legacy Docker compatibility. - Extend `codex_rust_crate` to generate a sharded Wine-exec variant using a cross-built Windows server and pinned Bazel Wine/PowerShell runtimes. - Teach remote-aware helpers about Windows paths and track temporary incompatibilities with source-local `skip_if_wine_exec!` calls and follow-up reasons.
This commit is contained in:
1 parent
d007b0852a
commit
1fe89de576
28 files changed
+789
-157
No files matched your search
@@ -0,0 +1,40 @@
|
||||
"""Runfiles shared by tests that execute Windows binaries through Wine."""
|
||||
|
||||
_WINE_RUNTIME_BINARIES = {
|
||||
"pwsh": "@powershell_windows_x86_64//:pwsh",
|
||||
"pwsh-runtime-marker": "@powershell_windows_x86_64//:runtime_marker",
|
||||
"wine": "@wine_linux_x86_64//:wine",
|
||||
"wine-runtime-marker": "@wine_linux_x86_64//:runtime_marker",
|
||||
"wineserver": "@wine_linux_x86_64//:wineserver",
|
||||
}
|
||||
|
||||
_WINE_RUNTIME_DATA = [
|
||||
"@powershell_windows_x86_64//:runtime",
|
||||
"@wine_linux_x86_64//:runtime",
|
||||
]
|
||||
|
||||
WINE_TEST_TARGET_COMPATIBLE_WITH = [
|
||||
"@llvm//constraints/libc:gnu.2.28",
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:linux",
|
||||
]
|
||||
|
||||
def wine_test_runtime(test_binaries = {}):
|
||||
"""Returns data and environment mappings for a Wine-backed test."""
|
||||
binaries = dict(_WINE_RUNTIME_BINARIES)
|
||||
for binary_name in sorted(test_binaries.keys()):
|
||||
if binary_name in binaries:
|
||||
fail("test binary name collides with Wine runtime: {}".format(binary_name))
|
||||
binaries[binary_name] = test_binaries[binary_name]
|
||||
|
||||
return struct(
|
||||
data = _WINE_RUNTIME_DATA + [binary for binary in binaries.values()],
|
||||
env = {
|
||||
"CARGO_BIN_EXE_{}".format(binary_name): "$(rlocationpath {})".format(binary)
|
||||
for binary_name, binary in binaries.items()
|
||||
},
|
||||
runfile_env = {
|
||||
binary_label: "CARGO_BIN_EXE_" + binary_name
|
||||
for binary_name, binary_label in binaries.items()
|
||||
},
|
||||
)
|
||||
Reference in new issue
Block a user