aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <[email protected]>2015-09-08 11:02:34 +0200
committerJean-Sébastien Pédron <[email protected]>2015-09-09 12:14:13 +0200
commitc20251fa40ce7dc59d1d7f875f2867ea410ebbc1 (patch)
tree96d9e3173bfd4332ff9066887b2f29e7214cc740 /test/Makefile
parentb9c0bd643746ddd3424a91f6dd3cb6ad299cd342 (diff)
downloaderlang.mk-c20251fa40ce7dc59d1d7f875f2867ea410ebbc1.tar.gz
erlang.mk-c20251fa40ce7dc59d1d7f875f2867ea410ebbc1.tar.bz2
erlang.mk-c20251fa40ce7dc59d1d7f875f2867ea410ebbc1.zip
core.mk: Allow to take erlang.mk from an alternate Git repository
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile30
1 files changed, 29 insertions, 1 deletions
diff --git a/test/Makefile b/test/Makefile
index b987cd8..5ca47bc 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1323,7 +1323,7 @@ $(CORE_APP_CLEAN_TARGETS):
# Core: Erlang.mk upgrade.
-CORE_UPGRADE_CASES = no-config custom-config renamed-config custom-build-dir
+CORE_UPGRADE_CASES = alt-erlangmk-repo no-config custom-config renamed-config custom-build-dir
CORE_UPGRADE_TARGETS = $(addprefix core-upgrade-,$(CORE_UPGRADE_CASES))
CORE_UPGRADE_CLEAN_TARGETS = $(addprefix clean-,$(CORE_UPGRADE_TARGETS))
@@ -1331,6 +1331,34 @@ CORE_UPGRADE_CLEAN_TARGETS = $(addprefix clean-,$(CORE_UPGRADE_TARGETS))
core-upgrade: $(CORE_UPGRADE_TARGETS)
+core-upgrade-alt-erlangmk-repo: build clean-core-upgrade-alt-erlangmk-repo
+
+ $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 modify it"
+ $t git clone -q file://$(abspath $(CURDIR)/..) $(APP)/alt-erlangmk-repo
+ $t sed -i.bak '1i\
+# Copyright (c) erlang.mk Testsuite!\
+' $(APP)/alt-erlangmk-repo/core/core.mk
+ $t (cd $(APP)/alt-erlangmk-repo && \
+ git checkout -q -b test-copyright && \
+ git commit -q -a -m 'Add Testsuite copyright')
+
+ $i "Point application to an alternate erlang.mk repository"
+ $t sed -i.bak '2i\
+ERLANG_MK_REPO = file://$(abspath $(APP)/alt-erlangmk-repo)\
+ERLANG_MK_COMMIT = test-copyright\
+' $(APP)/Makefile
+
+ $i "Update erlang.mk"
+ $t $(MAKE) -C $(APP) erlang-mk $v
+
+ $i "Check our modification is there"
+ $t grep -q "# Copyright (c) erlang.mk Testsuite!" $(APP)/erlang.mk
+
core-upgrade-no-config: build clean-core-upgrade-no-config
$i "Bootstrap a new OTP library named $(APP)"