summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inttest/ct1/ct1_rt.erl3
-rw-r--r--inttest/ct1/rebar.config2
-rw-r--r--rebar.config.sample3
-rw-r--r--src/rebar_ct.erl3
4 files changed, 9 insertions, 2 deletions
diff --git a/inttest/ct1/ct1_rt.erl b/inttest/ct1/ct1_rt.erl
index 1028a0f..f173d3f 100644
--- a/inttest/ct1/ct1_rt.erl
+++ b/inttest/ct1/ct1_rt.erl
@@ -6,7 +6,8 @@
files() ->
[{create, "ebin/a1.app", app(a1)},
{copy, "../../rebar", "rebar"},
- {copy, "test_SUITE.erl", "test/test_SUITE.erl"}].
+ {copy, "rebar.config", "rebar.config"},
+ {copy, "test_SUITE.erl", "itest/test_SUITE.erl"}].
run(_Dir) ->
{ok, _} = retest:sh("./rebar compile ct"),
diff --git a/inttest/ct1/rebar.config b/inttest/ct1/rebar.config
new file mode 100644
index 0000000..839fe4b
--- /dev/null
+++ b/inttest/ct1/rebar.config
@@ -0,0 +1,2 @@
+
+{ct_dir, "itest"}.
diff --git a/rebar.config.sample b/rebar.config.sample
index 23c3c70..731a3e5 100644
--- a/rebar.config.sample
+++ b/rebar.config.sample
@@ -86,6 +86,9 @@
%% == Common Test ==
+%% Override the default "test" directory in which SUITEs are located
+{ct_dir, "itest"}.
+
%% Option to pass extra parameters when launching Common Test
{ct_extra_params, "-boot start_sasl -s myapp"}.
diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl
index 54e97e9..70524af 100644
--- a/src/rebar_ct.erl
+++ b/src/rebar_ct.erl
@@ -46,7 +46,8 @@
%% ===================================================================
ct(Config, File) ->
- run_test_if_present("test", Config, File).
+ TestDir = rebar_config:get_local(Config, ct_dir, "test"),
+ run_test_if_present(TestDir, Config, File).
%% ===================================================================
%% Internal functions