diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-12-04 15:46:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-04 15:46:17 -0500 |
commit | 4b5a66ff65b304ea4b3b80058a4819cfc1c72fc4 (patch) | |
tree | 954440e8344ed8ad53ab92cf9cde6266ae4c7595 /test/rebar_cover_SUITE.erl | |
parent | f81f144f38f51efd9ab2d312b1a61dc464fd4738 (diff) | |
parent | 72b649cc664747d7682eec7150f6ad022b3838ae (diff) |
Merge pull request #1684 from tsloughter/cover-export
add eunit and ct option to set coverdata file name
Diffstat (limited to 'test/rebar_cover_SUITE.erl')
-rw-r--r-- | test/rebar_cover_SUITE.erl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/rebar_cover_SUITE.erl b/test/rebar_cover_SUITE.erl index cc06c95..c99dbb7 100644 --- a/test/rebar_cover_SUITE.erl +++ b/test/rebar_cover_SUITE.erl @@ -7,6 +7,7 @@ all/0, flag_coverdata_written/1, config_coverdata_written/1, + config_coverdata_overridden_name_written/1, basic_extra_src_dirs/1, release_extra_src_dirs/1, root_extra_src_dirs/1, @@ -34,6 +35,7 @@ init_per_testcase(_, Config) -> all() -> [flag_coverdata_written, config_coverdata_written, + config_coverdata_overridden_name_written, basic_extra_src_dirs, release_extra_src_dirs, root_extra_src_dirs, index_written, @@ -70,6 +72,21 @@ config_coverdata_written(Config) -> true = filelib:is_file(filename:join([AppDir, "_build", "test", "cover", "eunit.coverdata"])). +config_coverdata_overridden_name_written(Config) -> + AppDir = ?config(apps, Config), + + Name = rebar_test_utils:create_random_name("cover_"), + Vsn = rebar_test_utils:create_random_vsn(), + rebar_test_utils:create_eunit_app(AppDir, Name, Vsn, [kernel, stdlib]), + + RebarConfig = [{erl_opts, [{d, some_define}]}, {cover_enabled, true}], + rebar_test_utils:run_and_check(Config, + RebarConfig, + ["eunit", "--cover_export_name=test_name"], + {ok, [{app, Name}]}), + + true = filelib:is_file(filename:join([AppDir, "_build", "test", "cover", "test_name.coverdata"])). + basic_extra_src_dirs(Config) -> AppDir = ?config(apps, Config), |