From e5b5d2c0bef5c85f2be5e006b57708fbc8f6a7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 10 Sep 2015 23:33:34 +0200 Subject: Add a test for the deleting of crash dumps --- test/Makefile | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'test/Makefile') diff --git a/test/Makefile b/test/Makefile index 8c206b0..f9b5e6b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -73,9 +73,6 @@ endef $(eval $(foreach t,$(patsubst %.mk,%,$(patsubst core_%,%,$(wildcard core_*.mk))),$(call include_core,$t))) -core:: core-help -clean-core:: clean-core-help - # Plugins. define include_plugin @@ -90,6 +87,28 @@ $(eval $(foreach t,$(patsubst %.mk,%,$(patsubst plugin_%,%,$(wildcard plugin_*.m # Tests that don't easily fit into other categories. +core:: core-clean-crash-dump core-help +clean-core:: clean-core-clean-crash-dump clean-core-help + +clean-core-clean-crash-dump clean-core-help: + $t rm -rf $(APP_TO_CLEAN)/ + +core-clean-crash-dump: build clean-core-clean-crash-dump + + $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 "Create a fake erl_crash.dump file" + $t touch $(APP)/erl_crash.dump + + $i "Clean the application" + $t $(MAKE) -C $(APP) clean $v + + $i "Check that the crash dump is removed" + $t test ! -e $(APP)/erl_crash.dump + core-help: build clean-core-help $i "Bootstrap a new OTP library named $(APP)" @@ -100,9 +119,6 @@ core-help: build clean-core-help $i "Run 'make help' and check that it prints help" $t test -n "`$(MAKE) -C $(APP) help` | grep Usage" -clean-core-help: - $t rm -rf $(APP_TO_CLEAN)/ - # @todo what about ERLC_OPTS etc. # @todo test AND document COMPILE_FIRST and COMPILE_MIB_FIRST # @todo when .app.src becomes legacy, test legacy -- cgit v1.2.3