Konrad Mrożek
2023-12-12 12798cfe937a915b23f0be0c95545f5ebad6b7d1
Print testing contexts before test

Allows to reduce the scope of logs
1 files modified
15 ■■■■■ changed files
clojure/src/test_runner.clj 15 ●●●●● patch | view | raw | blame | history
clojure/src/test_runner.clj
@@ -1,4 +1,7 @@
(ns test-runner)
(ns test-runner
  (:require
   [clojure.string :as string]
   [clojure.test :as t]))
(def class-cache-dir ".cache/classes")
(.mkdirs (java.io.File. class-cache-dir))
@@ -119,6 +122,16 @@
                                 (filter (comp test-files :file))
                                 (map :ns)
                                 (set))]
        (set-validator! #'t/*testing-contexts*
                        (let [validator (get-validator #'t/*testing-contexts*)]
                          (fn [v]
                            (println "Testing:" (string/join " " v))
                            (println)
                            (if validator
                              (validator v)
                              true))))
        (with-redefs [t/report vim-report]
          (System/exit
           (if (pos? (if (and -test-file -test-line)