aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/test.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-08-29 01:06:42 -0400
committerEduardo Julian2020-08-29 01:06:42 -0400
commitb1f0014dd9080c6643ecd73db5233fbdff032419 (patch)
tree63650a451b0974a5654b06bf4f33dae7deceef54 /stdlib/source/program/aedifex/command/test.lux
parenta5a15c191c43a660bb0c8e78e93d097e27966177 (diff)
Test programs + auti build/test.
Diffstat (limited to 'stdlib/source/program/aedifex/command/test.lux')
-rw-r--r--stdlib/source/program/aedifex/command/test.lux29
1 files changed, 29 insertions, 0 deletions
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
new file mode 100644
index 000000000..a27c07f10
--- /dev/null
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -0,0 +1,29 @@
+(.module:
+ [lux (#- Name)
+ [abstract
+ [monad (#+ do)]]
+ [control
+ [concurrency
+ ["." promise]]]
+ [data
+ [text
+ ["%" format (#+ format)]]]]
+ ["." // #_
+ ["#." build]
+ ["/#" // #_
+ ["#." action]
+ ["#." command (#+ Command)]
+ ["#." shell]]])
+
+(def: #export (do! project)
+ (Command Any)
+ (do ///action.monad
+ [[compiler program] (//build.do! project)
+ working-directory (promise.future //build.working-directory)
+ #let [command (case compiler
+ (#//build.JVM artifact) (format "java -jar " program)
+ (#//build.JS artifact) (format "node --stack_size=8192 " program))]
+ #let [_ (log! "[TEST STARTED]")]
+ outcome (///shell.execute command working-directory)
+ #let [_ (log! "[TEST ENDED]")]]
+ (wrap [])))