Closed lread closed 1 year ago
Another biggie. Lemme know watcha think. As always, happy to collab and adapt.
After merge into babashka, we can adjust this:
;;;; babashka.process
;; test built-in babashka.process
(test-namespaces 'babashka.process-test)
;; test babashka.process from source
#_{:clj-kondo/ignore [:duplicate-require]}
(require '[babashka.process] :reload)
(test-namespaces 'babashka.process-test)
To maybe something like this:
;;;; babashka.process
;; test built-in babashka.process
(test-namespaces 'babashka.process-test)
(when (= "native" (System/getenv "BABASHKA_TEST_ENV"))
;; test babashka.process from source
#_{:clj-kondo/ignore [:duplicate-require]}
(require '[babashka.process] :reload)
(System/setProperty "babashka.process.test.reload" "true")
(test-namespaces 'babashka.process-test 'babashka.process-exec-test))
I'll look at this soon, but I'm on a trip so it'll take a few days
On Tue, May 23, 2023 at 12:27 AM Lee Read @.***> wrote:
Another biggie. Lemme know watcha think. As always, happy to collab and adapt.
After merge into babashka, we can adjust this https://github.com/babashka/babashka/blob/0f85b02a82d4033f6b9cb697ec0e6919e7e0281b/test-resources/lib_tests/babashka/run_all_libtests.clj#L95-L102 :
;;;; babashka.process;; test built-in babashka.process (test-namespaces 'babashka.process-test) ;; test babashka.process from source
_{:clj-kondo/ignore [:duplicate-require]}
(require '[babashka.process] :reload) (test-namespaces 'babashka.process-test)
To maybe something like this:
;;;; babashka.process;; test built-in babashka.process (test-namespaces 'babashka.process-test)
(when (= "native" (System/getenv "BABASHKA_TEST_ENV")) ;; test babashka.process from source
_{:clj-kondo/ignore [:duplicate-require]}
(require '[babashka.process] :reload) (System/setProperty "babashka.process.test.reload" "true") (test-namespaces 'babashka.process-test 'babashka.process-exec-test))
— Reply to this email directly, view it on GitHub https://github.com/babashka/process/pull/131#issuecomment-1558113387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFSBXNWVKWLJMNXXVH4G3XHPR57ANCNFSM6AAAAAAYLA3SUE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- https://www.michielborkent.nl https://www.eetvoorjeleven.nu
I'll look at this soon, but I'm on a trip so it'll take a few days
Thanks for the ping! Enjoy your trip!
Thanks!
New bb tasks:
CI:
babashka.process/exec
reload support. We'll turf this after next release of babashka.Add
run_exec.clj
- a wee program to exerciseexec
bb.edn
to suport running as a script and reloading sources instead of using babashka built-in babashka.processbabashka.process.test.reload
system property to signal thatrun_exec.clj
should reloadbabashka.process
from sources when running from bb.test:native
task does not natively compile tests, it only natively compilesrun_exec.clj
. It launches natively compiledrun_exec.clj
via jvm clojure and observes results for correctness.Test utilities moved to
babashka.process.test-utils
so that they can be used by existingbabashka.process-test
and new:babashka.process-exec-test
Add :ps-me to wee dummy wd.clj to support
exec
arg0 testing for macOS and Linux.Add doc/dev.md with some relevant notes/pointers.
Other changes:
script/test
bash script, it is replaced by bb tasksBugs found and fixed as a result of testing:
javac
seem to be happier runningjavac
from same dir as sourceexec
now converting:env
and:extra-env
keywords the same wayprocess
function do, see #123Closes #117, Fixes #123