aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/test.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-12 22:51:25 -0400
committerEduardo Julian2021-07-12 22:51:25 -0400
commit86bcfadb774618defaa27bbb9361a93d288fb985 (patch)
tree48c8422b872ec21d60810a88e47f38c9583f6333 /stdlib/source/program/aedifex/command/test.lux
parent86df87512966e8038d70624ab654262ce14a915c (diff)
A bit more clarity for Licentia licenses.
Diffstat (limited to 'stdlib/source/program/aedifex/command/test.lux')
-rw-r--r--stdlib/source/program/aedifex/command/test.lux57
1 files changed, 30 insertions, 27 deletions
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
index 0ccc0cfb2..55614ba80 100644
--- a/stdlib/source/program/aedifex/command/test.lux
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -14,7 +14,7 @@
[world
["." program (#+ Program)]
["." file]
- ["." shell (#+ Shell)]
+ ["." shell (#+ Exit Shell)]
["." console (#+ Console)]]]
["." // #_
["#." build]
@@ -31,32 +31,35 @@
(def: #export failure "[TEST FAILED]")
(def: #export (do! console program fs shell resolution profile)
- (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command Any))
+ (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command [Exit Any]))
(do promise.monad
[environment (program.environment promise.monad program)
#let [working_directory (\ program directory)]]
- (do ///action.monad
- [[compiler program] (//build.do! console program fs shell resolution
- (set@ #///.program (get@ #///.test profile) profile))
- _ (console.write_line ..start console)
- #let [[compiler_command compiler_parameters] (case compiler
- (^template [<tag> <runtime>]
- [(<tag> artifact)
- (<runtime> program)])
- ([#//build.JVM ///runtime.java]
- [#//build.JS ///runtime.node]
- [#//build.Python ///runtime.python]
- [#//build.Lua ///runtime.lua]
- [#//build.Ruby ///runtime.ruby]))]
- process (\ shell execute [environment
- working_directory
- compiler_command
- compiler_parameters])
- _ (//build.log_output! console process)
- _ (//build.log_error! console process)
- exit (\ process await [])
- _ (console.write_line (if (i.= shell.normal exit)
- ..success
- ..failure)
- console)]
- (wrap []))))
+ (do {! ///action.monad}
+ [[build_exit compiler program] (//build.do! console program fs shell resolution
+ (set@ #///.program (get@ #///.test profile) profile))]
+ (if (i.= shell.normal build_exit)
+ (do !
+ [_ (console.write_line ..start console)
+ #let [[compiler_command compiler_parameters] (case compiler
+ (^template [<tag> <runtime>]
+ [(<tag> artifact)
+ (///runtime.for (get@ <runtime> profile) program)])
+ ([#//build.JVM #///.java]
+ [#//build.JS #///.js]
+ [#//build.Python #///.python]
+ [#//build.Lua #///.lua]
+ [#//build.Ruby #///.ruby]))]
+ process (\ shell execute [environment
+ working_directory
+ compiler_command
+ compiler_parameters])
+ _ (//build.log_output! console process)
+ _ (//build.log_error! console process)
+ exit (\ process await [])
+ _ (console.write_line (if (i.= shell.normal exit)
+ ..success
+ ..failure)
+ console)]
+ (wrap [exit []]))
+ (wrap [build_exit []])))))