From b1f0014dd9080c6643ecd73db5233fbdff032419 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 29 Aug 2020 01:06:42 -0400 Subject: Test programs + auti build/test. --- stdlib/source/program/aedifex/command/test.lux | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 stdlib/source/program/aedifex/command/test.lux (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 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 []))) -- cgit v1.2.3