aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-12-03 20:50:42 +0100
committerLoïc Hoguin <[email protected]>2018-12-03 20:52:10 +0100
commit2163fef859c46ebe5f3d7827ce8ddfd45ee56691 (patch)
tree92da2d13ec3a647c14dacd878bf52c31e5d69d35 /test
parent983f82bdfcb3e78f04468fcfd02d6a6ee5869b13 (diff)
downloaderlang.mk-2163fef859c46ebe5f3d7827ce8ddfd45ee56691.tar.gz
erlang.mk-2163fef859c46ebe5f3d7827ce8ddfd45ee56691.tar.bz2
erlang.mk-2163fef859c46ebe5f3d7827ce8ddfd45ee56691.zip
Print a changelog when updating Erlang.mk
Diffstat (limited to 'test')
-rw-r--r--test/core_upgrade.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/core_upgrade.mk b/test/core_upgrade.mk
index 3a2a43e..9567518 100644
--- a/test/core_upgrade.mk
+++ b/test/core_upgrade.mk
@@ -6,6 +6,30 @@ CORE_UPGRADE_TARGETS = $(call list_targets,core-upgrade)
core-upgrade: $(CORE_UPGRADE_TARGETS)
+core-upgrade-changelog: build clean
+
+ $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 "Fork erlang.mk locally and set a test CHANGELOG.asciidoc"
+ $t git clone -q https://github.com/ninenines/erlang.mk $(APP)/alt-erlangmk-repo
+ $t echo "$(APP)$(APP)" > $(APP)/alt-erlangmk-repo/CHANGELOG.asciidoc
+# Since part of this functionality needs the main Makefile, copy it.
+ $t cp ../Makefile $(APP)/alt-erlangmk-repo/
+ $t (cd $(APP)/alt-erlangmk-repo && \
+ git config user.email "[email protected]" && \
+ git config user.name "test suite" && \
+ git add CHANGELOG.asciidoc Makefile && \
+ git commit -q --no-gpg-sign -a -m 'Add test changelog')
+
+ $i "Point application to an alternate erlang.mk repository"
+ $t perl -ni.bak -e 'print;if ($$.==1) {print "ERLANG_MK_REPO = file://$(abspath $(APP)/alt-erlangmk-repo)\n"}' $(APP)/Makefile
+
+ $i "Update erlang.mk; CHANGELOG.asciidoc should be printed"
+ $t $(MAKE) -C $(APP) erlang-mk | grep -c "$(APP)$(APP)" | grep -q 1
+
core-upgrade-conflicting-configs: build clean
$i "Bootstrap a new OTP library named $(APP)"