summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Henoch <magnus.henoch@gmail.com>2012-11-20 15:50:00 +0000
committerMagnus Henoch <magnus.henoch@gmail.com>2012-11-20 15:50:00 +0000
commite4083cacee879bc72069ca0fcd23950f3ae420ec (patch)
tree2956a15c0a996e63c91cd3ba878b54a633bc4c9a
parent92fb083011f5b834d6c01a5479c348582c908a4f (diff)
Run eunit suites in the order specified in the 'suites' command line parameter
Normally, Rebar runs eunit tests in the order the beam files are stored in the file system (see rebar_utils:beams). However, sometimes it is desirable to run the tests in a different order (e.g. to reproduce an error found on a build server). For that case, it would make sense to use the 'suites' parameter not just for selecting which modules to consider, but also for choosing the order.
-rw-r--r--src/rebar_eunit.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index b82da0f..fd1a265 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -186,7 +186,7 @@ filter_suites(Config, Modules) ->
filter_suites1(Modules, []) ->
Modules;
filter_suites1(Modules, Suites) ->
- [M || M <- Modules, lists:member(M, Suites)].
+ [M || M <- Suites, lists:member(M, Modules)].
%%
%% == get matching tests ==