diff options
author | Jean-Sébastien Pédron <[email protected]> | 2019-06-21 10:46:14 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-06-21 12:38:01 +0200 |
commit | 9ac041d9f6a4145959352945b51244a8439ef270 (patch) | |
tree | 0632dce7344cf3f1428d8b296e99ae740ff23414 /test | |
parent | 9f89dd73fc478cbd688245b785c627a18af0f20f (diff) | |
download | erlang.mk-9ac041d9f6a4145959352945b51244a8439ef270.tar.gz erlang.mk-9ac041d9f6a4145959352945b51244a8439ef270.tar.bz2 erlang.mk-9ac041d9f6a4145959352945b51244a8439ef270.zip |
Test `list-deps` behavior with various values of `FULL`
Here, we want to make sure that `list-deps` always lists all
dependencies, no matter if they are up-to-date or not. I.e. we want to
always visit them and list them recursively.
Diffstat (limited to 'test')
-rw-r--r-- | test/core_deps.mk | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/core_deps.mk b/test/core_deps.mk index 87f9855..8facf4d 100644 --- a/test/core_deps.mk +++ b/test/core_deps.mk @@ -885,6 +885,53 @@ LOCAL_DEPS = my_app\ $t cmp $(APP)/expected-deps.txt $(APP)/.erlang.mk/recursive-deps-list.log $t $(MAKE) -C $(APP) --no-print-directory distclean $v +core-deps-list-deps-with-specified-full-var: init + +# We pass $(MAKE) directly so that GNU Make can pass its context forward. +# If we didn't then $(MAKE) would be expanded in the call without context. + $(call add_dep_and_subdep,,$(MAKE)) + + $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 $(APP)-dep as a dependency" + $t sed -i.bak '2i\ +DEPS = dep\ +dep_dep = git file://$(abspath $(APP)_dep) master\ +' $(APP)/Makefile + $t rm $(APP)/Makefile.bak + + $i "Create a Git repository for $(APP)" + $t (cd $(APP) && \ + git init -q && \ + git config user.name "Testsuite" && \ + git config user.email "[email protected]" && \ + git add . && \ + git commit -q --no-gpg-sign -m "Initial commit") + + $i "Build application" + $t $(MAKE) -C $(APP) --no-print-directory $v + $t test -d $(APP)/deps/subdep + + $i "List application dependencies without FULL" + $t $(MAKE) -C $(APP) --no-print-directory list-deps $v + $t printf "%s\n%s\n" $(abspath $(APP)/deps/dep $(APP)/deps/subdep) > $(APP)/expected-deps.txt + $t cmp $(APP)/expected-deps.txt $(APP)/.erlang.mk/recursive-deps-list.log + + $i "List application dependencies with empty FULL" + $t $(MAKE) -C $(APP) --no-print-directory list-deps FULL= $v + $t printf "%s\n%s\n" $(abspath $(APP)/deps/dep $(APP)/deps/subdep) > $(APP)/expected-deps.txt + $t cmp $(APP)/expected-deps.txt $(APP)/.erlang.mk/recursive-deps-list.log + + $i "List application dependencies with FULL=1" + $t $(MAKE) -C $(APP) --no-print-directory list-deps FULL=1 $v + $t printf "%s\n%s\n" $(abspath $(APP)/deps/dep $(APP)/deps/subdep) > $(APP)/expected-deps.txt + $t cmp $(APP)/expected-deps.txt $(APP)/.erlang.mk/recursive-deps-list.log + + $t $(MAKE) -C $(APP) --no-print-directory distclean $v + core-deps-makefile-change: init $i "Bootstrap a new OTP application named $(APP)" |