(.module: [lux (#- Name) [abstract [monad (#+ do)]] [control [concurrency ["." promise (#+ Promise) ("#\." monad)]] [security ["!" capability]]] [data [text ["%" format (#+ format)]] [number ["i" int]]] [world [environment (#+ Environment)] ["." file] ["." shell (#+ Shell)]]] ["." // #_ ["#." build] ["/#" // #_ ["#." action] ["#." command (#+ Command)] ["#." runtime] [dependency [resolution (#+ Resolution)]]]]) (def: #export (do! environment fs shell resolution profile) (-> Environment (file.System Promise) (Shell Promise) Resolution (Command Any)) (do ///action.monad [[compiler program] (//build.do! environment fs shell resolution profile) working-directory (promise\wrap (//build.working-directory environment)) #let [_ (log! "[TEST STARTED]")] 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 [])))