From 538e367d4c976646a5ae58a006e30a227bb3bee9 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 24 Apr 2023 14:50:47 +0200 Subject: ["CC/test", "test"]: factor out test-input In this way, the test action gets canonical, so adding RUNS_PER_TEST support to this rule should be easily mergable into downstream rules. --- CC/test/RULES | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/CC/test/RULES b/CC/test/RULES index 6903580..fc7b332 100644 --- a/CC/test/RULES +++ b/CC/test/RULES @@ -271,22 +271,24 @@ [{"type": "var", "name": "stage"}, {"type": "var", "name": "name"}] } ] + , [ "test input" + , { "type": "map_union" + , "$1": + [ { "type": "to_subdir" + , "subdir": "work" + , "$1": {"type": "var", "name": "data"} + } + , {"type": "var", "name": "runner"} + , {"type": "var", "name": "test-args"} + , {"type": "var", "name": "test-launcher"} + , {"type": "var", "name": "staged test binary"} + ] + } + ] , [ "test-results" , { "type": "ACTION" , "outs": ["result", "stdout", "stderr", "time-start", "time-stop"] - , "inputs": - { "type": "map_union" - , "$1": - [ { "type": "to_subdir" - , "subdir": "work" - , "$1": {"type": "var", "name": "data"} - } - , {"type": "var", "name": "runner"} - , {"type": "var", "name": "test-args"} - , {"type": "var", "name": "test-launcher"} - , {"type": "var", "name": "staged test binary"} - ] - } + , "inputs": {"type": "var", "name": "test input"} , "cmd": ["./runner"] , "env": { "type": "var" -- cgit v1.2.3