split test/runner to make project more jack-in friendly

This commit is contained in:
Sean Corfield 2023-04-15 11:29:01 -07:00
parent e66e7dc6d5
commit 3910df215a
2 changed files with 5 additions and 4 deletions

View file

@ -55,7 +55,7 @@
[:cljs] -- test against ClojureScript" [:cljs] -- test against ClojureScript"
[{:keys [aliases] :as opts}] [{:keys [aliases] :as opts}]
(gen-doc-tests opts) (gen-doc-tests opts)
(run-task (-> [:test :test-doc] (run-task (-> [:test :runner :test-doc]
(into aliases) (into aliases)
(into (if (some #{:cljs} aliases) (into (if (some #{:cljs} aliases)
[:test-doc-cljs] [:test-doc-cljs]
@ -63,7 +63,7 @@
opts) opts)
(defn test "Run basic tests." [opts] (defn test "Run basic tests." [opts]
(run-task [:test :1.11]) (run-task [:test :runner :1.11])
opts) opts)
(defn- jar-opts [opts] (defn- jar-opts [opts]
@ -92,7 +92,7 @@
(run-doc-tests {:aliases [alias]})) (run-doc-tests {:aliases [alias]}))
(eastwood opts) (eastwood opts)
(doseq [alias aliases] (doseq [alias aliases]
(run-task [:test alias])) (run-task [:test :runner alias]))
(b/delete {:path "target"}) (b/delete {:path "target"})
(println "\nWriting pom.xml...") (println "\nWriting pom.xml...")
(b/write-pom opts) (b/write-pom opts)

View file

@ -23,8 +23,9 @@
:extra-deps {io.github.cognitect-labs/test-runner :extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.1" :git/sha "dfb30dd"} {:git/tag "v0.5.1" :git/sha "dfb30dd"}
org.clojure/core.cache {:mvn/version "RELEASE"}} org.clojure/core.cache {:mvn/version "RELEASE"}}
:main-opts ["-m" "cognitect.test-runner"]
:exec-fn cognitect.test-runner.api/test} :exec-fn cognitect.test-runner.api/test}
:runner
{:main-opts ["-m" "cognitect.test-runner"]}
;; various "runners" for tests/CI: ;; various "runners" for tests/CI:
:cljs {:extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}} :cljs {:extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}}