commit e6943c7a4a6935639e5f0295bda35b60ba4f1af9
parent 81dcc25188e70c3310c70876d20fd4666e24ec4b
Author: Eyal Sawady <ecs@d2evs.net>
Date: Sun, 6 Jun 2021 22:51:15 +0000
cmd/hare: test: don't schedule root module if it's empty
Signed-off-by: Eyal Sawady <ecs@d2evs.net>
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cmd/hare/subcmds.ha b/cmd/hare/subcmds.ha
@@ -362,7 +362,11 @@ fn test(args: []str) void = {
sched_walk(&plan, [], &depends);
let output = mkfile(&plan, "out");
- sched_hare_exe(&plan, ver, strings::dup(output), depends...);
+ if (len(ver.inputs) == 0) {
+ sched_ld(&plan, strings::dup(output), depends...);
+ } else {
+ sched_hare_exe(&plan, ver, strings::dup(output), depends...);
+ };
plan_execute(&plan, verbose);
let cmd = match (exec::cmd(output, runargs...)) {
err: exec::error => fmt::fatal("exec: {}", exec::strerror(err)),