mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
1fe89de576
## 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.
55 lines
1.3 KiB
Python
55 lines
1.3 KiB
Python
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
|
|
load(":wine.bzl", "wine_rust_test")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
exports_files([
|
|
"wine.bzl",
|
|
"wine_runtime.bzl",
|
|
])
|
|
|
|
rust_library(
|
|
name = "wine_test_support",
|
|
testonly = True,
|
|
srcs = [
|
|
"src/lib.rs",
|
|
"src/lib_tests.rs",
|
|
],
|
|
crate_name = "wine_test_support",
|
|
crate_root = "src/lib.rs",
|
|
edition = "2024",
|
|
target_compatible_with = ["@platforms//os:linux"],
|
|
deps = [
|
|
"//codex-rs/utils/cargo-bin",
|
|
"//codex-rs/utils/pty",
|
|
"@crates//:anyhow",
|
|
"@crates//:tempfile",
|
|
"@crates//:tokio",
|
|
],
|
|
)
|
|
|
|
rust_binary(
|
|
name = "windows-smoke",
|
|
testonly = True,
|
|
srcs = ["fixtures/windows_smoke.rs"],
|
|
crate_name = "wine_smoke",
|
|
crate_root = "fixtures/windows_smoke.rs",
|
|
edition = "2024",
|
|
tags = ["manual"],
|
|
target_compatible_with = ["@platforms//os:windows"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
wine_rust_test(
|
|
name = "wine-test-support-unit-tests",
|
|
timeout = "short",
|
|
crate = ":wine_test_support",
|
|
windows_binaries = {
|
|
"wine-smoke": ":windows-smoke",
|
|
},
|
|
deps = [
|
|
"@crates//:futures",
|
|
"@crates//:pretty_assertions",
|
|
],
|
|
)
|