aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-09-10 23:33:34 +0200
committerLoïc Hoguin <[email protected]>2015-09-10 23:33:34 +0200
commite5b5d2c0bef5c85f2be5e006b57708fbc8f6a7b5 (patch)
tree9c59551167090f46c04ac655439e639fc07bf4d7 /test
parent67fba314764a4628748629be3db0ed38976a7b80 (diff)
downloaderlang.mk-e5b5d2c0bef5c85f2be5e006b57708fbc8f6a7b5.tar.gz
erlang.mk-e5b5d2c0bef5c85f2be5e006b57708fbc8f6a7b5.tar.bz2
erlang.mk-e5b5d2c0bef5c85f2be5e006b57708fbc8f6a7b5.zip
Add a test for the deleting of crash dumps
Diffstat (limited to 'test')
-rw-r--r--test/Makefile28
1 files changed, 22 insertions, 6 deletions
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