Make retest work with test selectors.
This commit is contained in:
parent
4a3a5f0a45
commit
43f8cac4a7
1 changed files with 6 additions and 5 deletions
|
@ -5,9 +5,10 @@
|
||||||
(defn retest
|
(defn retest
|
||||||
"Run only the test namespaces which failed last time around.
|
"Run only the test namespaces which failed last time around.
|
||||||
Requires loading leiningen.hooks.retest to :hooks in project.clj."
|
Requires loading leiningen.hooks.retest to :hooks in project.clj."
|
||||||
[project]
|
[project & selectors]
|
||||||
;; TODO: detect branch change; clear failure list
|
;; TODO: detect branch change; clear failure list
|
||||||
(if (.exists (java.io.File. ".lein-failures"))
|
(apply leiningen.test/test project
|
||||||
(apply leiningen.test/test project (->> (slurp ".lein-failures")
|
(concat (if (.exists (java.io.File. ".lein-failures"))
|
||||||
read-string sort (map name)))
|
(->> (slurp ".lein-failures")
|
||||||
(leiningen.test/test project)))
|
read-string sort (map name)))
|
||||||
|
selectors)))
|
||||||
|
|
Loading…
Reference in a new issue