diff options
author | Eduardo Julian | 2020-11-28 19:45:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-11-28 19:45:56 -0400 |
commit | a02b7bf8ff358ccfa35b03272d28537aeac723ae (patch) | |
tree | 66f27c97f192d31d7cbee6b87be5ac6546640253 /stdlib/source/program/aedifex/command/test.lux | |
parent | 889139602b77e4387a6e8bfbedacc2a08703e976 (diff) |
Added "private" macro to lux/debug.
Diffstat (limited to 'stdlib/source/program/aedifex/command/test.lux')
-rw-r--r-- | stdlib/source/program/aedifex/command/test.lux | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index d4519b2d0..2996a6741 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -4,12 +4,18 @@ [monad (#+ do)]] [control [concurrency - ["." promise (#+ Promise)]]] + ["." promise (#+ Promise) ("#\." monad)]] + [security + ["!" capability]]] [data [text - ["%" format (#+ format)]]] + ["%" format (#+ format)]] + [number + ["i" int]]] [world - ["." file]]] + [environment (#+ Environment)] + ["." file] + ["." shell (#+ Shell)]]] ["." // #_ ["#." build] ["/#" // #_ @@ -20,15 +26,21 @@ [dependency [resolution (#+ Resolution)]]]]) -(def: #export (do! fs resolution profile) - (-> (file.System Promise) Resolution (Command Any)) +(def: #export (do! environment fs shell resolution profile) + (-> Environment (file.System Promise) (Shell Promise) Resolution (Command Any)) (do ///action.monad - [[compiler program] (//build.do! fs resolution profile) - working-directory (promise.future //build.working-directory) - #let [command (case compiler - (#//build.JVM artifact) (///runtime.java program) - (#//build.JS artifact) (///runtime.node program))] + [[compiler program] (//build.do! environment fs shell resolution profile) + working-directory (promise\wrap (//build.working-directory environment)) #let [_ (log! "[TEST STARTED]")] - outcome (///shell.execute command working-directory) - #let [_ (log! "[TEST ENDED]")]] + process (!.use (:: shell execute) + [environment + working-directory + (case compiler + (#//build.JVM artifact) (///runtime.java program) + (#//build.JS artifact) (///runtime.node program)) + (list)]) + exit (!.use (:: process await) []) + #let [_ (log! (if (i.= shell.normal exit) + "[TEST ENDED]" + "[TEST FAILED]"))]] (wrap []))) |