summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-06-29 17:29:03 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-07-01 22:31:50 +0200
commit35ef3631b4aa1850a10993c683b9f6253e089c3d (patch)
tree4d4694ac06ce3d1246618f9c46107c8d0fd4bef7
parentc64c809faf24254269c51ba30caae566704d1fda (diff)
Refactor ci support
-rw-r--r--.travis.yml2
-rw-r--r--Makefile19
-rw-r--r--rebar.config.script20
3 files changed, 37 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index ce9f98b..26eafdd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,4 +6,4 @@ otp_release:
- R15B
- R14B04
- R14B03
-before_script: "./bootstrap"
+script: "make all deps test"
diff --git a/Makefile b/Makefile
index 1fda878..83eb446 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,9 @@
-.PHONY: dialyzer_warnings xref_warnings
+.PHONY: dialyzer_warnings xref_warnings deps test
+
+REBAR=$(PWD)/rebar
+RETEST=$(PWD)/deps/retest/retest
+EUNIT_DIR=$(PWD)/.eunit
+RETEST_DIR=$(PWD)/.rt.work
all:
./bootstrap
@@ -9,7 +14,7 @@ clean:
debug:
@./bootstrap debug
-check: debug xref dialyzer
+check: debug xref dialyzer deps test
xref:
@./rebar xref
@@ -24,4 +29,12 @@ dialyzer_warnings:
binary: VSN = $(shell ./rebar -V)
binary: clean all
cp rebar ../rebar.wiki/rebar
- (cd ../rebar.wiki && git commit -m "Update $(VSN)" rebar) \ No newline at end of file
+ (cd ../rebar.wiki && git commit -m "Update $(VSN)" rebar)
+
+deps:
+ REBAR_EXTRA_DEPS=1 ./rebar get-deps
+ cd deps/retest && $(REBAR) compile escriptize
+
+test:
+ $(REBAR) eunit
+ $(RETEST) inttest
diff --git a/rebar.config.script b/rebar.config.script
new file mode 100644
index 0000000..07feb95
--- /dev/null
+++ b/rebar.config.script
@@ -0,0 +1,20 @@
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ts=4 sw=4 ft=erlang et
+
+%% TODO: Change temporary retest fork back to dizzyd/retest after merge
+%% ExtraDeps = [{retest, ".*", {git, "git://github.com/dizzyd/retest.git"}}],
+ExtraDeps = [{retest, ".*",
+ {git, "git://github.com/tuncer/retest.git", "next"}}],
+
+case os:getenv("REBAR_EXTRA_DEPS") of
+ false ->
+ CONFIG;
+ _ ->
+ case lists:keysearch(deps, 1, CONFIG) of
+ {value, {deps, Deps}} ->
+ NDeps = Deps ++ ExtraDeps,
+ lists:keyreplace(deps, 1, CONFIG, {deps, NDeps});
+ false ->
+ CONFIG ++ [{deps, ExtraDeps}]
+ end
+end.