feat: proper windows support
This commit is contained in:
@@ -2,7 +2,26 @@ load("@rules_shell//shell:sh_test.bzl", "sh_test")
|
||||
|
||||
sh_test(
|
||||
name = "phase8_ci_matrix_shape_test",
|
||||
size = "small",
|
||||
srcs = ["phase8_ci_matrix_shape_test.sh"],
|
||||
args = ["$(location //.github/workflows:ci.yml)"],
|
||||
data = ["//.github/workflows:ci.yml"],
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "native_wrapper_shape_test",
|
||||
size = "small",
|
||||
srcs = ["verify_native_wrapper_shape.sh"],
|
||||
args = [
|
||||
"$(location //tests/binary_test:configured_launcher_bin)",
|
||||
"$(location //tests/script_test:workspace_flagged_script)",
|
||||
"$(location //tests/js_compat_test:compat_devserver)",
|
||||
"$(location //tests/bun_test_test:configured_suite)",
|
||||
],
|
||||
data = [
|
||||
"//tests/binary_test:configured_launcher_bin",
|
||||
"//tests/bun_test_test:configured_suite",
|
||||
"//tests/js_compat_test:compat_devserver",
|
||||
"//tests/script_test:workspace_flagged_script",
|
||||
],
|
||||
)
|
||||
|
||||
17
tests/ci_test/verify_native_wrapper_shape.sh
Executable file
17
tests/ci_test/verify_native_wrapper_shape.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
python3 - "$@" <<'PY'
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
windows = sys.platform.startswith("win")
|
||||
|
||||
for launcher in sys.argv[1:]:
|
||||
suffix = pathlib.Path(launcher).suffix.lower()
|
||||
if windows:
|
||||
if suffix != ".cmd":
|
||||
raise SystemExit(f"expected .cmd launcher on Windows: {launcher}")
|
||||
elif suffix == ".sh":
|
||||
raise SystemExit(f"unexpected .sh launcher executable: {launcher}")
|
||||
PY
|
||||
Reference in New Issue
Block a user