mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
42dec90bc4
## 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.
50 lines
1.2 KiB
Python
50 lines
1.2 KiB
Python
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
|
|
load("//bazel/rules/testing:wine.bzl", "wine_rust_test")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
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",
|
|
],
|
|
)
|