aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test/make_SUITE.erl
diff options
context:
space:
mode:
authorAnthony Jackson <[email protected]>2017-03-03 10:57:58 +0200
committerAnthony Jackson <[email protected]>2017-03-03 10:57:58 +0200
commit532a74a36a889e3d7d25004ebce70da62b013755 (patch)
tree769d9ee1d3de10ee4721ba88bb078e86fd31bbfa /lib/tools/test/make_SUITE.erl
parentb03fffab761b99efdac70816af25f4d8df1f2a49 (diff)
downloadotp-532a74a36a889e3d7d25004ebce70da62b013755.tar.gz
otp-532a74a36a889e3d7d25004ebce70da62b013755.tar.bz2
otp-532a74a36a889e3d7d25004ebce70da62b013755.zip
tools: Allow Emake options to be passed in explicitly
This allows build scripts to use emake without needing to generate an Emakefile before running make:all/0,1 or make:file/1,2.
Diffstat (limited to 'lib/tools/test/make_SUITE.erl')
-rw-r--r--lib/tools/test/make_SUITE.erl18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/tools/test/make_SUITE.erl b/lib/tools/test/make_SUITE.erl
index e6284db8b8..2a94ead329 100644
--- a/lib/tools/test/make_SUITE.erl
+++ b/lib/tools/test/make_SUITE.erl
@@ -20,7 +20,7 @@
-module(make_SUITE).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2, make_all/1, make_files/1]).
+ init_per_group/2,end_per_group/2, make_all/1, make_files/1, emake_opts/1]).
-export([otp_6057_init/1,
otp_6057_a/1, otp_6057_b/1, otp_6057_c/1,
otp_6057_end/1]).
@@ -40,7 +40,7 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [make_all, make_files, {group, otp_6057}].
+ [make_all, make_files, emake_opts, {group, otp_6057}].
groups() ->
[{otp_6057,[],[otp_6057_a, otp_6057_b,
@@ -86,6 +86,20 @@ make_files(Config) when is_list(Config) ->
ensure_no_messages(),
ok.
+emake_opts(Config) when is_list(Config) ->
+ Current = prepare_data_dir(Config),
+
+ %% prove that emake is used in opts instead of local Emakefile
+ Opts = [{emake, [test8, test9]}],
+ error = make:all(Opts),
+ error = make:files([test9], Opts),
+ "test8.beam" = ensure_exists([test8]),
+ "test9.beam" = ensure_exists([test9]),
+ "test5.S" = ensure_exists(["test5"],".S"),
+
+ file:set_cwd(Current),
+ ensure_no_messages(),
+ ok.
%% Moves to the data directory of this suite, clean it from any object
%% files (*.jam for a JAM emulator). Returns the previous directory.