Permalink
Browse files

Add make targets to run tests for normal and replica set connections.

  • Loading branch information...
1 parent 900da4f commit 9cf23184fc5b377777eebde480d3f61f483b2af1 @soplakanets soplakanets committed Feb 17, 2012
Showing with 10 additions and 3 deletions.
  1. +10 −3 Makefile
View
@@ -1,5 +1,7 @@
+ERL=$(shell which erl)
REBAR=$(shell which rebar || echo ./rebar)
-APP='mongodb'
+APP=mongodb
+PA=./ebin ./deps/*/ebin
.PHONY: deps
@@ -13,7 +15,12 @@ clean:
@$(REBAR) clean
distclean: clean
@$(REBAR) delete-deps
+
+# Run a set of test for normal connection.
test: clean all
- @$(REBAR) eunit app=$(APP)
-
+ $(ERL) -pa $(PA) -eval 'mongodb_tests:test(), init:stop().' -noshell
+
+# Run a set of tests for replica set.
+testrs: clean all
+ $(ERL) -pa $(PA) -eval 'mongodb_tests:test_rs(), init:stop().' -noshell

0 comments on commit 9cf2318

Please sign in to comment.