aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-04-12 22:04:58 +0200
committerLoïc Hoguin <[email protected]>2012-04-12 22:04:58 +0200
commit4b27d3ec43ba0f1a470c0842841558ba46d968a6 (patch)
treed89ad8a9a59fe034684718b91fcf2d7b6b1519ff
parent85ed79eb59cf2587b3c13558101eb1d78c95cfa6 (diff)
downloadcowboy-4b27d3ec43ba0f1a470c0842841558ba46d968a6.tar.gz
cowboy-4b27d3ec43ba0f1a470c0842841558ba46d968a6.tar.bz2
cowboy-4b27d3ec43ba0f1a470c0842841558ba46d968a6.zip
Use a separate rebar.config file for running tests
-rw-r--r--Makefile36
-rw-r--r--rebar.config6
-rw-r--r--rebar.tests.config7
3 files changed, 31 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 2f7da14..24bd6a9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,41 +1,53 @@
# See LICENSE for licensing information.
+PROJECT = cowboy
+
DIALYZER = dialyzer
REBAR = rebar
all: app
-app: deps
- @$(REBAR) compile
+# Application.
deps:
@$(REBAR) get-deps
+app: deps
+ @$(REBAR) compile
+
+docs:
+ @$(REBAR) doc skip_deps=true
+
clean:
@$(REBAR) clean
rm -f test/*.beam
rm -f erl_crash.dump
-tests: clean app eunit ct
+# Tests.
+
+deps/proper:
+ @$(REBAR) -C rebar.tests.config get-deps
+ cd deps/proper && $(REBAR) compile
-inttests: clean app eunit intct
+tests: clean deps/proper app eunit ct
+
+inttests: clean deps/proper app eunit intct
eunit:
- @$(REBAR) eunit skip_deps=true
+ @$(REBAR) -C rebar.tests.config eunit skip_deps=true
ct:
- @$(REBAR) ct skip_deps=true suites=http,proper,ws
+ @$(REBAR) -C rebar.tests.config ct skip_deps=true suites=http,proper,ws
intct:
- @$(REBAR) ct skip_deps=true suites=http,proper,ws,autobahn
+ @$(REBAR) -C rebar.tests.config ct skip_deps=true suites=http,proper,ws,autobahn
+
+# Dialyzer.
build-plt:
- @$(DIALYZER) --build_plt --output_plt .cowboy_dialyzer.plt \
+ @$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
--apps kernel stdlib sasl inets crypto public_key ssl
dialyze:
- @$(DIALYZER) --src src --plt .cowboy_dialyzer.plt --no_native \
+ @$(DIALYZER) --src src --plt .$(PROJECT).plt --no_native \
-Werror_handling -Wrace_conditions -Wunmatched_returns # -Wunderspecs
-
-docs:
- @$(REBAR) doc skip_deps=true
diff --git a/rebar.config b/rebar.config
index 82d1fca..ef0f6ed 100644
--- a/rebar.config
+++ b/rebar.config
@@ -1,9 +1,3 @@
-{cover_enabled, true}.
-{deps, [
- {proper, "1.0",
- {git, "git://github.com/manopapad/proper.git", {tag, "v1.0"}}}
-]}.
-{eunit_opts, [verbose, {report, {eunit_surefire, [{dir, "."}]}}]}.
{erl_opts, [
%% bin_opt_info,
%% warn_missing_spec,
diff --git a/rebar.tests.config b/rebar.tests.config
new file mode 100644
index 0000000..14daa1d
--- /dev/null
+++ b/rebar.tests.config
@@ -0,0 +1,7 @@
+{cover_enabled, true}.
+{deps, [
+ {proper, "1.0",
+ {git, "git://github.com/manopapad/proper.git", {tag, "v1.0"}}}
+]}.
+{eunit_opts, [verbose, {report, {eunit_surefire, [{dir, "."}]}}]}.
+{erl_opts, []}.