aboutsummaryrefslogtreecommitdiffstats
path: root/test/core_app.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-09-11 10:45:11 +0200
committerLoïc Hoguin <[email protected]>2015-09-11 10:45:11 +0200
commit704ca7b8ef963de31db9f386c5782c243760d497 (patch)
tree6484e02eac561de38f7d1e9e58cc40373e902794 /test/core_app.mk
parent1a1020285bbc5b457983856872f147876819b233 (diff)
downloaderlang.mk-704ca7b8ef963de31db9f386c5782c243760d497.tar.gz
erlang.mk-704ca7b8ef963de31db9f386c5782c243760d497.tar.bz2
erlang.mk-704ca7b8ef963de31db9f386c5782c243760d497.zip
Add another ERLC_OPTS test where we filter-out +debug_info
Diffstat (limited to 'test/core_app.mk')
-rw-r--r--test/core_app.mk29
1 files changed, 28 insertions, 1 deletions
diff --git a/test/core_app.mk b/test/core_app.mk
index bbdec6b..a091554 100644
--- a/test/core_app.mk
+++ b/test/core_app.mk
@@ -1,6 +1,6 @@
# Core: Building applications.
-CORE_APP_CASES = asn1 erlc-opts error generate-erl generate-erl-include generate-erl-prepend hrl hrl-recursive mib no-app no-makedep xrl xrl-include yrl yrl-include
+CORE_APP_CASES = asn1 erlc-opts erlc-opts-filter error generate-erl generate-erl-include generate-erl-prepend hrl hrl-recursive mib no-app no-makedep xrl xrl-include yrl yrl-include
CORE_APP_TARGETS = $(addprefix core-app-,$(CORE_APP_CASES))
CORE_APP_CLEAN_TARGETS = $(addprefix clean-,$(CORE_APP_TARGETS))
@@ -157,6 +157,33 @@ core-app-erlc-opts: build clean-core-app-erlc-opts
false = proplists:is_defined(debug_info, proplists:get_value(options, girl:module_info(compile))), \
halt()"
+core-app-erlc-opts-filter: build clean-core-app-erlc-opts-filter
+
+ $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 "Define ERLC_OPTS filtering out debug_info"
+ $t echo "ERLC_OPTS := \$$(filter-out +debug_info,\$$(ERLC_OPTS))" >> $(APP)/Makefile
+
+ $i "Generate .erl files"
+ $t echo "-module(boy)." > $(APP)/src/boy.erl
+ $t echo "-module(girl)." > $(APP)/src/girl.erl
+
+ $i "Build the application"
+ $t $(MAKE) -C $(APP) $v
+
+ $i "Check that the application was compiled correctly (without debug_info)"
+ $t $(ERL) -pa $(APP)/ebin/ -eval " \
+ ok = application:start($(APP)), \
+ {ok, Mods = [boy, girl]} \
+ = application:get_key($(APP), modules), \
+ [{module, M} = code:load_file(M) || M <- Mods], \
+ false = proplists:is_defined(debug_info, proplists:get_value(options, boy:module_info(compile))), \
+ false = proplists:is_defined(debug_info, proplists:get_value(options, girl:module_info(compile))), \
+ halt()"
+
core-app-error: build clean-core-app-error
$i "Bootstrap a new OTP library named $(APP)"