diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2014-04-20 11:59:41 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2014-04-23 22:17:23 +0200 |
commit | 99fe270e59b44526b43f2b8d93d51b20d45b62d3 (patch) | |
tree | 65754ba961d56a4dac18e23e5a55a06f6af7e4bd /inttest/code_path_no_recurse/code_path_no_recurse_rt.erl | |
parent | b037f6c0762a5c610bd47ade1b38c04b73f9850f (diff) |
Fix #267 (code path regression)
Since the introduction of -r/--recursive, deps were not properly added
to the code path when running ct, eunit, etc.
To fix that, pass a flag down to process_dir1 and conditionalize
execution of the command. This moves the decision into process_dir1
where we can decide to invoke preprocess/2 and postprocess/2 but not
execute the command.
Without this fix, you'd have to, for example, invoke 'rebar -r ct
skip_deps=true', if you wanted to run base_dir's ct suites with deps on
the code path (while skipping all non-base_dir ct suites).
So, with this patch applied, if you run
$ rebar ct
deps will be on the code path, and only base_dir's ct suites will be
tested.
If you want to test ct suites in base_dir and sub_dirs, you have to run
$ rebar -r ct skip_deps=true
If you want to test ct suites in all dirs, you have to run
$ rebar -r ct
The fix is not specific to ct and applies to all commands.
To be able to add inttest/code_path_no_recurse/deps, I had to fix
.gitignore. While at it, I've updated and fixed all entries.
Diffstat (limited to 'inttest/code_path_no_recurse/code_path_no_recurse_rt.erl')
-rw-r--r-- | inttest/code_path_no_recurse/code_path_no_recurse_rt.erl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/inttest/code_path_no_recurse/code_path_no_recurse_rt.erl b/inttest/code_path_no_recurse/code_path_no_recurse_rt.erl new file mode 100644 index 0000000..d884bcc --- /dev/null +++ b/inttest/code_path_no_recurse/code_path_no_recurse_rt.erl @@ -0,0 +1,19 @@ +-module(code_path_no_recurse_rt). +-export([files/0, + run/1]). + +files() -> + [ + {copy, "../../rebar", "rebar"}, + {copy, "rebar.config", "rebar.config"}, + {copy, "src", "src"}, + {copy, "test", "test"}, + {copy, "deps", "deps"} + ]. + +run(_Dir) -> + retest:log(info, "Compile project~n"), + {ok, _} = retest:sh("./rebar -v compile"), + retest:log(info, "Run eunit with referenced deps on the code path~n"), + {ok, _} = retest:sh("./rebar -v eunit"), + ok. |