summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-04 11:05:16 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-04 11:05:16 -0800
commit8526055dff6cd1c350da84f97de89efa75606ec7 (patch)
tree033a11c22d45821f3972bb325bb99a349a4794aa /mbld
parent88cbe95a616e1cd947d0e30ab19368602b00b753 (diff)
downloadmc-8526055dff6cd1c350da84f97de89efa75606ec7.tar.gz
Clean up test output.
Make it more useful.
Diffstat (limited to 'mbld')
-rw-r--r--mbld/test.myr18
1 files changed, 12 insertions, 6 deletions
diff --git a/mbld/test.myr b/mbld/test.myr
index b2f7865..4365870 100644
--- a/mbld/test.myr
+++ b/mbld/test.myr
@@ -16,8 +16,8 @@ pkg bld =
const test = {b
var tests : (byte[:][:], byte[:])[:]
+ var failed, p, ok
var bincmd
- var failed : byte[:][:], ok
/* no implicit tests to run */
tests = [][:]
@@ -59,9 +59,10 @@ const test = {b
failed = [][:]
for (c, dir) in tests
setdir(b, dir)
- if !runtest(c)
+ if !runtest(b, c)
ok = false
- failed = std.slpush(failed, c[0])
+ p = std.pathcat(b.curdir, c[0])
+ failed = std.slpush(failed, p)
;;
;;
@@ -75,6 +76,9 @@ const test = {b
;;
printfailed(failed)
+ for f in failed
+ std.slfree(f)
+ ;;
std.slfree(failed)
if ok
std.put("TESTS PASSED\n")
@@ -143,12 +147,14 @@ const buildtests = {b, targ
-> tests
}
-const runtest = {cmd
- var r, log
+const runtest = {b, cmd
+ var r, log, p
std.put("run")
for c in cmd
- std.put(" {}", c)
+ p = std.pathcat(b.curdir, c)
+ std.put(" {}", p)
+ std.slfree(p)
;;
std.put(":\t")
match std.spork(cmd)