diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-22 15:06:52 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-22 15:06:52 +0200 |
commit | 30626f6a17fb349909e6e2e9c3323ffc96e8b1c9 (patch) | |
tree | b3742cd7074b655a56fb3974776e5b0bd4447b7f /lib/runtime_tools | |
parent | b2f661092782f386047b03db0eb649f1ca9a3088 (diff) | |
download | otp-30626f6a17fb349909e6e2e9c3323ffc96e8b1c9.tar.gz otp-30626f6a17fb349909e6e2e9c3323ffc96e8b1c9.tar.bz2 otp-30626f6a17fb349909e6e2e9c3323ffc96e8b1c9.zip |
Eliminate use of ?config() macro
Diffstat (limited to 'lib/runtime_tools')
-rw-r--r-- | lib/runtime_tools/test/dbg_SUITE.erl | 20 | ||||
-rw-r--r-- | lib/runtime_tools/test/erts_alloc_config_SUITE.erl | 8 | ||||
-rw-r--r-- | lib/runtime_tools/test/system_information_SUITE.erl | 10 |
3 files changed, 19 insertions, 19 deletions
diff --git a/lib/runtime_tools/test/dbg_SUITE.erl b/lib/runtime_tools/test/dbg_SUITE.erl index efa8ff4906..27c4c446f5 100644 --- a/lib/runtime_tools/test/dbg_SUITE.erl +++ b/lib/runtime_tools/test/dbg_SUITE.erl @@ -49,8 +49,8 @@ big(suite) -> []; big(doc) -> ["Rudimentary interface test"]; big(Config) when is_list(Config) -> {ok,OldCurDir} = file:get_cwd(), - Datadir=?config(data_dir, Config), - Privdir=?config(priv_dir, Config), + Datadir=proplists:get_value(data_dir, Config), + Privdir=proplists:get_value(priv_dir, Config), ok=file:set_cwd(Privdir), try %% make sure dbg is stopped (and returns correctly) @@ -91,8 +91,8 @@ tiny(suite) -> []; tiny(doc) -> ["Rudimentary interface test"]; tiny(Config) when is_list(Config) -> {ok,OldCurDir} = file:get_cwd(), - Datadir=?config(data_dir, Config), - Privdir=?config(priv_dir, Config), + Datadir=proplists:get_value(data_dir, Config), + Privdir=proplists:get_value(priv_dir, Config), ok=file:set_cwd(Privdir), try %% compile test module and make sure it is loaded. @@ -290,7 +290,7 @@ saved_patterns(Config) when is_list(Config) -> dbg:tp(dbg,ctp,1,[{'_',[],[{message, blahonga}]}]), {ok,[{saved,2}]} = dbg:tp(dbg,ctp,1,[{['_'],[],[{message, blahonga}]}]), - Privdir=?config(priv_dir, Config), + Privdir=proplists:get_value(priv_dir, Config), file:make_dir(Privdir), File = filename:join([Privdir, "blahonga.ms"]), dbg:wtp(File), @@ -375,7 +375,7 @@ file_port(Config) when is_list(Config) -> {A,B,C} = erlang:now(), FTMP = atom_to_list(?MODULE) ++ integer_to_list(A) ++ "-" ++ integer_to_list(B) ++ "-" ++ integer_to_list(C), - FName = filename:join([?config(data_dir, Config), FTMP]), + FName = filename:join([proplists:get_value(data_dir, Config), FTMP]), Port = dbg:trace_port(file, FName), {ok, _} = dbg:tracer(port, Port), try @@ -407,7 +407,7 @@ file_port2(Config) when is_list(Config) -> {A,B,C} = erlang:now(), FTMP = atom_to_list(?MODULE) ++ integer_to_list(A) ++ "-" ++ integer_to_list(B) ++ "-" ++ integer_to_list(C), - FName = filename:join([?config(data_dir, Config), FTMP]), + FName = filename:join([proplists:get_value(data_dir, Config), FTMP]), %% Ok, lets try with flush and follow_file, not a chance on VxWorks %% with NFS caching... Port2 = dbg:trace_port(file, FName), @@ -454,7 +454,7 @@ file_port_schedfix1(Config) when is_list(Config) -> {A,B,C} = erlang:now(), FTMP = atom_to_list(?MODULE) ++ integer_to_list(A) ++ "-" ++ integer_to_list(B) ++ "-" ++ integer_to_list(C), - FName = filename:join([?config(data_dir, Config), FTMP]), + FName = filename:join([proplists:get_value(data_dir, Config), FTMP]), %% Port = dbg:trace_port(file, {FName, wrap, ".wraplog", 8*1024, 4}), {ok, _} = dbg:tracer(port, Port), @@ -548,7 +548,7 @@ wrap_port(Config) when is_list(Config) -> {A,B,C} = erlang:now(), FTMP = atom_to_list(?MODULE) ++ integer_to_list(A) ++ "-" ++ integer_to_list(B) ++ "-" ++ integer_to_list(C) ++ "-", - FName = filename:join([?config(data_dir, Config), FTMP]), + FName = filename:join([proplists:get_value(data_dir, Config), FTMP]), FNameWildcard = FName++"*"++".trace", %% WrapSize=0 and WrapCnt=11 will force the trace to wrap after %% every trace message, and to contain only the last 10 entries @@ -645,7 +645,7 @@ wrap_port_time(Config) when is_list(Config) -> {A,B,C} = erlang:now(), FTMP = atom_to_list(?MODULE) ++ integer_to_list(A) ++ "-" ++ integer_to_list(B) ++ "-" ++ integer_to_list(C) ++ "-", - FName = filename:join([?config(data_dir, Config), FTMP]), + FName = filename:join([proplists:get_value(data_dir, Config), FTMP]), %% WrapTime=2 and WrapCnt=4 will force the trace to wrap after %% every 2 seconds, and to contain between 3*2 and 4*2 seconds %% of trace entries. diff --git a/lib/runtime_tools/test/erts_alloc_config_SUITE.erl b/lib/runtime_tools/test/erts_alloc_config_SUITE.erl index 100e2fc563..3ef88fc300 100644 --- a/lib/runtime_tools/test/erts_alloc_config_SUITE.erl +++ b/lib/runtime_tools/test/erts_alloc_config_SUITE.erl @@ -45,7 +45,7 @@ init_per_testcase(Case, Config) when is_list(Config) -> {erl_flags_env, save_env()} | Config]. end_per_testcase(_Case, Config) when is_list(Config) -> - restore_env(?config(erl_flags_env, Config)), + restore_env(proplists:get_value(erl_flags_env, Config)), ok. %%% @@ -151,7 +151,7 @@ display_file(FileName) -> mk_name(Config) when is_list(Config) -> {A, B, C} = now(), list_to_atom(atom_to_list(?MODULE) - ++ "-" ++ atom_to_list(?config(testcase, Config)) + ++ "-" ++ atom_to_list(proplists:get_value(testcase, Config)) ++ "-" ++ integer_to_list(A) ++ "-" ++ integer_to_list(B) ++ "-" ++ integer_to_list(C)). @@ -169,8 +169,8 @@ stop_node(Node) -> true = ?t:stop_node(Node). privfile(Name, Config) -> - filename:join([?config(priv_dir, Config), - atom_to_list(?config(testcase, Config)) ++ "." ++ Name]). + filename:join([proplists:get_value(priv_dir, Config), + atom_to_list(proplists:get_value(testcase, Config)) ++ "." ++ Name]). save_env() -> {erl_flags, diff --git a/lib/runtime_tools/test/system_information_SUITE.erl b/lib/runtime_tools/test/system_information_SUITE.erl index 5e2e0d17ac..a5a025a1cf 100644 --- a/lib/runtime_tools/test/system_information_SUITE.erl +++ b/lib/runtime_tools/test/system_information_SUITE.erl @@ -230,19 +230,19 @@ api_report(_Config) -> ok. api_to_file(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), Filename = filename:join([DataDir, "system_information_report_1.dat"]), ok = system_information:to_file(Filename), {ok, _} = file:consult(Filename), {save_config, [{report_name, Filename}]}. api_from_file(Config) -> - {api_to_file, Saved} = ?config(saved_config, Config), - DataDir = ?config(data_dir, Config), + {api_to_file, Saved} = proplists:get_value(saved_config, Config), + DataDir = proplists:get_value(data_dir, Config), Fname1 = filename:join([DataDir, "information_test_report.dat"]), Report1 = system_information:from_file(Fname1), ok = validate_report(Report1), - Fname2 = ?config(report_name, Saved), + Fname2 = proplists:get_value(report_name, Saved), Report2 = system_information:from_file(Fname2), ok = validate_report(Report2), ok. @@ -253,7 +253,7 @@ api_start_stop(_Config) -> ok. validate_server_interface(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), Fname1 = filename:join([DataDir, "information_test_report.dat"]), %% load old report ok = system_information:load_report(file, Fname1), |