-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
67 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
{:deps | ||
{org.clojure/clojure {:mvn/version "1.10.1"} | ||
org.clojure/core.async {:mvn/version "0.6.532"} | ||
{:exoscale.project/lib cc.qbits/spandex | ||
:exoscale.project/version-file "VERSION" | ||
:exoscale.project/deploy? true | ||
:slipset.deps-deploy/exec-args {:installer :remote | ||
:sign-releases? false | ||
:repository "clojars"} | ||
|
||
:deps | ||
{org.clojure/clojure {:mvn/version "1.11.1"} | ||
org.clojure/core.async {:mvn/version "1.6.681"} | ||
org.elasticsearch.client/elasticsearch-rest-client {:mvn/version "8.10.0"} | ||
org.elasticsearch.client/elasticsearch-rest-client-sniffer | ||
{:mvn/version "8.10.0" | ||
:exclusions [com.fasterxml.jackson.core/jackson-core]} | ||
org.elasticsearch.client/elasticsearch-rest-client-sniffer {:mvn/version "8.10.0"} | ||
cc.qbits/commons {:mvn/version "0.5.2"} | ||
cheshire {:mvn/version "5.9.0"} | ||
cheshire/cheshire {:mvn/version "5.11.0"} | ||
ring/ring-codec {:mvn/version "1.1.2"}} | ||
|
||
:paths ["src/clj"] | ||
|
||
:aliases {:test {:extra-paths ["test"] | ||
:extra-deps {com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner.git" | ||
:sha "5fb4fc46ad0bf2e0ce45eba5b9117a2e89166479"}} | ||
:main-opts ["-m" "cognitect.test-runner"]} | ||
:cljfmt {:extra-deps {com.jameslaverack/cljfmt-runner {:git/url "https://github.com/JamesLaverack/cljfmt-runner" | ||
:sha "fc12c2724c44185cd1b221a79c8486c73846f14c" | ||
:exclusions [cljfmt]} | ||
cljfmt {:mvn/version "0.6.4"}} | ||
:main-opts ["-m" "cljfmt-runner.check"]} | ||
:cljfmt/fix {:main-opts ["-m" "cljfmt-runner.fix"]}}} | ||
:extra-deps {eftest/eftest {:mvn/version "0.6.0"}}} | ||
:project | ||
{:extra-deps {io.github.exoscale/tools.project {:git/sha "5f24196ebea4dc6e601d201d97b463ea26923c7e"}} | ||
:ns-default exoscale.tools.project | ||
:jvm-opts ["-Dclojure.main.report=stderr"]}}} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
(ns qbits.spandex.spandex-test-runner | ||
(:gen-class) | ||
(:require [clojure.test] | ||
eftest.report.pretty | ||
[eftest.runner :as ef])) | ||
|
||
(def default-options | ||
{:dir "test" | ||
:capture-output? true | ||
:fail-fast? true | ||
:multithread? :vars | ||
:reporters [eftest.report.pretty/report]}) | ||
|
||
(defn- ret->exit-code | ||
[{:as _ret :keys [error fail]}] | ||
(System/exit | ||
(cond | ||
(and (pos? fail) (pos? error)) 30 | ||
(pos? fail) 20 | ||
(pos? error) 10 | ||
:else 0))) | ||
|
||
(defn combined-reporter | ||
"Combines the reporters by running first one directly, | ||
and others with clojure.test/*report-counters* bound to nil." | ||
[[report & rst]] | ||
(fn [m] | ||
(report m) | ||
(doseq [report rst] | ||
(binding [clojure.test/*report-counters* nil] | ||
(report m))))) | ||
|
||
(defn run | ||
[options] | ||
(let [options (merge default-options options)] | ||
(-> (ef/find-tests (:dir options)) | ||
(ef/run-tests options) | ||
ret->exit-code))) |