diff options
Diffstat (limited to 'erts/test')
-rw-r--r-- | erts/test/install_SUITE.erl | 46 | ||||
-rw-r--r-- | erts/test/run_erl_SUITE.erl | 19 | ||||
-rw-r--r-- | erts/test/system_smoke.spec | 7 | ||||
-rw-r--r-- | erts/test/upgrade_SUITE.erl | 7 | ||||
-rw-r--r-- | erts/test/z_SUITE.erl | 14 |
5 files changed, 58 insertions, 35 deletions
diff --git a/erts/test/install_SUITE.erl b/erts/test/install_SUITE.erl index 2c7e8972f6..d6c6d6f30e 100644 --- a/erts/test/install_SUITE.erl +++ b/erts/test/install_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2016. All Rights Reserved. +%% Copyright Ericsson AB 2010-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ %% %CopyrightEnd% %% - %%%------------------------------------------------------------------- %%% File : install_SUITE.erl %%% Author : Rickard Green @@ -63,12 +62,12 @@ erlang_bindir = "", bindir_symlinks = ""}). -need_symlink_cases() -> +need_symlink_cases() -> [bin_unreachable_absolute, bin_unreachable_relative, bin_same_dir, bin_ok_symlink, bin_dirname_fail, bin_no_use_dirname_fail]. -dont_need_symlink_cases() -> +dont_need_symlink_cases() -> [bin_default, bin_default_dirty, bin_outside_eprfx, bin_outside_eprfx_dirty, bin_not_abs, bin_unreasonable_path, 'bin white space', @@ -78,10 +77,9 @@ suite() -> [{ct_hooks,[ts_install_cth]}, {timetrap, {minutes, 1}}]. -all() -> +all() -> dont_need_symlink_cases() ++ need_symlink_cases(). - %% %% The test cases %% @@ -533,21 +531,19 @@ bin_no_srcfile(Config) when is_list(Config) -> ChkRes). %% -%% %% Auxiliary functions %% -%% expect(X, X) -> - io:format("result: ~p~n", [X]), + io:format("result: ~tp~n", [X]), io:format("-----------------------------------------------~n", []), ok; expect(X, Y) -> - io:format("expected: ~p~n", [X]), - io:format("got : ~p~n", [Y]), + io:format("expected: ~tp~n", [X]), + io:format("got : ~tp~n", [Y]), io:format("-----------------------------------------------~n", []), ct:fail({X,Y}). - + init_per_suite(Config) -> PD = proplists:get_value(priv_dir, Config), SymLinks = case os:type() of @@ -630,8 +626,8 @@ install_bin(Config, #inst{mkdirs = MkDirs, true -> ok; false -> {comment, "No symlink tests run, since symlinks not working"} end. - - + + install_bin2(Config, Inst, ChkRes) -> install_bin3(Config, Inst#inst{symlinks = false, ln_s = "ln"}, ChkRes), @@ -662,8 +658,6 @@ install_bin2(Config, Inst, ChkRes) -> false -> ok end. - - install_bin3(Config, #inst{cmd_prefix = CMD_PRFX, @@ -690,20 +684,20 @@ install_bin3(Config, ++ "\" --exec-prefix \"" ++ EXEC_PREFIX ++ "\" --test-file \"" ++ ResFile ++ "\" erl erlc", - io:format("CMD_PRFX = \"~s\"~n" - "LN_S = \"~s\"~n" - "BINDIR_SYMLINKS = \"~s\"~n" - "exec_prefix = \"~s\"~n" - "bindir = \"~s\"~n" - "erlang_bindir = \"~s\"~n" - "EXTRA_PREFIX = \"~s\"~n" - "DESTDIR = \"~s\"~n", + io:format("CMD_PRFX = \"~ts\"~n" + "LN_S = \"~ts\"~n" + "BINDIR_SYMLINKS = \"~ts\"~n" + "exec_prefix = \"~ts\"~n" + "bindir = \"~ts\"~n" + "erlang_bindir = \"~ts\"~n" + "EXTRA_PREFIX = \"~ts\"~n" + "DESTDIR = \"~ts\"~n", [CMD_PRFX, LN_S, BINDIR_SYMLINKS, EXEC_PREFIX, BINDIR, ERLANG_BINDIR, EXTRA_PREFIX, DESTDIR]), - io:format("$ ~s~n", [Cmd]), + io:format("$ ~ts~n", [Cmd]), CmdOutput = os:cmd(Cmd), - io:format("~s~n", [CmdOutput]), + io:format("~ts~n", [CmdOutput]), ChkRes(case file:consult(ResFile) of {ok, [Res]} -> Res; Err -> exit({result, Err}) diff --git a/erts/test/run_erl_SUITE.erl b/erts/test/run_erl_SUITE.erl index 47d38bde7c..fe1ccba1e2 100644 --- a/erts/test/run_erl_SUITE.erl +++ b/erts/test/run_erl_SUITE.erl @@ -22,6 +22,7 @@ -export([all/0, suite/0]). -export([basic/1,heavy/1,heavier/1,defunct/1]). +-export([sleepy_child/1]). -export([ping_me_back/1]). -include_lib("common_test/include/ct.hrl"). @@ -31,17 +32,17 @@ suite() -> {timetrap, {minutes, 2}}]. all() -> - [basic, heavy, heavier, defunct]. + [basic, sleepy_child, heavy, heavier, defunct]. basic(Config) when is_list(Config) -> case os:type() of - {unix,_} -> basic_1(Config); + {unix,_} -> basic_1(Config, "basic", ""); _ -> {skip,"Not Unix"} end. -basic_1(Config) -> - {Node,Pipe} = do_run_erl(Config, "basic"), +basic_1(Config, Case, Opt) -> + {Node,Pipe} = do_run_erl(Config, Case, Opt), ToErl = open_port({spawn,"to_erl "++Pipe}, []), erlang:port_command(ToErl, "halt().\r\n"), @@ -55,6 +56,12 @@ basic_1(Config) -> ok. +sleepy_child(Config) when is_list(Config) -> + case os:type() of + {unix,_} -> basic_1(Config, "sleepy_child", "-sleepy-child "); + _ -> {skip,"Not Unix"} + end. + heavy(Config) when is_list(Config) -> case os:type() of {unix,_} -> heavy_1(Config); @@ -233,12 +240,14 @@ defunct_2(Config, Perl) -> %%% Utilities. do_run_erl(Config, Case) -> + do_run_erl(Config, Case, ""). +do_run_erl(Config, Case, Opt) -> Priv = proplists:get_value(priv_dir, Config), LogDir = filename:join(Priv, Case), ok = file:make_dir(LogDir), Pipe = LogDir ++ "/", NodeName = "run_erl_node_" ++ Case, - Cmd = "run_erl "++Pipe++" "++LogDir++" \"erl -sname " ++ NodeName ++ + Cmd = "run_erl "++Opt++Pipe++" "++LogDir++" \"erl -sname " ++ NodeName ++ " -pa " ++ filename:dirname(code:which(?MODULE)) ++ " -s " ++ ?MODULE_STRING ++ " ping_me_back " ++ atom_to_list(node()) ++ "\"", diff --git a/erts/test/system_smoke.spec b/erts/test/system_smoke.spec index 933d1ba22d..99092c1dab 100644 --- a/erts/test/system_smoke.spec +++ b/erts/test/system_smoke.spec @@ -1,3 +1,8 @@ {suites,"../system_test",[ethread_SUITE]}. -{cases,"../system_test",otp_SUITE,[undefined_functions]}. +{cases,"../system_test",otp_SUITE, + [undefined_functions, + deprecated_not_in_obsolete, + obsolete_but_not_deprecated, + call_to_size_1, + call_to_now_0]}. {skip_cases,"../system_test",ethread_SUITE,[max_threads],"Skip"}. diff --git a/erts/test/upgrade_SUITE.erl b/erts/test/upgrade_SUITE.erl index 174c028ac7..a5639d927d 100644 --- a/erts/test/upgrade_SUITE.erl +++ b/erts/test/upgrade_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014-2016. All Rights Reserved. +%% Copyright Ericsson AB 2014-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -37,7 +37,6 @@ %% In specific: %% - hipe does not support any upgrade at all %% - dialyzer requires hipe (in the .app file) -%% - typer requires hipe (in the .app file) %% - erl_interface, jinterface support no upgrade -define(appup_exclude, [dialyzer,hipe,typer,erl_interface,jinterface,ose]). @@ -54,6 +53,10 @@ init_per_suite(Config) -> Config end. +end_per_suite(_Config) -> + %% This function is required since init_per_suite/1 exists. + ok. + init_per_testcase(Case,Config) -> PrivDir = filename:join([proplists:get_value(data_dir,Config),priv_dir,Case]), CreateDir = filename:join([PrivDir,create]), diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl index 281a47134f..d474c71c4f 100644 --- a/erts/test/z_SUITE.erl +++ b/erts/test/z_SUITE.erl @@ -214,7 +214,19 @@ dump_core(#core_search_conf{ cerl = Cerl }, Core) -> format_core(Conf, {ignore, Core}) -> format_core(Conf, Core, "[ignored] "); format_core(Conf, Core) -> - format_core(Conf, Core, ""). + format_core(Conf, Core, ""), + + %% Try print (log dir) name of offending application + CoreDir = filename:dirname(Core), + lists:foreach(fun(TestDir) -> + case filelib:is_dir(filename:join(CoreDir,TestDir)) of + true -> + io:format(" from ~s~n", [TestDir]); + false -> + no + end + end, + filelib:wildcard("*.logs", CoreDir)). format_core(#core_search_conf{file = false}, Core, Ignore) -> io:format(" ~s~s " ++ time_fstr() ++ "~s~n", |