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
|
||||
"Run only the test namespaces which failed last time around.
|
||||
Requires loading leiningen.hooks.retest to :hooks in project.clj."
|
||||
[project]
|
||||
[project & selectors]
|
||||
;; TODO: detect branch change; clear failure list
|
||||
(if (.exists (java.io.File. ".lein-failures"))
|
||||
(apply leiningen.test/test project (->> (slurp ".lein-failures")
|
||||
read-string sort (map name)))
|
||||
(leiningen.test/test project)))
|
||||
(apply leiningen.test/test project
|
||||
(concat (if (.exists (java.io.File. ".lein-failures"))
|
||||
(->> (slurp ".lein-failures")
|
||||
read-string sort (map name)))
|
||||
selectors)))
|
||||
|
|
Loading…
Reference in a new issue