diff options
author | Loïc Hoguin <[email protected]> | 2015-09-24 17:46:32 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-09-24 17:56:50 +0200 |
commit | 608f6a85ad68a7bbd9140fcd0258161689612df0 (patch) | |
tree | a2ec225d9c3eda38c77a8ffd805e05a1ad4f345f /test | |
parent | dda1901dc7077ac4cf18d4d78b9e0cd548c85837 (diff) | |
download | erlang.mk-608f6a85ad68a7bbd9140fcd0258161689612df0.tar.gz erlang.mk-608f6a85ad68a7bbd9140fcd0258161689612df0.tar.bz2 erlang.mk-608f6a85ad68a7bbd9140fcd0258161689612df0.zip |
Add tests for IGNORE_DEPS
Fix IGNORE_DEPS not being propagated downward.
Fix IGNORE_DEPS handling with autopatched Rebar projects,
where the user defined value was overriden with the one
from autopatching.
Diffstat (limited to 'test')
-rw-r--r-- | test/core_deps.mk | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/test/core_deps.mk b/test/core_deps.mk index bac2cf7..da801f4 100644 --- a/test/core_deps.mk +++ b/test/core_deps.mk @@ -1,6 +1,6 @@ # Core: Packages and dependencies. -CORE_DEPS_CASES = build-c-8cc build-c-imagejs build-erl build-js dep-commit doc fetch-cp fetch-custom fetch-fail-bad fetch-fail-unknown fetch-git fetch-hex fetch-hg fetch-legacy fetch-svn order-first order-top otp pkg rel search shell test +CORE_DEPS_CASES = build-c-8cc build-c-imagejs build-erl build-js dep-commit doc fetch-cp fetch-custom fetch-fail-bad fetch-fail-unknown fetch-git fetch-hex fetch-hg fetch-legacy fetch-svn ignore order-first order-top otp pkg rel search shell test CORE_DEPS_TARGETS = $(addprefix core-deps-,$(CORE_DEPS_CASES)) CORE_DEPS_CLEAN_TARGETS = $(addprefix clean-,$(CORE_DEPS_TARGETS)) @@ -457,6 +457,40 @@ endif {ok, \"1.0.0\"} = application:get_key(cowlib, vsn), \ halt()" +core-deps-ignore: build clean-core-deps-ignore + + $i "Bootstrap a new OTP library named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + + $i "Add Cowboy to dependencies, Ranch to the ignore list and to test dependencies" + $t sed -i.bak '2i\ +DEPS = cowboy\ +IGNORE_DEPS = ranch\ +TEST_DEPS = ranch\ +' $(APP)/Makefile + +ifdef LEGACY + $i "Add Cowboy to the applications key in the .app.src file" + $t sed -i.bak '8i\ + cowboy,' $(APP)/src/$(APP).app.src +endif + + $i "Build the application" + $t $(MAKE) -C $(APP) $v + + $i "Check that the correct dependencies were fetched" + $t test -d $(APP)/deps/cowboy + $t test -d $(APP)/deps/cowlib + $t test ! -e $(APP)/deps/ranch + + $i "Build the test dependencies" + $t $(MAKE) -C $(APP) test-deps $v + + $i "Check that the correct dependencies were fetched" + $t test -d $(APP)/deps/ranch + # A lower-level dependency of the first dependency always # wins over a lower-level dependency of the second dependency. core-deps-order-first: build clean-core-deps-order-first |