From 465ea247eb50517ebefe4873750afd3c492d82a2 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 2 Oct 2022 13:14:15 +0200 Subject: [PATCH 1/2] process and sci --- process | 2 +- sci | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/process b/process index bd203b79..2055e047 160000 --- a/process +++ b/process @@ -1 +1 @@ -Subproject commit bd203b79a21b6155b61b4b4efda5a497dec2567d +Subproject commit 2055e0470a0ae6faedd15d5a3c8da4d82a6f4641 diff --git a/sci b/sci index 42bd17de..7452e4d3 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 42bd17def34633b03d663211693eff972c9735bb +Subproject commit 7452e4d328d1be6c4d639ed34999ca714be1ba3c From 80a8ee1b7efdb79d9afa9a899178e2d9a0ad8c8d Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 2 Oct 2022 13:24:06 +0200 Subject: [PATCH 2/2] Don't let orchestra nuke other spec tests --- .../lib_tests/babashka/run_all_libtests.clj | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/test-resources/lib_tests/babashka/run_all_libtests.clj b/test-resources/lib_tests/babashka/run_all_libtests.clj index 72c9d8fb..85d47294 100644 --- a/test-resources/lib_tests/babashka/run_all_libtests.clj +++ b/test-resources/lib_tests/babashka/run_all_libtests.clj @@ -4,7 +4,8 @@ [babashka.fs :as fs] [clojure.edn :as edn] [clojure.java.io :as io] - [clojure.test :as t :refer [*report-counters*]])) + [clojure.test :as t :refer [*report-counters*]] + [clojure.string :as str])) (defmethod clojure.test/report :end-test-var [_m] (when-let [rc *report-counters*] @@ -34,16 +35,21 @@ (defn test-namespaces [& namespaces] (let [namespaces (seq (filter test-namespace? namespaces))] (when (seq namespaces) - (doseq [n namespaces] - (require n) - (filter-vars! (find-ns n) #(-> % meta ((some-fn :skip-bb - :test-check-slow)) not))) - (let [m (apply t/run-tests namespaces)] - (swap! status (fn [status] - (merge-with + status (dissoc m :type)))))))) + (let [no-orch-namespaces (remove #(str/starts-with? (str %) "orchestra") namespaces) + ;; somehow orchestra screws up other tests, so we run that last + orch-namespaces (filter #(str/starts-with? (str %) "orchestra") namespaces) + namespaces (concat no-orch-namespaces orch-namespaces)] + (doseq [n namespaces] + (require n) + (filter-vars! (find-ns n) #(-> % meta ((some-fn :skip-bb + :test-check-slow)) not)) + (let [m (apply t/run-tests [n])] + (swap! status (fn [status] + (merge-with + status (dissoc m :type)))))))))) ;; Standard test-runner for libtests -(let [lib-tests (edn/read-string (slurp (io/resource "bb-tested-libs.edn")))] +(let [lib-tests (edn/read-string (slurp (io/resource "bb-tested-libs.edn"))) + test-nss (atom [])] (doseq [[libname {tns :test-namespaces skip-windows :skip-windows :keys [test-paths git-sha]}] lib-tests] @@ -52,7 +58,8 @@ (doseq [p test-paths] (add-classpath (str (fs/file git-dir p))))) (when-not (and skip-windows (windows?)) - (apply test-namespaces tns)))) + (swap! test-nss into tns))) + (apply test-namespaces @test-nss)) ;; Non-standard tests - These are tests with unusual setup around test-namespaces