diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-11-21 19:30:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 19:30:10 -0500 |
commit | 07e19ba60dfd04b1d81e1d5764a814f06c9dbcb2 (patch) | |
tree | 93451580abb1901d7f2d186ce2a04965461b9893 | |
parent | 0c801bc6c43ff58c8a6c1a3034c5414db3dd7a78 (diff) | |
parent | 510748e099b27e7ccff33524f38895f306925587 (diff) |
Merge pull request #1667 from ferd/lrascao-profile_dep_countertest
Fix broken tests
-rw-r--r-- | test/rebar_compile_SUITE.erl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/rebar_compile_SUITE.erl b/test/rebar_compile_SUITE.erl index 1655336..c5336cf 100644 --- a/test/rebar_compile_SUITE.erl +++ b/test/rebar_compile_SUITE.erl @@ -40,6 +40,7 @@ clean_all/1, override_deps/1, profile_override_deps/1, + profile_deps/1, deps_build_in_prod/1, include_file_relative_to_working_directory/1, include_file_in_src/1, @@ -76,6 +77,7 @@ all() -> parse_transform_test, erl_first_files_test, mib_test, umbrella_mib_first_test, only_default_transitive_deps, clean_all, override_deps, profile_override_deps, deps_build_in_prod, + profile_override_deps, profile_deps, deps_build_in_prod, include_file_relative_to_working_directory, include_file_in_src, include_file_relative_to_working_directory_test, include_file_in_src_test, include_file_in_src_test_multiapp, @@ -1288,9 +1290,10 @@ override_deps(Config) -> ). profile_override_deps(Config) -> - mock_git_resource:mock([{deps, [{some_dep, "0.0.1"},{other_dep, "0.0.1"}]}]), Deps = rebar_test_utils:expand_deps(git, [{"some_dep", "0.0.1", [{"other_dep", "0.0.1", []}]}]), TopDeps = rebar_test_utils:top_level_deps(Deps), + {SrcDeps, _} = rebar_test_utils:flat_deps(Deps), + mock_git_resource:mock([{deps, SrcDeps}]), RebarConfig = [ {deps, TopDeps}, @@ -1307,6 +1310,20 @@ profile_override_deps(Config) -> {ok, [{dep, "some_dep"},{dep_not_exist, "other_dep"}]} ). +profile_deps(Config) -> + Deps = rebar_test_utils:expand_deps(git, [{"some_dep", "0.0.1", [{"other_dep", "0.0.1", []}]}]), + TopDeps = rebar_test_utils:top_level_deps(Deps), + {SrcDeps, _} = rebar_test_utils:flat_deps(Deps), + mock_git_resource:mock([{deps, SrcDeps}]), + + RebarConfig = [ + {deps, TopDeps}, + {profiles, [{a, []}]}], + rebar_test_utils:run_and_check( + Config, RebarConfig, ["as", "a", "compile"], + {ok, [{dep, "some_dep"},{dep, "other_dep"}]} + ). + %% verify a deps prod profile is used %% tested by checking prod hooks run and outputs to default profile dir for dep %% and prod deps are installed for dep |