summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--lib/compiler/test/Makefile11
-rw-r--r--lib/compiler/test/test_lib.erl22
3 files changed, 25 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index f06f8291f4..661d788b95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -254,6 +254,7 @@ JAVADOC-GENERATED
/lib/compiler/src/core_parse.erl
/lib/compiler/test/*_no_opt_SUITE.erl
+/lib/compiler/test/*_no_copt_SUITE.erl
/lib/compiler/test/*_no_ssa_opt_SUITE.erl
/lib/compiler/test/*_post_opt_SUITE.erl
/lib/compiler/test/*_inline_SUITE.erl
diff --git a/lib/compiler/test/Makefile b/lib/compiler/test/Makefile
index 5ff5eca846..8facf24860 100644
--- a/lib/compiler/test/Makefile
+++ b/lib/compiler/test/Makefile
@@ -122,6 +122,8 @@ NO_OPT_MODULES= $(NO_OPT:%=%_no_opt_SUITE)
NO_OPT_ERL_FILES= $(NO_OPT_MODULES:%=%.erl)
POST_OPT_MODULES= $(NO_OPT:%=%_post_opt_SUITE)
POST_OPT_ERL_FILES= $(POST_OPT_MODULES:%=%.erl)
+NO_CORE_OPT_MODULES= $(NO_OPT:%=%_no_copt_SUITE)
+NO_CORE_OPT_ERL_FILES= $(NO_CORE_OPT_MODULES:%=%.erl)
INLINE_MODULES= $(INLINE:%=%_inline_SUITE)
INLINE_ERL_FILES= $(INLINE_MODULES:%=%.erl)
R21_MODULES= $(R21:%=%_r21_SUITE)
@@ -165,7 +167,8 @@ EBIN = .
DISABLE_SSA_OPT = +no_beam_ssa_bool +no_share_opt +no_bsm_opt +no_fun_opt +no_ssa_opt +no_recv_opt
make_emakefile: $(NO_OPT_ERL_FILES) $(POST_OPT_ERL_FILES) $(NO_SSA_OPT_ERL_FILES) \
- $(INLINE_ERL_FILES) $(R21_ERL_FILES) $(NO_MOD_OPT_ERL_FILES) $(NO_TYPE_OPT_ERL_FILES) \
+ $(NO_CORE_OPT_ERL_FILES) $(INLINE_ERL_FILES) $(R21_ERL_FILES) \
+ $(NO_MOD_OPT_ERL_FILES) $(NO_TYPE_OPT_ERL_FILES) \
$(DIALYZER_ERL_FILES)
$(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
> $(EMAKEFILE)
@@ -175,6 +178,8 @@ make_emakefile: $(NO_OPT_ERL_FILES) $(POST_OPT_ERL_FILES) $(NO_SSA_OPT_ERL_FILES
-o$(EBIN) $(NO_SSA_OPT_MODULES) >> $(EMAKEFILE)
$(ERL_TOP)/make/make_emakefile +no_copt $(DISABLE_SSA_OPT) $(ERL_COMPILE_FLAGS) \
-o$(EBIN) $(POST_OPT_MODULES) >> $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile +no_copt $(ERL_COMPILE_FLAGS) \
+ -o$(EBIN) $(NO_CORE_OPT_MODULES) >> $(EMAKEFILE)
$(ERL_TOP)/make/make_emakefile +inline $(ERL_COMPILE_FLAGS) \
-o$(EBIN) $(INLINE_MODULES) >> $(EMAKEFILE)
$(ERL_TOP)/make/make_emakefile +r21 $(ERL_COMPILE_FLAGS) \
@@ -211,6 +216,9 @@ docs:
%_post_opt_SUITE.erl: %_SUITE.erl
sed -e 's;-module($(basename $<));-module($(basename $@));' $< > $@
+%_no_copt_SUITE.erl: %_SUITE.erl
+ sed -e 's;-module($(basename $<));-module($(basename $@));' $< > $@
+
%_inline_SUITE.erl: %_SUITE.erl
sed -e 's;-module($(basename $<));-module($(basename $@));' $< > $@
@@ -239,6 +247,7 @@ release_tests_spec: make_emakefile
$(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
$(INSTALL_DATA) $(NO_OPT_ERL_FILES) $(POST_OPT_ERL_FILES) \
$(INLINE_ERL_FILES) $(R21_ERL_FILES) \
+ $(NO_CORE_OPT_ERL_FILES) \
$(NO_MOD_OPT_ERL_FILES) \
$(NO_SSA_OPT_ERL_FILES) \
$(NO_TYPE_OPT_ERL_FILES) \
diff --git a/lib/compiler/test/test_lib.erl b/lib/compiler/test/test_lib.erl
index 7f8d19a277..1bf1040163 100644
--- a/lib/compiler/test/test_lib.erl
+++ b/lib/compiler/test/test_lib.erl
@@ -110,15 +110,20 @@ opt_opts(Mod) ->
%% This function retrieves the path to the original data directory.
get_data_dir(Config) ->
- Data0 = proplists:get_value(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Opts = [{return,list}],
- Data1 = re:replace(Data0, "_no_opt_SUITE", "_SUITE", Opts),
- Data2 = re:replace(Data1, "_post_opt_SUITE", "_SUITE", Opts),
- Data3 = re:replace(Data2, "_inline_SUITE", "_SUITE", Opts),
- Data4 = re:replace(Data3, "_r21_SUITE", "_SUITE", Opts),
- Data5 = re:replace(Data4, "_no_module_opt_SUITE", "_SUITE", Opts),
- Data = re:replace(Data5, "_no_type_opt_SUITE", "_SUITE", Opts),
- re:replace(Data, "_no_ssa_opt_SUITE", "_SUITE", Opts).
+ Suffixes = ["_no_opt_SUITE",
+ "_no_copt_SUITE",
+ "_post_opt_SUITE",
+ "_inline_SUITE",
+ "_r21_SUITE",
+ "_no_module_opt_SUITE",
+ "_no_type_opt_SUITE",
+ "_no_ssa_opt_SUITE"],
+ lists:foldl(fun(Suffix, Acc) ->
+ Opts = [{return,list}],
+ re:replace(Acc, Suffix, "_SUITE", Opts)
+ end, Data, Suffixes).
is_cloned_mod(Mod) ->
is_cloned_mod_1(atom_to_list(Mod)).
@@ -126,6 +131,7 @@ is_cloned_mod(Mod) ->
%% Test whether Mod is a cloned module.
is_cloned_mod_1("_no_opt_SUITE") -> true;
+is_cloned_mod_1("_no_copt_SUITE") -> true;
is_cloned_mod_1("_no_ssa_opt_SUITE") -> true;
is_cloned_mod_1("_post_opt_SUITE") -> true;
is_cloned_mod_1("_inline_SUITE") -> true;