blob: 6cf4a20abaf938699c51fbafabf24d5258b6e493 (
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/release"))
(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 ", "))))
|