Skip to content

Commit

Permalink
Add :offline test selector.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Mar 16, 2012
1 parent 32c1a21 commit 37483b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
;; checkout-deps don't work with :eval-in :leiningen
:profiles {:dev {:resource-paths ["leiningen-core/dev-resources"]
:test-paths ["leiningen-core/test"]}}
:test-selectors {:default (complement :busted)}
:test-selectors {:default (complement :busted)
:offline (complement :online)}
:source-paths ["leiningen-core/src" "src"]
:aot [#"leiningen"]
:eval-in :leiningen)
Expand Down
6 changes: 3 additions & 3 deletions test/leiningen/test/deps.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
[leiningen.core.classpath :as classpath]
[leiningen.core.eval :as eval]))

(deftest test-deps
(deftest ^:online test-deps
(let [sample-deps [["ring" "1.0.0"] ["rome" "0.9"] ["jdom" "1.0"]]]
(doseq [[n v] sample-deps]
(delete-file-recursively (m2-dir n v) :silently))
(deps sample-project)
(doseq [[n v] sample-deps]
(is (.exists (m2-dir n v)) (str n " was not downloaded.")))))

(deftest test-snapshots-releases
(deftest ^:online test-snapshots-releases
(let [pr (assoc sample-project :omit-default-repositories true
:repositories {"clojars" {:url "http://clojars.org/repo/"
:snapshots false}})
Expand Down Expand Up @@ -77,7 +77,7 @@
:solaris {:x86 #{"liblwjgl.so" "libopenal.so"}
:x86_64 #{"liblwjgl64.so" "libopenal.so"}}})

(deftest ^:busted test-native-deps
(deftest test-native-deps
(delete-file-recursively (:native-path native-project) true)
(deps native-project)
(is (= (conj (get-in native-lib-files-map [(eval/get-os) (eval/get-arch)])
Expand Down
2 changes: 1 addition & 1 deletion test/leiningen/test/install.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

(def jdom-dir (file local-repo "jdom" "jdom" "1.0"))

(deftest ^{:online true} test-standalone-install
(deftest ^:online test-standalone-install
(delete-file-recursively jdom-dir true)
;; (delete-shell-wrappers)
(install nil "nomnomnom" "0.5.0-SNAPSHOT")
Expand Down

0 comments on commit 37483b4

Please sign in to comment.