summaryrefslogtreecommitdiff
path: root/mbld/test.myr
diff options
context:
space:
mode:
Diffstat (limited to 'mbld/test.myr')
-rw-r--r--mbld/test.myr10
1 files changed, 8 insertions, 2 deletions
diff --git a/mbld/test.myr b/mbld/test.myr
index bf666fd..a6d703e 100644
--- a/mbld/test.myr
+++ b/mbld/test.myr
@@ -89,8 +89,13 @@ const runtest = {b, n, targs, isbench, failed
| `std.Err m:
std.fatal("\nunable to run test: {}\n", m)
| `std.Ok (pid, infd, outfd):
- log = std.strcat(std.basename(n.lbl), ".log")
- logfd = std.try(std.openmode(log, std.Owrite | std.Ocreat, 0o644))
+ if opt_verbosity >= 1
+ log = ""
+ logfd = std.try(std.dup(std.Out))
+ else
+ log = std.strcat(std.basename(n.lbl), ".log")
+ logfd = std.try(std.openmode(log, std.Owrite | std.Ocreat, 0o644))
+ ;;
sub = showsub(b, n.lbl, outfd, logfd, failed)
std.slfree(log)
std.close(infd)
@@ -118,6 +123,7 @@ const runtest = {b, n, targs, isbench, failed
if !res
std.slpush(failed, std.fmt("{j= }", n.cmd))
;;
+ std.close(logfd)
;;
-> res
}