-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_runner.clj
executable file
·52 lines (44 loc) · 1.19 KB
/
test_runner.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bb
;; https://book.babashka.org/#_running_tests
(require '[clojure.test :as t]
;; '[babashka.process :as p]
'[babashka.classpath :as cp])
(cp/add-classpath "src:test")
(cp/add-classpath "../../teknql/wing/src")
;; (def is-mac?
;; (let [ostype
;; (-> ^{:out :string}
;; (p/$ "zsh -c 'echo -n $OSTYPE'")
;; p/check :out)]
;; (re-seq #"^darwin" ostype)))
;; TODO collect these automagically
(def test-nses
(->>
(concat
;; (when-not is-mac?
;; ['ralphie.awesome-test
;; 'ralphie.awesome.fnl-test])
['defthing.core-test
'defthing.defcom-test
;; 'db.core-test
;; 'ralphie.git-test
;; 'ralphie.tmux-test
;; 'ralphie.emacs-test
;; 'ralphie.awesome-test
;; 'components.timeline-test
;; 'dates.tick-test
'clawe.schema-test
'clawe.config-test
'clawe.client-test
'clawe.toggle-test
])
(remove nil?)))
(doall
(for [t test-nses]
(require t)))
(def test-results
(apply t/run-tests test-nses))
(def failures-and-errors
(let [{:keys [:fail :error]} test-results]
(+ fail error)))
(System/exit failures-and-errors)