diff options
author | Daniel Goertzen <[email protected]> | 2016-07-07 12:47:32 -0500 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-04-25 23:04:02 +0200 |
commit | 99606e41ca01f67b5f7809bb93d908e458efa398 (patch) | |
tree | 2187257dd48aecf799b9e915d41644b838e595b5 /test | |
parent | 0049f6501da1f6e70d21566c7b934a75df774dc2 (diff) | |
download | erlang.mk-99606e41ca01f67b5f7809bb93d908e458efa398.tar.gz erlang.mk-99606e41ca01f67b5f7809bb93d908e458efa398.tar.bz2 erlang.mk-99606e41ca01f67b5f7809bb93d908e458efa398.zip |
Add test for plugins test builds
Diffstat (limited to 'test')
-rw-r--r-- | test/core_plugins.mk | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/test/core_plugins.mk b/test/core_plugins.mk index 6d10f2a..2a534e9 100644 --- a/test/core_plugins.mk +++ b/test/core_plugins.mk @@ -1,6 +1,6 @@ # Core: External plugins. -CORE_PLUGINS_CASES = all one +CORE_PLUGINS_CASES = all one test CORE_PLUGINS_TARGETS = $(addprefix core-plugins-,$(CORE_PLUGINS_CASES)) .PHONY: core-plugins $(CORE_PLUGINS_TARGETS) @@ -70,3 +70,43 @@ core-plugins-one: build clean $i "Run 'make plugin2' and confirm the target doesn't exist" $t ! $(MAKE) --no-print-directory -C $(APP) plugin2 + +core-plugins-test: 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 "Write external plugin touch_plugin" + $t mkdir $(APP)/touch_plugin + $t echo -e "app::" >> $(APP)/touch_plugin/plugins.mk + $t echo -e "\ttouch markerfile" >> $(APP)/touch_plugin/plugins.mk + $t echo -e "test-build:: app" >> $(APP)/touch_plugin/plugins.mk + $t echo -e "clean::" >> $(APP)/touch_plugin/plugins.mk + $t echo -e "\trm -f markerfile" >> $(APP)/touch_plugin/plugins.mk + + $i "Inject external plugin dependencies into $(APP)" + $t echo 'BUILD_DEPS = touch_plugin' >>$(APP)/Makefile.tmp + $t echo 'DEP_PLUGINS = touch_plugin' >>$(APP)/Makefile.tmp + $t echo 'dep_touch_plugin = cp touch_plugin' >>$(APP)/Makefile.tmp + $t cat $(APP)/Makefile >>$(APP)/Makefile.tmp + $t mv $(APP)/Makefile.tmp $(APP)/Makefile + + $i "Build the application" + $t $(MAKE) -C $(APP) $v + + $i "Check that the application was compiled correctly" + $t test -e $(APP)/markerfile + + $i "Clean the application" + $t $(MAKE) -C $(APP) clean $v + + $i "Check that the application was cleaned correctly" + $t test ! -e $(APP)/markerfile + + $i "Run tests" + $t $(MAKE) -C $(APP) tests $v + + $i "Check that the application was compiled correctly" + $t test -e $(APP)/markerfile |