ref: d910afb413459ce9a11c5cd2c8b4e32f1d649cc3
parent: e89d14c5f41b12f9e3ff6fb2bf9dd4d35db049d9
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Jan 21 16:31:43 EST 2016
Exit with success status of operations.
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
-------
[Myrddin Website and Documentation](http://eigenstate.org/myrddin/)
+~~~~~~
Myrddin is a systems language that is both powerful and fun to use.
It aims for C like low level control, a lightweight high quality implementation,
--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -23,6 +23,7 @@
var tmp
var cmd
var tags
+ var st
cmd = std.optparse(args, &[
.argdesc = "[inputs...]",
@@ -111,16 +112,19 @@
else
for c in cmd.args
match c
- | "all": bld.buildall(b)
- | "gen": bld.genall(b)
- | "clean": bld.cleanall(b)
- | "install": bld.install(b)
- | "uninstall": bld.uninstall(b)
- | "test": bld.test(b)
- | target: bld.buildtarg(b, target)
+ | "all": st = bld.buildall(b)
+ | "gen": st = bld.genall(b)
+ | "clean": st = bld.cleanall(b)
+ | "install": st = bld.install(b)
+ | "uninstall": st = bld.uninstall(b)
+ | "test": st = bld.test(b)
+ | target: st = bld.buildtarg(b, target)
;;
;;
;;
+ ;;
+ if (!st)
+ std.exit(1)
;;
}
--- a/mbld/test.myr
+++ b/mbld/test.myr
@@ -11,7 +11,7 @@
use "config.use"
pkg bld =
- const test : (b : build# -> void)
+ const test : (b : build# -> bool)
;;
const test = {b
@@ -69,7 +69,7 @@
;;
std.slfree(tests)
if tests.len == 0
- -> void
+ -> true
;;
printfailed(failed)
@@ -82,6 +82,7 @@
else
std.put("TESTS FAILED\n")
;;
+ -> ok
}
const printfailed : (f : byte[:][:] -> void) = {failed