From c20251fa40ce7dc59d1d7f875f2867ea410ebbc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Tue, 8 Sep 2015 11:02:34 +0200 Subject: core.mk: Allow to take erlang.mk from an alternate Git repository --- test/Makefile | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'test/Makefile') 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)" -- cgit v1.2.3