blob: caa88aac0ab7568bf1284e4f1072c16a9cd3db40 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#
# Run test scripts, and error if any fail.
# Pass through any args
#
(defn main [& argv]
(def failures-array @[])
(def build-path (os/realpath "build"))
(each suite (sorted (os/dir "test"))
(when (string/has-prefix? "suite-" suite)
(eprint "Running suite " suite)
(def result (os/execute [(dyn *executable*) "-m" build-path (string "test/" suite) ;argv] :p))
(if-not (zero? result)
(array/push failures-array suite))))
(if (empty? failures-array)
(eprint "All Passed.")
(errorf "Failures in: %s" (string/join failures-array ", "))))
|