summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-09-04 02:58:44 -0700
committerOri Bernstein <ori@eigenstate.org>2017-09-04 02:58:54 -0700
commit7ef09f3db883c42d01e3b1d80f0d2da6ceff9913 (patch)
treeaf370bd4f281a680b9793034f3b5baee1aa43471 /mbld
parent40d6f7b5cc0cb9e5de1675a1441ad0dfc0a66bda (diff)
downloadmc-7ef09f3db883c42d01e3b1d80f0d2da6ceff9913.tar.gz
Modernize benchmarks.
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 33894f1..4d4b2ed 100644
--- a/mbld/test.myr
+++ b/mbld/test.myr
@@ -14,14 +14,14 @@ pkg bld =
;;
const test = {b, targs
- -> go(b, targs, "test")
+ -> go(b, targs, "test", false)
}
const bench = {b, targs
- -> go(b, targs, "bench")
+ -> go(b, targs, "bench", true)
}
-const go = {b, targs, kind
+const go = {b, targs, kind, isbench
var failed, ok
var tests
@@ -42,7 +42,7 @@ const go = {b, targs, kind
ok = true
failed = [][:]
for t : tests
- if !runtest(b, t, &failed)
+ if !runtest(b, t, isbench, &failed)
ok = false
;;
;;
@@ -71,7 +71,7 @@ const printfailed = {failed
;;
}
-const runtest = {b, n, failed
+const runtest = {b, n, isbench, failed
var dir, res, log, logfd
var sub
@@ -100,7 +100,13 @@ const runtest = {b, n, failed
/* if we have subtests, we've already printed the output */
match sub
| `std.Some r: res = r
- | `std.None: mbldput("PASS\n")
+ | `std.None:
+ if isbench
+ mbldput("MISSING TIMING\n")
+ res = false
+ else
+ mbldput("PASS\n")
+ ;;
;;
;;
if !res