Skip to content

Instantly share code, notes, and snippets.

@shayfrendt
Created April 20, 2010 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shayfrendt/31356c45d66b3594de17 to your computer and use it in GitHub Desktop.
Save shayfrendt/31356c45d66b3594de17 to your computer and use it in GitHub Desktop.
(defn run-tests!
"Runs all tests"
[& args]
(let [tests (test-namespaces)]
(doseq [test tests] (require test))
(let [test-results (apply merge-with + (map test-ns tests))]
(if (= [:shutdown-agents] args)
(shutdown-agents))
(System/exit (if (or (< 0 (test-results :fail))
(< 0 (test-results :error)))
-1
0)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment