From 86bcfadb774618defaa27bbb9361a93d288fb985 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 12 Jul 2021 22:51:25 -0400 Subject: A bit more clarity for Licentia licenses. --- stdlib/source/program/aedifex/command/test.lux | 57 ++++++++++++++------------ 1 file changed, 30 insertions(+), 27 deletions(-) (limited to 'stdlib/source/program/aedifex/command/test.lux') 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 [ ] - [( artifact) - ( 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 [ ] + [( artifact) + (///runtime.for (get@ 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 []]))))) -- cgit v1.2.3