BB test patches
This commit is contained in:
parent
665ae4dd97
commit
ab470def54
2 changed files with 8 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
(ns babashka.run-all-libtests
|
(ns babashka.run-all-libtests
|
||||||
(:require [clojure.java.io :as io]
|
(:require [babashka.core :refer [windows?]]
|
||||||
[clojure.string :as str]
|
|
||||||
[clojure.edn :as edn]
|
[clojure.edn :as edn]
|
||||||
|
[clojure.java.io :as io]
|
||||||
[clojure.test :as t]))
|
[clojure.test :as t]))
|
||||||
|
|
||||||
(def ns-args (set (map symbol *command-line-args*)))
|
(def ns-args (set (map symbol *command-line-args*)))
|
||||||
|
|
@ -21,14 +21,10 @@
|
||||||
(swap! status (fn [status]
|
(swap! status (fn [status]
|
||||||
(merge-with + status (dissoc m :type))))))))
|
(merge-with + status (dissoc m :type))))))))
|
||||||
|
|
||||||
(def windows? (-> (System/getProperty "os.name")
|
|
||||||
(str/lower-case)
|
|
||||||
(str/includes? "win")))
|
|
||||||
|
|
||||||
;; Standard test-runner for libtests
|
;; 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")))]
|
||||||
(doseq [{tns :test-namespaces skip-windows :skip-windows} (vals lib-tests)]
|
(doseq [{tns :test-namespaces skip-windows :skip-windows} (vals lib-tests)]
|
||||||
(when-not (and skip-windows windows?)
|
(when-not (and skip-windows (windows?))
|
||||||
(apply test-namespaces tns))))
|
(apply test-namespaces tns))))
|
||||||
|
|
||||||
;; Non-standard tests - These are tests with unusual setup around test-namespaces
|
;; Non-standard tests - These are tests with unusual setup around test-namespaces
|
||||||
|
|
@ -44,7 +40,7 @@
|
||||||
(test-doric-cyclic-dep-problem))
|
(test-doric-cyclic-dep-problem))
|
||||||
|
|
||||||
;;;; babashka.process
|
;;;; babashka.process
|
||||||
(when-not windows?
|
(when-not (windows?)
|
||||||
;; test built-in babashka.process
|
;; test built-in babashka.process
|
||||||
(test-namespaces 'babashka.process-test)
|
(test-namespaces 'babashka.process-test)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@
|
||||||
|
|
||||||
(defmethod t/report #?(:clj :begin-test-var
|
(defmethod t/report #?(:clj :begin-test-var
|
||||||
:cljs [::t/default :begin-test-var]) [_]
|
:cljs [::t/default :begin-test-var]) [_]
|
||||||
(println "Begin test var."))
|
;; BB-TEST-PATCH: remove message to not disturb test output for other libs
|
||||||
|
#_(println "Begin test var."))
|
||||||
|
|
||||||
(defmethod t/report #?(:clj :end-test-var
|
(defmethod t/report #?(:clj :end-test-var
|
||||||
:cljs [::t/default :end-test-var]) [_]
|
:cljs [::t/default :end-test-var]) [_]
|
||||||
(println "End test var."))
|
;; BB-TEST-PATCH: remove message to not disturb test output for other libs
|
||||||
|
#_(println "End test var."))
|
||||||
|
|
||||||
(register! {:throw? false})
|
(register! {:throw? false})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue