pw_build: Allow forwarding deps to action in pw_hil_test
Allow user to specify dependencies of the action executed by the HIL
test.
Change-Id: I13e32ae09e7f879226da425b86deb3e828ba113c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/126675
Reviewed-by: Wyatt Hepler <hepler@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Austin Foxley <afoxley@google.com>
diff --git a/pw_build/hil.gni b/pw_build/hil.gni
index 4522a0c..1d3b270 100644
--- a/pw_build/hil.gni
+++ b/pw_build/hil.gni
@@ -30,6 +30,7 @@
#
# Args:
# action_args: Forwarded to the action.
+# action_deps: Forwarded to the action.
# action_outputs: Forwarded to the action.
# target_type: The type of underlying target that implements the HIL
# test. Currently "python" is the only supported value, producing a
@@ -47,6 +48,10 @@
if (defined(invoker.action_outputs)) {
_outputs += invoker.action_outputs
}
+ _deps = []
+ if (defined(invoker.action_deps)) {
+ _deps += invoker.action_deps
+ }
if (invoker.target_type == "python") {
pw_python_script(target_name) {
@@ -55,6 +60,7 @@
pool = "$dir_pw_build/pool:pw_hil_test($default_toolchain)"
stamp = true
outputs = _outputs
+ deps = _deps
# We want the test stdout to be saved.
capture_output = false