aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test/make_SUITE.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2017-06-30 15:20:48 +0200
committerErlang/OTP <[email protected]>2017-06-30 15:20:48 +0200
commit921c88d10ef1e92d30d71aea38af07d63a5c2611 (patch)
tree087d818a9a42f106c9b3a8a10196e0d50a8b708c /lib/tools/test/make_SUITE.erl
parentc73d8d9feb9b0ebc988bd44ed340988df12c53b2 (diff)
parent3defef54fba953cb4ab5298dacc15af9c9bd25ec (diff)
downloadotp-921c88d10ef1e92d30d71aea38af07d63a5c2611.tar.gz
otp-921c88d10ef1e92d30d71aea38af07d63a5c2611.tar.bz2
otp-921c88d10ef1e92d30d71aea38af07d63a5c2611.zip
Merge branch 'siri/make/default-outdir/ERL-438/OTP-14489' into maint-20
* siri/make/default-outdir/ERL-438/OTP-14489: [ct_make] Do not use the interactive tool 'c' from ct_make Use current dir as default outdir for c:c/1,2 [make] Do not use the interactive tool 'c' from make
Diffstat (limited to 'lib/tools/test/make_SUITE.erl')
-rw-r--r--lib/tools/test/make_SUITE.erl43
1 files changed, 42 insertions, 1 deletions
diff --git a/lib/tools/test/make_SUITE.erl b/lib/tools/test/make_SUITE.erl
index 2f6fe1c732..02da4f4ace 100644
--- a/lib/tools/test/make_SUITE.erl
+++ b/lib/tools/test/make_SUITE.erl
@@ -36,7 +36,7 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [make_all, make_files, recompile_on_changed_include,
+ [make_all, make_files, load, netload, recompile_on_changed_include,
emake_opts, {group, otp_6057}].
groups() ->
@@ -55,6 +55,21 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
otp_6057_end(Config).
+init_per_testcase(_,Config) ->
+ Config.
+
+end_per_testcase(netload,_Config) ->
+ %% Stop slave - in case of failure
+ Nodes = nodes(),
+ case [N || N <- Nodes,
+ "make_SUITE_netload" == hd(string:lexemes(atom_to_list(N),"@"))] of
+ [Node] ->
+ ct_slave:stop(Node);
+ _ ->
+ ok
+ end;
+end_per_testcase(_,_Config) ->
+ ok.
test_files() -> ["test1", "test2", "test3", "test4"].
@@ -83,6 +98,32 @@ make_files(Config) when is_list(Config) ->
ensure_no_messages(),
ok.
+load(Config) ->
+ Current = prepare_data_dir(Config),
+ code:purge(test1),
+ code:delete(test1),
+ false = code:is_loaded(test1),
+ up_to_date = make:files([test1], [load]),
+ {file,_} = code:is_loaded(test1),
+ file:set_cwd(Current),
+ ensure_no_messages(),
+ ok.
+
+netload(Config) ->
+ Current = prepare_data_dir(Config),
+ code:purge(test1),
+ code:delete(test1),
+ false = code:is_loaded(test1),
+ {ok,Node} = ct_slave:start(make_SUITE_netload),
+ up_to_date = make:files([test1], [netload]),
+ timer:sleep(1000), % async, so give some time
+ {file,F} = code:is_loaded(test1),
+ {file,F} = rpc:call(Node,code,is_loaded,[test1]),
+ ct_slave:stop(Node),
+ file:set_cwd(Current),
+ ensure_no_messages(),
+ ok.
+
recompile_on_changed_include(Config) ->
Current = prepare_data_dir(Config),