test harness: pw roll forward regression fix
diff --git a/MODULE.bazel b/MODULE.bazel index aa24379..d547fe8 100644 --- a/MODULE.bazel +++ b/MODULE.bazel
@@ -30,6 +30,9 @@ "//third_party/pigweed:integration_tests_armv7m.patch", # Stage .bin alongside .elf in system_image_test runfiles. "//third_party/pigweed:system_image_test_bin_runfiles.patch", + # Fix syscall_defs/syscall_user being gated on userspace_build_enabled, + # which breaks userspace=False kernel builds (pigweed regression). + "//third_party/pigweed:syscall_no_userspace_constraint.patch", ], remote = "https://pigweed.googlesource.com/pigweed/pigweed", )
diff --git a/target/ast10x0/harness/test_runner.py b/target/ast10x0/harness/test_runner.py index e04b432..98e536e 100644 --- a/target/ast10x0/harness/test_runner.py +++ b/target/ast10x0/harness/test_runner.py
@@ -353,7 +353,13 @@ action="store_true", help="Skip GPIO and firmware upload; stream and detokenize UART output only", ) - args = parser.parse_args() + args, remaining = parser.parse_known_args() + + if os.environ.get("PW_RUNNER_PASSTHROUGH") == "1": + import subprocess + + res = subprocess.run([args.firmware] + remaining) + return res.returncode uart_device = os.environ.get("UART_DEVICE") or config["uart"]["serial_port"]
diff --git a/third_party/pigweed/syscall_no_userspace_constraint.patch b/third_party/pigweed/syscall_no_userspace_constraint.patch new file mode 100644 index 0000000..7d917c3 --- /dev/null +++ b/third_party/pigweed/syscall_no_userspace_constraint.patch
@@ -0,0 +1,39 @@ +--- a/pw_kernel/syscall/BUILD.bazel ++++ b/pw_kernel/syscall/BUILD.bazel +@@ -14,7 +14,6 @@ + + load("@bazel_skylib//lib:selects.bzl", "selects") + load("@rules_rust//rust:defs.bzl", "rust_library") +-load("//pw_kernel:flags.bzl", "KERNEL_TEST_DEPS", "KERNEL_TEST_RUSTC_FLAGS") + load("//pw_kernel/arch/arm_cortex_m:defs.bzl", "SUPPORTED_CORTEX_M_CPUS") + + package(default_visibility = ["//visibility:public"]) +@@ -25,16 +24,11 @@ + "syscall_defs.rs", + ], + edition = "2024", +- rustc_flags = KERNEL_TEST_RUSTC_FLAGS, + tags = ["kernel"], +- target_compatible_with = select({ +- "//pw_kernel/userspace:userspace_build_enabled": [], +- "//conditions:default": ["@platforms//:incompatible"], +- }), + deps = [ + "//pw_status/rust:pw_status", + "@rust_crates//:bitflags", +- ] + KERNEL_TEST_DEPS, ++ ], + ) + + rust_library( +@@ -51,10 +45,6 @@ + }), + edition = "2024", + tags = ["kernel"], +- target_compatible_with = select({ +- "//pw_kernel/userspace:userspace_build_enabled": [], +- "//conditions:default": ["@platforms//:incompatible"], +- }), + deps = [ + ":syscall_defs", + "//pw_status/rust:pw_status",