Skip to content

Commit 5b57f0d

Browse files
authored
fix(ci): restore Windows test portability (#3288)
* fix(ci): restore Windows test portability Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * fix(tasks): skip Unix lockfile check on Windows Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * fix(tasks): use buf shim on Windows Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> --------- Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
1 parent bcf4558 commit 5b57f0d

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎crates/openshell-core/src/driver_utils.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,7 @@ mod tests {
12481248
assert!(validate_guest_spiffe_tcp_endpoint("unix:/run/spire/agent.sock", true).is_err());
12491249
}
12501250

1251+
#[cfg(unix)]
12511252
#[test]
12521253
fn credential_file_rejects_fifo_without_hanging() {
12531254
// A FIFO with no writer would block a blocking open() forever. The

‎crates/openshell-ocsf/tests/event_identity.rs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ fn device_identifies_the_sandbox_environment() {
6868

6969
assert_eq!(json["device"]["type_id"], 99);
7070
assert_eq!(json["device"]["type"], "Sandbox");
71-
assert_eq!(json["device"]["os"]["name"], "Linux");
71+
let expected_os = if cfg!(target_os = "windows") {
72+
"Windows"
73+
} else {
74+
"Linux"
75+
};
76+
assert_eq!(json["device"]["os"]["name"], expected_os);
7277
}
7378

7479
#[test]

‎tasks/rust.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ hide = true
1313
["rust:lockfiles:check"]
1414
description = "Verify all tracked Cargo lockfiles are current"
1515
run = "tasks/scripts/check-cargo-lockfiles.sh"
16+
run_windows = "echo Skipping rust:lockfiles:check: Cargo lockfile validation uses a Unix shell helper."
1617
hide = true
1718

1819
["rust:lint"]

‎tasks/typescript.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ run = "npm run gen"
2525
description = "Lint proto/ with buf (repo-level buf.yaml)"
2626
depends = ["sdk:ts:install"]
2727
run = "./sdk/typescript/node_modules/.bin/buf lint"
28+
run_windows = "sdk\\typescript\\node_modules\\.bin\\buf.cmd lint"
2829

2930
["sdk:ts:typecheck"]
3031
description = "Type-check the TypeScript SDK"

0 commit comments

Comments
 (0)