[PATCH] Tie return value of mbld to results of specified targets
[Thread Prev] | [Thread Next]
- Subject: [PATCH] Tie return value of mbld to results of specified targets
- From: "S. Gilles" <sgilles@xxxxxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Thu, 17 Oct 2019 23:41:34 -0400
- To: "myrddin-dev" <myrddin-dev@xxxxxxxxxxxxxx>
- Cc: "S. Gilles" <sgilles@xxxxxxx>
--- I'd like to have `mbld test' return non-0 when the tests fail. I think this does it, but I may be over-simplifying. mbld/main.myr | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mbld/main.myr b/mbld/main.myr index 02d3262e..fb5e0186 100644 --- a/mbld/main.myr +++ b/mbld/main.myr @@ -15,7 +15,7 @@ use "syssel" const main = {args : byte[:][:] var b, runsrc, objdir, path, cmd - var targname, tags, pid, ok, r + var targname, tags, pid, ok cmd = std.optparse(args, &[ .argdesc = "[inputs...]", @@ -104,15 +104,15 @@ const main = {args : byte[:][:] ok = bld.buildtarg(b, "all") else match cmd.args[0] - | "clean": r = bld.clean(b) - | "install": r = bld.install(b) - | "uninstall": r = bld.uninstall(b) - | "test": r = bld.test(b, cmd.args[1:]) - | "bench": r = bld.bench(b, cmd.args[1:]) - | "list": r = show(b, cmd.args[1:]) + | "clean": ok = bld.clean(b) + | "install": ok = bld.install(b) + | "uninstall": ok = bld.uninstall(b) + | "test": ok = bld.test(b, cmd.args[1:]) + | "bench": ok = bld.bench(b, cmd.args[1:]) + | "list": ok = show(b, cmd.args[1:]) | _: for target : cmd.args - r = ok && bld.buildtarg(b, target) + ok = ok && bld.buildtarg(b, target) ;; ;; ;; -- 2.23.0
- Prev by Date: [PATCH] Add tests for matching semi-complicated tuples
- Next by Date: Re: [PATCH] Tie return value of mbld to results of specified targets
- Previous by thread: [PATCH] Add tests for matching semi-complicated tuples
- Next by thread: Re: [PATCH] Tie return value of mbld to results of specified targets
- Index(es):