Fixes for bootstrap classpath in :eval-in-leiningen.

This commit is contained in:
Phil Hagelberg 2010-11-08 20:32:17 -08:00
parent 589b38b4ff
commit d176fa348f
2 changed files with 7 additions and 2 deletions

View file

@ -147,8 +147,11 @@
(when (empty? (find-lib-jars project))
(deps project))
(if (:eval-in-leiningen project)
;; need to at least pretend to return an exit code
(do (eval form) 0)
(do ;; bootclasspath workaround: http://dev.clojure.org/jira/browse/CLJ-673
(require '[clojure walk repl])
(require '[clojure.java io shell browse])
;; need to at least pretend to return an exit code
(eval form) 0)
(let [java (Java.)
native-path (or (:native-path project)
(find-native-lib-path project))]

View file

@ -52,6 +52,8 @@ each namespace and print an overall summary."
"Run the project's tests. Accepts a list of namespaces for which to run all
tests. If none are given, runs them all." ; TODO: update
[project & tests]
(when (:eval-in-leiningen project)
(require '[clojure walk template stacktrace]))
(let [[nses selectors] (read-args tests project)
result (doto (File/createTempFile "lein" "result") .deleteOnExit)]
(when-not (or (every? symbol? nses) (every? keyword? nses))