diff options
author | Björn Gustavsson <[email protected]> | 2016-02-25 15:01:29 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-09 14:02:50 +0100 |
commit | 362707ca44fcfb269f9d981dee13233f1aa7cf2d (patch) | |
tree | 6b31c594a14168614eb4170b8f268c1525e0232b /lib/kernel/test | |
parent | 9870d22b2401b60221aa42c78bdb7ec4a812e9e7 (diff) | |
download | otp-362707ca44fcfb269f9d981dee13233f1aa7cf2d.tar.gz otp-362707ca44fcfb269f9d981dee13233f1aa7cf2d.tar.bz2 otp-362707ca44fcfb269f9d981dee13233f1aa7cf2d.zip |
Eliminate use of ?config() macro
?config is ugly and not recommended. Use proplists:get_value/2
instead.
Diffstat (limited to 'lib/kernel/test')
27 files changed, 231 insertions, 231 deletions
diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl index 93c79e588b..8ff2bf68e1 100644 --- a/lib/kernel/test/application_SUITE.erl +++ b/lib/kernel/test/application_SUITE.erl @@ -40,7 +40,7 @@ shutdown_func/1, do_shutdown/1, shutdown_timeout/1, shutdown_deadlock/1]). -define(TESTCASE, testcase_name). --define(testcase, ?config(?TESTCASE, Config)). +-define(testcase, proplists:get_value(?TESTCASE, Config)). -export([init_per_testcase/2, end_per_testcase/2, start_type/0, start_phase/0, conf_change/0]). @@ -81,13 +81,13 @@ end_per_group(_GroupName, Config) -> init_per_testcase(otp_2973=Case, Config) -> - code:add_path(?config(data_dir,Config)), + code:add_path(proplists:get_value(data_dir,Config)), [{?TESTCASE, Case}|Config]; init_per_testcase(Case, Config) -> [{?TESTCASE, Case}|Config]. end_per_testcase(otp_2973, Config) -> - code:del_path(?config(data_dir,Config)), + code:del_path(proplists:get_value(data_dir,Config)), ok; end_per_testcase(_Case, _Config) -> ok. @@ -1067,7 +1067,7 @@ otp_1586(suite) -> []; otp_1586(doc) -> ["Test recursive load of applications."]; otp_1586(Conf) when is_list(Conf) -> - Dir = ?config(priv_dir,Conf), + Dir = proplists:get_value(priv_dir,Conf), {ok, Fd} = file:open(filename:join(Dir, "app5.app"), [write]), w_app5(Fd), file:close(Fd), @@ -1171,7 +1171,7 @@ otp_2718(suite) -> []; otp_2718(doc) -> ["Test fail of transient app at start."]; otp_2718(Conf) when is_list(Conf) -> - {ok, Cp1} = start_node_args(cp1, "-pa " ++ ?config(data_dir,Conf)), + {ok, Cp1} = start_node_args(cp1, "-pa " ++ proplists:get_value(data_dir,Conf)), wait_for_ready_net(), %% normal exit from the application @@ -1376,7 +1376,7 @@ otp_4066(Conf) when is_list(Conf) -> AllNodes = [Cp1, Cp2], App1Nodes = {app1, AllNodes}, - Dir = ?config(priv_dir,Conf), + Dir = proplists:get_value(priv_dir,Conf), {ok, FdC} = file:open(filename:join(Dir, "otp_4066.config"), [write]), write_config(FdC, config_4066(AllNodes, 5000, [App1Nodes])), file:close(FdC), @@ -1512,7 +1512,7 @@ otp_5363(Conf) when is_list(Conf) -> %% the code, but only that the correct processes ARE killed. OldPath = code:get_path(), - code:add_patha(?config(data_dir,Conf)), + code:add_patha(proplists:get_value(data_dir,Conf)), try ok = application:load(app_group_leader()), ok = application:start(group_leader), @@ -1544,7 +1544,7 @@ otp_5606(doc) -> otp_5606(Conf) when is_list(Conf) -> %% Write a config file - Dir = ?config(priv_dir, Conf), + Dir = proplists:get_value(priv_dir, Conf), {ok, Fd} = file:open(filename:join(Dir, "sys.config"), [write]), NodeNames = [Ncp1, Ncp2] = node_names([cp1, cp2], Conf), (config4(NodeNames))(Fd, 10000), @@ -1941,7 +1941,7 @@ config_change(Conf) when is_list(Conf) -> %% Change to data_dir {ok, CWD} = file:get_cwd(), - DataDir = ?config(data_dir, Conf), + DataDir = proplists:get_value(data_dir, Conf), ok = file:set_cwd(DataDir), %% Find out application data from boot script @@ -2092,7 +2092,7 @@ do_shutdown(Reason) -> %%% Tests the 'shutdown_timeout' kernel config parameter %%%----------------------------------------------------------------- shutdown_timeout(Config) when is_list(Config) -> - DataDir = ?config(data_dir,Config), + DataDir = proplists:get_value(data_dir,Config), {ok,Cp1} = start_node(?MODULE_STRING++"_shutdown_timeout"), wait_for_ready_net(), ok = rpc:call(Cp1, application, set_env, [kernel, shutdown_timeout, 1000]), @@ -2115,7 +2115,7 @@ shutdown_timeout(Config) when is_list(Config) -> %%% Provokes a (previous) application shutdown deadlock %%%----------------------------------------------------------------- shutdown_deadlock(Config) when is_list(Config) -> - DataDir = ?config(data_dir,Config), + DataDir = proplists:get_value(data_dir,Config), code:add_path(filename:join([DataDir,deadlock])), %% ok = rpc:call(Cp1, application, start, [sasl]), ok = application:start(deadlock), @@ -2679,11 +2679,11 @@ start_node_boot(Name, Config, Boot) -> start_node_config_sf(Name, SysConfigFun, Conf) -> ConfigFile = write_config_file(SysConfigFun, Conf), - DataDir = ?config(data_dir, Conf), % is it used? + DataDir = proplists:get_value(data_dir, Conf), % is it used? start_node(Name, ConfigFile, " -pa " ++ DataDir). write_config_file(SysConfigFun, Conf) -> - Dir = ?config(priv_dir, Conf), + Dir = proplists:get_value(priv_dir, Conf), {ok, Fd} = file:open(filename:join(Dir, "sys.config"), [write]), SysConfigFun(Fd), file:close(Fd), @@ -2927,7 +2927,7 @@ distr_changed_prep(Conf) when is_list(Conf) -> NoSyncTime = config_fun_fast(config_dc(NodeNames)), WithSyncTime = config_fun(config_dc(NodeNames)), - Dir = ?config(priv_dir,Conf), + Dir = proplists:get_value(priv_dir,Conf), {ok, Fd_dc2} = file:open(filename:join(Dir, "sys2.config"), [write]), (config_dc2(NodeNames))(Fd_dc2), file:close(Fd_dc2), diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index bdd54f533e..5a194328e5 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -108,7 +108,7 @@ end_per_testcase(_Func, Config) -> end_per_testcase(Config) -> code:purge(code_b_test), - P=?config(code_path, Config), + P=proplists:get_value(code_path, Config), true=code:set_path(P), P=code:get_path(), ok. @@ -117,7 +117,7 @@ set_path(suite) -> []; set_path(doc) -> []; set_path(Config) when is_list(Config) -> P = code:get_path(), - NonExDir = filename:join(?config(priv_dir, Config), ?t:temp_name("hej")), + NonExDir = filename:join(proplists:get_value(priv_dir, Config), ?t:temp_name("hej")), {'EXIT',_} = (catch code:set_path({a})), {error, bad_directory} = (catch code:set_path([{a}])), {error, bad_directory} = code:set_path(NonExDir), @@ -250,7 +250,7 @@ del_path_1(P) -> replace_path(suite) -> []; replace_path(doc) -> []; replace_path(Config) when is_list(Config) -> - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), P = code:get_path(), {'EXIT',_} = (catch code:replace_path(3,"")), {error, bad_name} = code:replace_path(dummy_name,""), @@ -288,7 +288,7 @@ replace_path(Config) when is_list(Config) -> dir_disappeared(suite) -> []; dir_disappeared(doc) -> ["OTP-3977"]; dir_disappeared(Config) when is_list(Config) -> - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), Dir = filename:join(PrivDir, "temp"), ok = file:make_dir(Dir), true = code:add_path(Dir), @@ -508,7 +508,7 @@ load_binary(Config) when is_list(Config) -> ok. upgrade(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %%T = [beam, hipe], T = [beam], @@ -589,7 +589,7 @@ set_path_file(suite) -> []; set_path_file(doc) -> ["Test that set_path does not accept ", "files as pathnames (known previous bug)"]; set_path_file(Config) when is_list(Config) -> - File=filename:join(?config(priv_dir, Config), "testfil"), + File=filename:join(proplists:get_value(priv_dir, Config), "testfil"), ok=file:write_file(File, list_to_binary("lite data")), {error, bad_directory}=code:set_path([File]). @@ -600,7 +600,7 @@ sticky_dir(Config) when is_list(Config) -> Pa = filename:dirname(code:which(?MODULE)), {ok,Node} = ?t:start_node(sticky_dir, slave, [{args,"-pa "++Pa}]), Mods = [code,lists,erlang,init], - OutDir = filename:join(?config(priv_dir, Config), sticky_dir), + OutDir = filename:join(proplists:get_value(priv_dir, Config), sticky_dir), _ = file:make_dir(OutDir), Ret = rpc:call(Node, erlang, apply, [fun sticky_compiler/2,[Mods,OutDir]]), @@ -639,7 +639,7 @@ do_sticky_compile(Mod, Dir) -> pa_pz_option(suite) -> []; pa_pz_option(doc) -> ["Test that the -pa and -pz options work as expected"]; pa_pz_option(Config) when is_list(Config) -> - DDir = ?config(data_dir,Config), + DDir = proplists:get_value(data_dir,Config), PaDir = filename:join(DDir,"pa"), PzDir = filename:join(DDir,"pz"), {ok, Node}=?t:start_node(pa_pz1, slave, @@ -663,7 +663,7 @@ add_del_path(suite) -> []; add_del_path(doc) -> ["add_path, del_path should not cause priv_dir(App) to fail"]; add_del_path(Config) when is_list(Config) -> - DDir = ?config(data_dir,Config), + DDir = proplists:get_value(data_dir,Config), Dir1 = filename:join(DDir,"dummy_app-1.0/ebin"), Dir2 = filename:join(DDir,"dummy_app-2.0/ebin"), code:add_patha(Dir1), @@ -677,7 +677,7 @@ add_del_path(Config) when is_list(Config) -> clash(Config) when is_list(Config) -> - DDir = ?config(data_dir,Config)++"clash/", + DDir = proplists:get_value(data_dir,Config)++"clash/", P = code:get_path(), %% test non-clashing entries @@ -705,7 +705,7 @@ clash(Config) when is_list(Config) -> %% test "Bad path can't read" - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), TmpEzFile = Priv++"foobar-0.tmp.ez", {ok, _} = file:copy(DDir++"foobar-0.1.ez", TmpEzFile), true = code:add_path(TmpEzFile++"/foobar-0.1/ebin"), @@ -951,7 +951,7 @@ purge_stacktrace(Config) when is_list(Config) -> ok. mult_lib_roots(Config) when is_list(Config) -> - DataDir = filename:join(?config(data_dir, Config), "mult_lib_roots"), + DataDir = filename:join(proplists:get_value(data_dir, Config), "mult_lib_roots"), mult_lib_compile(DataDir, "my_dummy_app-b/ebin/lists"), mult_lib_compile(DataDir, "my_dummy_app-c/ebin/code_SUITE_mult_root_module"), @@ -1036,8 +1036,8 @@ code_archive2(Config) when is_list(Config) -> do_code_archive(Config, Root, StripVsn) when is_list(Config) -> %% Copy the orig files to priv_dir - DataDir = ?config(data_dir, Config), - PrivDir = ?config(priv_dir, Config), + DataDir = proplists:get_value(data_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), App = code_archive_dict, VsnBase = atom_to_list(App) ++ "-1.0", Base = @@ -1148,7 +1148,7 @@ big_boot_embedded(Config) when is_list(Config) -> on_load(Config) when is_list(Config) -> Master = on_load_test_case_process, - Data = filename:join([?config(data_dir, Config),"on_load"]), + Data = filename:join([proplists:get_value(data_dir, Config),"on_load"]), ok = file:set_cwd(Data), up_to_date = make:all([{d,'MASTER',Master}]), @@ -1260,7 +1260,7 @@ on_load_embedded(Config) when is_list(Config) -> end. on_load_embedded_1(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %% Link the on_load_app application into the lib directory. LibRoot = code:lib_dir(), @@ -1315,7 +1315,7 @@ create_boot(Config, Options) -> filename:join(LatestDir, LatestName). create_script(Config) -> - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), Name = PrivDir ++ "on_load_test", Apps = application_controller:which_applications(), {value,{_,_,KernelVer}} = lists:keysearch(kernel, 1, Apps), @@ -1368,7 +1368,7 @@ filter_app("erts",_) -> false; % Other apps should be OK. filter_app(_,_) -> true. create_big_script(Config,Local) -> - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), Name = filename:join(PrivDir,"full_script_test"), InitialApplications=application:loaded_applications(), %% Applications left loaded by the application suite, unload them! @@ -1402,7 +1402,7 @@ on_load_errors(Config) when is_list(Config) -> Master = on_load_error_test_case_process, register(Master, self()), - Data = filename:join([?config(data_dir, Config),"on_load_errors"]), + Data = filename:join([proplists:get_value(data_dir, Config),"on_load_errors"]), ok = file:set_cwd(Data), up_to_date = make:all([{d,'MASTER',Master}]), diff --git a/lib/kernel/test/disk_log_SUITE.erl b/lib/kernel/test/disk_log_SUITE.erl index ff105527a0..3359c41c1a 100644 --- a/lib/kernel/test/disk_log_SUITE.erl +++ b/lib/kernel/test/disk_log_SUITE.erl @@ -31,8 +31,8 @@ -else. -include_lib("common_test/include/ct.hrl"). -define(format(S, A), ok). --define(privdir(Conf), ?config(priv_dir, Conf)). --define(datadir(Conf), ?config(data_dir, Conf)). +-define(privdir(Conf), proplists:get_value(priv_dir, Conf)). +-define(datadir(Conf), proplists:get_value(data_dir, Conf)). -endif. -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, diff --git a/lib/kernel/test/erl_prim_loader_SUITE.erl b/lib/kernel/test/erl_prim_loader_SUITE.erl index 113367ff02..28cca1867f 100644 --- a/lib/kernel/test/erl_prim_loader_SUITE.erl +++ b/lib/kernel/test/erl_prim_loader_SUITE.erl @@ -151,7 +151,7 @@ normalize_and_backslash(Config) -> test_normalize_and_backslash(Config) end. test_normalize_and_backslash(Config) -> - PrivDir = ?config(priv_dir,Config), + PrivDir = proplists:get_value(priv_dir,Config), Dir = filename:join(PrivDir,"\\"), File = filename:join(Dir,"file-OTP-11170"), ok = file:make_dir(Dir), @@ -336,7 +336,7 @@ file_requests(Config) when is_list(Config) -> ?line {ok,Info} = rpc:call(Node, erl_prim_loader, read_file_info, [code:which(test_server)]), - PrivDir = ?config(priv_dir,Config), + PrivDir = proplists:get_value(priv_dir,Config), Dir = filename:join(PrivDir,?MODULE_STRING++"_file_requests"), ok = file:make_dir(Dir), Alias = filename:join(Dir,"symlink"), @@ -378,7 +378,7 @@ local_archive(suite) -> local_archive(doc) -> ["Read files from local archive."]; local_archive(Config) when is_list(Config) -> - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), KernelDir = filename:basename(code:lib_dir(kernel)), Archive = filename:join([PrivDir, KernelDir ++ init:archive_extension()]), file:delete(Archive), @@ -398,7 +398,7 @@ remote_archive(suite) -> remote_archive(doc) -> ["Read files from remote archive."]; remote_archive(Config) when is_list(Config) -> - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), KernelDir = filename:basename(code:lib_dir(kernel)), Archive = filename:join([PrivDir, KernelDir ++ init:archive_extension()]), file:delete(Archive), @@ -421,10 +421,10 @@ primary_archive(doc) -> ["Read files from primary archive."]; primary_archive(Config) when is_list(Config) -> %% Copy the orig files to priv_dir - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), Archive = filename:join([PrivDir, "primary_archive.zip"]), file:delete(Archive), - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), ?line {ok, _} = zip:create(Archive, ["primary_archive"], [{compress, []}, {cwd, DataDir}]), ?line {ok, _} = zip:extract(Archive, [{cwd, PrivDir}]), @@ -517,7 +517,7 @@ virtual_dir_in_archive(suite) -> virtual_dir_in_archive(doc) -> ["Read virtual directories from archive."]; virtual_dir_in_archive(Config) when is_list(Config) -> - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), Data = <<"A little piece of data.">>, ArchiveBase = "archive_with_virtual_dirs", Archive = filename:join([PrivDir, ArchiveBase ++ init:archive_extension()]), diff --git a/lib/kernel/test/error_logger_warn_SUITE.erl b/lib/kernel/test/error_logger_warn_SUITE.erl index 8e76912c73..544789d90c 100644 --- a/lib/kernel/test/error_logger_warn_SUITE.erl +++ b/lib/kernel/test/error_logger_warn_SUITE.erl @@ -291,14 +291,14 @@ lines(File) -> %directories anf filenames ld() -> Config = get(elw_config), - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), filename:absname(PrivDir). lf() -> filename:join([ld(),"logfile.txt"]). rd() -> Config = get(elw_config), - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), LogDir = filename:join(PrivDir,"log"), file:make_dir(LogDir), filename:absname(LogDir). diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl index 62a9adbb69..b553fdb91f 100644 --- a/lib/kernel/test/file_SUITE.erl +++ b/lib/kernel/test/file_SUITE.erl @@ -174,7 +174,7 @@ init_per_suite(Config) when is_list(Config) -> case os:type() of {win32, _} -> - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), HasAccessTime = case ?FILE_MODULE:read_file_info(Priv) of {ok, #file_info{atime={_, {0, 0, 0}}}} -> @@ -328,7 +328,7 @@ old_io_protocol(suite) -> old_io_protocol(doc) -> ["Test that the old file IO protocol =< R16B still works"]; old_io_protocol(Config) when is_list(Config) -> - RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), Name = filename:join(RootDir, atom_to_list(?MODULE) ++"old_io_protocol.fil"), @@ -347,7 +347,7 @@ old_io_protocol(Config) when is_list(Config) -> unicode_mode(suite) -> []; unicode_mode(doc) -> [""]; unicode_mode(Config) -> - Dir = {dir, ?config(priv_dir,Config)}, + Dir = {dir, proplists:get_value(priv_dir,Config)}, OptVariants = [[Dir], [Dir, {encoding, utf8}], [Dir, binary], @@ -496,7 +496,7 @@ um_filename(Str = [_|_], Dir, Options) -> read_write_file(suite) -> []; read_write_file(doc) -> []; read_write_file(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_read_write_file"), @@ -554,7 +554,7 @@ read_write_file(Config) when is_list(Config) -> make_del_dir(suite) -> []; make_del_dir(doc) -> []; make_del_dir(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_mk-dir"), @@ -623,7 +623,7 @@ cur_dir_0(Config) when is_list(Config) -> ?line ok = ?FILE_MODULE:set_cwd(Dir1), %% Make a new dir, and cd to that - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_curdir"), @@ -714,7 +714,7 @@ win_cur_dir_1(_Config) -> %%% list_dir_error(Config) -> - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), NonExisting = filename:join(Priv, "non-existing-dir"), {error,enoent} = ?FILE_MODULE:list_dir(NonExisting), ok. @@ -724,7 +724,7 @@ list_dir_error(Config) -> %%% list_dir(Config) -> - RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), TestDir = filename:join(RootDir, ?MODULE_STRING++"_list_dir"), ?FILE_MODULE:make_dir(TestDir), list_dir_1(TestDir, 42, []). @@ -754,7 +754,7 @@ untranslatable_names(Config) -> untranslatable_names_1(Config) -> {ok,OldCwd} = file:get_cwd(), - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), Dir = filename:join(PrivDir, "untranslatable_names"), ok = file:make_dir(Dir), Node = start_node(untranslatable_names, "+fnu"), @@ -795,7 +795,7 @@ untranslatable_names_error(Config) -> untranslatable_names_error_1(Config) -> {ok,OldCwd} = file:get_cwd(), - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), Dir = filename:join(PrivDir, "untranslatable_names_error"), ok = file:make_dir(Dir), Node = start_node(untranslatable_names, "+fnue"), @@ -857,7 +857,7 @@ start_node(Name, Args) -> open1(suite) -> []; open1(doc) -> []; open1(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_files"), @@ -886,7 +886,7 @@ open1(Config) when is_list(Config) -> old_modes(suite) -> []; old_modes(doc) -> []; old_modes(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_old_open_modes"), @@ -918,7 +918,7 @@ old_modes(Config) when is_list(Config) -> new_modes(suite) -> []; new_modes(doc) -> []; new_modes(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_new_open_modes"), @@ -978,7 +978,7 @@ new_modes(Config) when is_list(Config) -> path_open(suite) -> []; path_open(doc) -> []; path_open(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_path_open"), @@ -1021,7 +1021,7 @@ path_open(Config) when is_list(Config) -> close(suite) -> []; close(doc) -> []; close(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_close.fil"), @@ -1043,7 +1043,7 @@ close(Config) when is_list(Config) -> access(suite) -> []; access(doc) -> []; access(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_access.fil"), @@ -1072,7 +1072,7 @@ access(Config) when is_list(Config) -> read_write(suite) -> []; read_write(doc) -> []; read_write(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_read_write"), @@ -1119,7 +1119,7 @@ read_write_test(File, Marker, Empty) -> pread_write(suite) -> []; pread_write(doc) -> []; pread_write(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_pread_write"), @@ -1175,7 +1175,7 @@ pread_write_test(File, Data) -> append(doc) -> "Test appending to a file."; append(suite) -> []; append(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_append"), @@ -1209,7 +1209,7 @@ open_errors(doc) -> []; open_errors(Config) when is_list(Config) -> ?line DataDir = filename:dirname( - filename:join(?config(data_dir, Config), "x")), + filename:join(proplists:get_value(data_dir, Config), "x")), ?line DataDirSlash = DataDir++"/", ?line {error, E1} = ?FILE_MODULE:open(DataDir, [read]), ?line {error, E2} = ?FILE_MODULE:open(DataDirSlash, [read]), @@ -1223,7 +1223,7 @@ open_errors(Config) when is_list(Config) -> exclusive(suite) -> []; exclusive(doc) -> "Test exclusive access to a file."; exclusive(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_exclusive"), @@ -1240,7 +1240,7 @@ exclusive(Config) when is_list(Config) -> pos1(suite) -> []; pos1(doc) -> []; pos1(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_pos1.fil"), @@ -1304,7 +1304,7 @@ pos1(Config) when is_list(Config) -> pos2(suite) -> []; pos2(doc) -> []; pos2(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_pos2.fil"), @@ -1326,7 +1326,7 @@ pos2(Config) when is_list(Config) -> pos3(suite) -> []; pos3(doc) -> ["When it does not use raw mode, file:position had a bug."]; pos3(Config) when is_list(Config) -> - ?line RootDir = ?config(data_dir, Config), + RootDir = proplists:get_value(data_dir, Config), ?line Name = filename:join(RootDir, "realmen.html.gz"), ?line {ok, Fd} = ?FILE_MODULE:open(Name, [read, binary]), @@ -1346,7 +1346,7 @@ pos3(Config) when is_list(Config) -> file_info_basic_file(suite) -> []; file_info_basic_file(doc) -> []; file_info_basic_file(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), %% Create a short file. ?line Name = filename:join(RootDir, @@ -1380,7 +1380,7 @@ file_info_basic_directory(Config) when is_list(Config) -> %% Note: filename:join/1 removes any trailing slash, %% which is essential for ?FILE_MODULE:file_info/1 to work on %% platforms such as Windows95. - RootDir = filename:join([?config(priv_dir, Config)]), + RootDir = filename:join([proplists:get_value(priv_dir, Config)]), %% Test that the RootDir directory has the expected attributes. test_directory(RootDir, read_write), @@ -1426,7 +1426,7 @@ all_integers([]) -> ok. file_info_bad(suite) -> []; file_info_bad(doc) -> []; file_info_bad(Config) when is_list(Config) -> - ?line RootDir = filename:join([?config(priv_dir, Config)]), + RootDir = filename:join([proplists:get_value(priv_dir, Config)]), FileName = filename:join(RootDir, atom_to_list(?MODULE) ++ "_nonexistent"), {error,enoent} = ?FILE_MODULE:read_file_info(FileName), {error,enoent} = ?FILE_MODULE:read_file_info(FileName, [raw]), @@ -1453,7 +1453,7 @@ file_info_int(Config) -> %% which is essential for ?FILE_MODULE:file_info/1 to work on %% platforms such as Windows95. - ?line RootDir = filename:join([?config(priv_dir, Config)]), + RootDir = filename:join([proplists:get_value(priv_dir, Config)]), ?line test_server:format("RootDir = ~p", [RootDir]), ?line Name = filename:join(RootDir, @@ -1610,13 +1610,13 @@ file_write_file_info(Config) when is_list(Config) -> %% Returns a directory on a file system that has correct file times. get_good_directory(Config) -> - ?line ?config(priv_dir, Config). + proplists:get_value(priv_dir, Config). consult1(suite) -> []; consult1(doc) -> []; consult1(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_consult.fil"), @@ -1645,7 +1645,7 @@ consult1(Config) when is_list(Config) -> path_consult(suite) -> []; path_consult(doc) -> []; path_consult(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line FileName = atom_to_list(?MODULE)++"_path_consult.fil", ?line Name = filename:join(RootDir, FileName), ?line {ok,Fd1} = ?FILE_MODULE:open(Name,write), @@ -1672,7 +1672,7 @@ path_consult(Config) when is_list(Config) -> eval1(suite) -> []; eval1(doc) -> []; eval1(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE)++"_eval.fil"), ?line {ok,Fd1} = ?FILE_MODULE:open(Name,write), @@ -1706,7 +1706,7 @@ eval1(Config) when is_list(Config) -> path_eval(suite) -> []; path_eval(doc) -> []; path_eval(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line FileName = atom_to_list(?MODULE)++"_path_eval.fil", ?line Name = filename:join(RootDir, FileName), ?line {ok,Fd1} = ?FILE_MODULE:open(Name,write), @@ -1740,7 +1740,7 @@ path_eval(Config) when is_list(Config) -> script1(suite) -> []; script1(doc) -> ""; script1(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE)++"_script.fil"), ?line {ok,Fd1} = ?FILE_MODULE:open(Name,write), @@ -1771,7 +1771,7 @@ script1(Config) when is_list(Config) -> path_script(suite) -> []; path_script(doc) -> []; path_script(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line FileName = atom_to_list(?MODULE)++"_path_script.fil", ?line Name = filename:join(RootDir, FileName), ?line {ok,Fd1} = ?FILE_MODULE:open(Name,write), @@ -1806,7 +1806,7 @@ path_script(Config) when is_list(Config) -> truncate(suite) -> []; truncate(doc) -> []; truncate(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_truncate.fil"), @@ -1838,7 +1838,7 @@ truncate(Config) when is_list(Config) -> datasync(suite) -> []; datasync(doc) -> "Tests that ?FILE_MODULE:datasync/1 at least doesn't crash."; datasync(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Sync = filename:join(PrivDir, atom_to_list(?MODULE) ++"_sync.fil"), @@ -1860,7 +1860,7 @@ datasync(Config) when is_list(Config) -> sync(suite) -> []; sync(doc) -> "Tests that ?FILE_MODULE:sync/1 at least doesn't crash."; sync(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Sync = filename:join(PrivDir, atom_to_list(?MODULE) ++"_sync.fil"), @@ -1881,7 +1881,7 @@ sync(Config) when is_list(Config) -> advise(suite) -> []; advise(doc) -> "Tests that ?FILE_MODULE:advise/4 at least doesn't crash."; advise(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Advise = filename:join(PrivDir, atom_to_list(?MODULE) ++"_advise.fil"), @@ -1950,7 +1950,7 @@ advise(Config) when is_list(Config) -> allocate(suite) -> []; allocate(doc) -> "Tests that ?FILE_MODULE:allocate/3 at least doesn't crash."; allocate(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Allocate = filename:join(PrivDir, atom_to_list(?MODULE) ++"_allocate.fil"), @@ -2019,7 +2019,7 @@ allocate_and_assert(Fd, Offset, Length) -> delete(suite) -> []; delete(doc) -> []; delete(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_delete.fil"), @@ -2040,7 +2040,7 @@ delete(Config) when is_list(Config) -> rename(suite) ->[]; rename(doc) ->[]; rename(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line FileName1 = atom_to_list(?MODULE)++"_rename.fil", ?line FileName2 = atom_to_list(?MODULE)++"_rename.ful", ?line Name1 = filename:join(RootDir, FileName1), @@ -2094,7 +2094,7 @@ rename(Config) when is_list(Config) -> names(suite) -> []; names(doc) -> []; names(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line FileName = "foo1.fil", ?line Name1 = filename:join(RootDir, FileName), ?line Name2 = [RootDir,"/","foo1",".","fil"], @@ -2147,7 +2147,7 @@ names(Config) when is_list(Config) -> e_delete(suite) -> []; e_delete(doc) -> []; e_delete(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line Base = filename:join(RootDir, atom_to_list(?MODULE)++"_e_delete"), ?line ok = ?FILE_MODULE:make_dir(Base), @@ -2191,7 +2191,7 @@ e_delete(Config) when is_list(Config) -> e_rename(suite) -> []; e_rename(doc) -> []; e_rename(Config) when is_list(Config) -> - RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), Base = filename:join(RootDir, atom_to_list(?MODULE)++"_e_rename"), ok = ?FILE_MODULE:make_dir(Base), @@ -2287,7 +2287,7 @@ e_rename(Config) when is_list(Config) -> e_make_dir(suite) -> []; e_make_dir(doc) -> []; e_make_dir(Config) when is_list(Config) -> - RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), Base = filename:join(RootDir, atom_to_list(?MODULE)++"_e_make_dir"), ok = ?FILE_MODULE:make_dir(Base), @@ -2321,7 +2321,7 @@ e_make_dir(Config) when is_list(Config) -> e_del_dir(suite) -> []; e_del_dir(doc) -> []; e_del_dir(Config) when is_list(Config) -> - RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), Base = test_server:temp_name(filename:join(RootDir, "e_del_dir")), io:format("Base: ~p", [Base]), ok = ?FILE_MODULE:make_dir(Base), @@ -2371,13 +2371,13 @@ e_del_dir(Config) when is_list(Config) -> %% Trying reading and positioning from a compressed file. read_compressed_cooked(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), + Data = proplists:get_value(data_dir, Config), ?line Real = filename:join(Data, "realmen.html.gz"), ?line {ok, Fd} = ?FILE_MODULE:open(Real, [read,compressed]), ?line try_read_file_list(Fd). read_compressed_cooked_binary(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), + Data = proplists:get_value(data_dir, Config), ?line Real = filename:join(Data, "realmen.html.gz"), ?line {ok, Fd} = ?FILE_MODULE:open(Real, [read,compressed,binary]), ?line try_read_file_binary(Fd). @@ -2386,8 +2386,8 @@ read_compressed_cooked_binary(Config) when is_list(Config) -> %% but with the compressed flag given. read_not_really_compressed(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), - ?line Priv = ?config(priv_dir, Config), + Data = proplists:get_value(data_dir, Config), + Priv = proplists:get_value(priv_dir, Config), %% The file realmen.html might have got CRs added (by WinZip). %% Remove them, or the file positions will not be correct. @@ -2491,7 +2491,7 @@ try_read_file_binary(Fd) -> ok. read_cooked_tar_problem(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), + Data = proplists:get_value(data_dir, Config), ?line ProblemFile = filename:join(Data, "cooked_tar_problem.tar.gz"), ?line {ok,Fd} = ?FILE_MODULE:open(ProblemFile, [read,compressed,binary]), @@ -2511,7 +2511,7 @@ read_cooked_tar_problem(Config) when is_list(Config) -> write_compressed(suite) -> []; write_compressed(doc) -> []; write_compressed(Config) when is_list(Config) -> - ?line Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), ?line MyFile = filename:join(Priv, atom_to_list(?MODULE)++"_test.gz"), @@ -2568,7 +2568,7 @@ write_compressed(Config) when is_list(Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% catenated_gzips(Config) when is_list(Config) -> - ?line Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), ?line MyFile = filename:join(Priv, ?MODULE_STRING++"_test.gz"), First = "Hello, all good men going to search parties. ", @@ -2592,7 +2592,7 @@ compress_errors(doc) -> []; compress_errors(Config) when is_list(Config) -> ?line DataDir = filename:dirname( - filename:join(?config(data_dir, Config), "x")), + filename:join(proplists:get_value(data_dir, Config), "x")), ?line DataDirSlash = DataDir++"/", ?line {error, enoent} = ?FILE_MODULE:open("non_existing__", [compressed, read]), @@ -2623,7 +2623,7 @@ compress_errors(Config) when is_list(Config) -> compress_async_crash(suite) -> []; compress_async_crash(doc) -> []; compress_async_crash(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), ?line Path = filename:join(DataDir, "test.gz"), ExpectedData = <<"qwerty">>, @@ -2672,7 +2672,7 @@ compress_async_crash_loop(N, Path, ExpectedData) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% unicode(Config) when is_list(Config) -> - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), Name = filename:join(Dir, "data-utf8.txt"), Txt = lists:seq(128, 255), D = unicode:characters_to_binary(Txt, latin1, latin1), @@ -2710,7 +2710,7 @@ altname(doc) -> altname(suite) -> []; altname(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, "long alternative path name with spaces"), ?line ok = ?FILE_MODULE:make_dir(NewDir), @@ -2738,7 +2738,7 @@ altname(Config) when is_list(Config) -> make_link(doc) -> "Test creating a hard link."; make_link(suite) -> []; make_link(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_make_link"), @@ -2789,7 +2789,7 @@ symlinks(suite) -> []; symlinks(Config) when is_list(Config) -> ?line {error, _} = ?FILE_MODULE:read_link(lists:duplicate(10000,$a)), {error, _} = ?FILE_MODULE:read_link_all(lists:duplicate(10000,$a)), - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_symlinks"), @@ -2833,7 +2833,7 @@ symlinks(Config) when is_list(Config) -> copy(doc) -> []; copy(suite) -> []; copy(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), %% Create a text file. ?line Name1 = filename:join(RootDir, atom_to_list(?MODULE)++"_copy_1.txt"), ?line Line = "The quick brown fox jumps over a lazy dog. 0123456789\n", @@ -3001,7 +3001,7 @@ delayed_write(doc) -> ["Tests the file open option {delayed_write, Size, Delay}"]; delayed_write(Config) when is_list(Config) -> - RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), File = filename:join(RootDir, atom_to_list(?MODULE)++"_delayed_write.txt"), Data1 = "asdfghjkl", @@ -3120,7 +3120,7 @@ delayed_write(Config) when is_list(Config) -> pid2name(doc) -> "Tests file:pid2name/1."; pid2name(suite) -> []; pid2name(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line Base = test_server:temp_name( filename:join(RootDir, "pid2name_")), ?line Name1 = [Base, '.txt'], @@ -3144,7 +3144,7 @@ read_ahead(doc) -> ["Tests the file open option {read_ahead, Size}"]; read_ahead(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line File = filename:join(RootDir, atom_to_list(?MODULE)++"_read_ahead.txt"), ?line Data1 = "asdfghjkl", % Must be @@ -3207,7 +3207,7 @@ segment_read(suite) -> segment_read(doc) -> ["Tests the segmenting of large reads"]; segment_read(Config) when is_list(Config) -> - ?line Name = filename:join(?config(priv_dir, Config), + Name = filename:join(proplists:get_value(priv_dir, Config), ?MODULE_STRING ++ "_segment_read"), ?line SegSize = 256*1024, ?line SegCnt = SegSize div 4, @@ -3343,7 +3343,7 @@ segment_write(suite) -> segment_write(doc) -> ["Tests the segmenting of large writes"]; segment_write(Config) when is_list(Config) -> - ?line Name = filename:join(?config(priv_dir, Config), + Name = filename:join(proplists:get_value(priv_dir, Config), ?MODULE_STRING ++ "_segment_write"), ?line SegSize = 256*1024, ?line SegCnt = SegSize div 4, @@ -3531,7 +3531,7 @@ ipread(suite) -> ipread(doc) -> ["Test Dets special indirect pread"]; ipread(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line ok = ipread_int(Dir, [raw, binary]), ?line ok = ipread_int(Dir, [raw]), ?line ok = ipread_int(Dir, [binary]), @@ -3628,7 +3628,7 @@ interleaved_read_write(suite) -> interleaved_read_write(doc) -> ["Tests interleaved read and writes"]; interleaved_read_write(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, ?MODULE_STRING++"interleaved_read_write.txt"), ?line {ok,F1} = ?FILE_MODULE:open(File, [write]), @@ -3657,7 +3657,7 @@ otp_5814(suite) -> otp_5814(doc) -> ["OTP-5814. eval/consult/script return correct line numbers"]; otp_5814(Config) when is_list(Config) -> - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), File = filename:join(PrivDir, "otp_5814"), Path = [PrivDir], ?line ok = file:write_file(File, <<"{a,b,c}. @@ -3696,7 +3696,7 @@ otp_10852(doc) -> ["OTP-10852. +fnu and latin1 filenames"]; otp_10852(Config) when is_list(Config) -> Node = start_node(erl_pp_helper, "+fnu"), - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), B = filename:join(Dir, <<"\xE4">>), ok = rpc_call(Node, get_cwd, [B]), {error, no_translation} = rpc_call(Node, set_cwd, [B]), @@ -4054,7 +4054,7 @@ read_line_1(suite) -> read_line_1(doc) -> ["read_line with prim_file"]; read_line_1(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line All = read_line_testdata(PrivDir), ?line read_line_create_files(All), ?line [ begin @@ -4079,7 +4079,7 @@ read_line_2(suite) -> read_line_2(doc) -> ["read_line with file"]; read_line_2(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line All = read_line_testdata(PrivDir), ?line read_line_create_files(All), ?line [ begin @@ -4104,7 +4104,7 @@ read_line_3(suite) -> read_line_3(doc) -> ["read_line with raw file"]; read_line_3(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line All = read_line_testdata(PrivDir), ?line read_line_create_files(All), ?line [ begin @@ -4129,7 +4129,7 @@ read_line_4(suite) -> read_line_4(doc) -> ["read_line with raw buffered file"]; read_line_4(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line All = read_line_testdata(PrivDir), ?line read_line_create_files(All), ?line [ begin @@ -4402,7 +4402,7 @@ run_large_file_test(Config, Run, Name) -> {{unix,sunos},OsVersion} when OsVersion < {5,5,1} -> {skip,"Only supported on Win32, Unix or SunOS >= 5.5.1"}; {{unix,_},_} -> - N = disc_free(?config(priv_dir, Config)), + N = disc_free(proplists:get_value(priv_dir, Config)), io:format("Free disk: ~w KByte~n", [N]), if N < 5 * (1 bsl 20) -> %% Less than 5 GByte free @@ -4416,7 +4416,7 @@ run_large_file_test(Config, Run, Name) -> do_run_large_file_test(Config, Run, Name0) -> - Name = filename:join(?config(priv_dir, Config), + Name = filename:join(proplists:get_value(priv_dir, Config), ?MODULE_STRING ++ Name0), %% Set up a process that will delete this file. diff --git a/lib/kernel/test/file_name_SUITE.erl b/lib/kernel/test/file_name_SUITE.erl index e4b5b88f00..ccdc1116e0 100644 --- a/lib/kernel/test/file_name_SUITE.erl +++ b/lib/kernel/test/file_name_SUITE.erl @@ -113,7 +113,7 @@ home_dir(doc) -> home_dir(Config) when is_list(Config) -> try Name=[960,945,964,961,953,954], - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), UniMode = file:native_name_encoding() =/= latin1, if not UniMode -> @@ -192,7 +192,7 @@ normal(doc) -> normal(Config) when is_list(Config) -> {ok,Dir} = file:get_cwd(), try - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), file:set_cwd(Priv), put(file_module,prim_file), ok = check_normal(prim_file), @@ -217,7 +217,7 @@ icky(Config) when is_list(Config) -> false -> {ok,Dir} = file:get_cwd(), try - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), file:set_cwd(Priv), put(file_module,prim_file), ok = check_icky(prim_file), @@ -241,7 +241,7 @@ very_icky(Config) when is_list(Config) -> false -> {ok,Dir} = file:get_cwd(), try - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), file:set_cwd(Priv), put(file_module,prim_file), case check_very_icky(prim_file) of diff --git a/lib/kernel/test/gen_tcp_api_SUITE.erl b/lib/kernel/test/gen_tcp_api_SUITE.erl index 90435a4221..f74fffcaf9 100644 --- a/lib/kernel/test/gen_tcp_api_SUITE.erl +++ b/lib/kernel/test/gen_tcp_api_SUITE.erl @@ -239,7 +239,7 @@ t_fdconnect(Config) when is_list(Config) -> ["in ", [], <<"a small town">>, [" in Germany,", <<>>]]], Question1 = iolist_to_binary(Question2), Answer = "there was a shoemaker, Schumacher was his name.", - Path = ?config(data_dir, Config), + Path = proplists:get_value(data_dir, Config), Lib = "gen_tcp_api_SUITE", ok = erlang:load_nif(filename:join(Path,Lib), []), {ok, L} = gen_tcp:listen(0, [{active, false}]), diff --git a/lib/kernel/test/gen_tcp_echo_SUITE.erl b/lib/kernel/test/gen_tcp_echo_SUITE.erl index 99c3ecf3b1..1bd5e36e2e 100644 --- a/lib/kernel/test/gen_tcp_echo_SUITE.erl +++ b/lib/kernel/test/gen_tcp_echo_SUITE.erl @@ -155,7 +155,7 @@ echo_test(SockOpts, EchoFun, Config0) -> echo_test_1([{delay_send,true}|SockOpts], EchoFun, Config0). echo_test_1(SockOpts, EchoFun, Config0) -> - ?line EchoSrvFun = ?config(echo, Config0), + EchoSrvFun = proplists:get_value(echo, Config0), ?line {ok, EchoPort} = EchoSrvFun(), ?line Config = [{echo_port, EchoPort}|Config0], @@ -201,7 +201,7 @@ echo_packet(SockOpts, EchoFun, Opts) -> end, %% Connect to the echo server. - EchoPort = ?config(echo_port, Opts), + EchoPort = proplists:get_value(echo_port, Opts), {ok, Echo} = gen_tcp:connect(localhost, EchoPort, SockOpts), SlowEcho = lists:member(slow_echo, Opts), diff --git a/lib/kernel/test/global_SUITE.erl b/lib/kernel/test/global_SUITE.erl index 7619ad8d64..49ac088cd8 100644 --- a/lib/kernel/test/global_SUITE.erl +++ b/lib/kernel/test/global_SUITE.erl @@ -100,9 +100,9 @@ end_per_suite(_Config) -> -define(TESTCASE, testcase_name). --define(testcase, ?config(?TESTCASE, Config)). +-define(testcase, proplists:get_value(?TESTCASE, Config)). -define(nodes_tag, '$global_nodes'). --define(registered, ?config(registered, Config)). +-define(registered, proplists:get_value(registered, Config)). init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> ok = gen_server:call(global_name_server, high_level_trace_start,infinity), @@ -396,7 +396,7 @@ write_high_level_trace(Nodes, Config) -> %% 'info' returns more than the trace, which is nice. Data = [{Node, {info, rpc:call(Node, global, info, [])}} || Node <- Nodes], - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), DataFile = filename:join([Dir, lists:concat(["global_", ?testcase])]), file:write_file(DataFile, term_to_binary({high_level_trace, When, Data})). @@ -980,7 +980,7 @@ name_die(Config) when is_list(Config) -> %% Killing the pid will not remove the name from the current %% partition, unless monitors are used. ?line Pid2 = rpc:call(Cp1, ?MODULE, start_proc, []), - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), KillFile = filename:join([Dir, "kill.txt"]), file:delete(KillFile), ?line erlang:spawn(Cp1, fun() -> kill_pid(Pid2, KillFile, Config) end), @@ -2820,7 +2820,7 @@ many_nodes(Config) when is_list(Config) -> Nodes = lists:sort(?NODES), ?line wait_for_ready_net(Nodes, Config), - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), GoFile = filename:join([Dir, "go.txt"]), file:delete(GoFile), @@ -3001,7 +3001,7 @@ global_groups_change(Config) -> node_names([cp1,cp2,cp3,cp4,cp5,cpA,cpB,cpC,cpD,cpE], Config), % Write config files - ?line Dir = ?config(priv_dir,Config), + Dir = proplists:get_value(priv_dir,Config), ?line {ok, Fd_dc} = file:open(filename:join(Dir, "sys.config"), [write]), ?line config_dc1(Fd_dc, Ncp1, Ncp2, Ncp3, NcpA, NcpB, NcpC, NcpD, NcpE), ?line file:close(Fd_dc), @@ -3452,7 +3452,7 @@ w(X,Y) -> %% this one runs on one node in Part2 %% The partition is ready when is_ready_partition(Config) returns (true). make_partition(Config, Part1, Part2) -> - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), Ns = [begin Name = lists:concat([atom_to_list(N),"_",msec(),".part"]), File = filename:join([Dir, Name]), @@ -3504,7 +3504,7 @@ is_ready_partition(Config) -> true. make_partition_file(Config) -> - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), filename:join([Dir, atom_to_list(make_partition_done)]). %% this one runs at cp3 diff --git a/lib/kernel/test/global_group_SUITE.erl b/lib/kernel/test/global_group_SUITE.erl index 410ade37e6..7d01a446eb 100644 --- a/lib/kernel/test/global_group_SUITE.erl +++ b/lib/kernel/test/global_group_SUITE.erl @@ -79,7 +79,7 @@ end_per_suite(_Config) -> ok. -define(TESTCASE, testcase_name). --define(testcase, ?config(?TESTCASE, Config)). +-define(testcase, proplists:get_value(?TESTCASE, Config)). init_per_testcase(Case, Config) -> Config. @@ -97,7 +97,7 @@ end_per_testcase(_Func, _Config) -> start_gg_proc(suite) -> []; start_gg_proc(doc) -> ["Check that the global_group processes are started automatically. "]; start_gg_proc(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, "global_group.config"), ?line {ok, Fd}=file:open(File, [write]), [Ncp1,Ncp2,Ncp3] = node_names([cp1, cp2, cp3], Config), @@ -129,7 +129,7 @@ no_gg_proc(suite) -> []; no_gg_proc(doc) -> ["Start a system without global groups. Nodes are not " "synced at start (sync_nodes_optional is not defined)"]; no_gg_proc(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, "no_global_group.config"), ?line {ok, Fd} = file:open(File, [write]), ?line config_no(Fd), @@ -299,7 +299,7 @@ no_gg_proc_sync(doc) -> ["Start a system without global groups, but syncing the nodes by using " "sync_nodes_optional."]; no_gg_proc_sync(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, "no_global_group_sync.config"), ?line {ok, Fd} = file:open(File, [write]), @@ -470,7 +470,7 @@ compatible(suite) -> []; compatible(doc) -> ["Check that a system without global groups is compatible with the old R4 system."]; compatible(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, "global_group_comp.config"), ?line {ok, Fd} = file:open(File, [write]), @@ -640,7 +640,7 @@ compatible(Config) when is_list(Config) -> one_grp(suite) -> []; one_grp(doc) -> ["Test a system with only one global group. "]; one_grp(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, "global_group.config"), ?line {ok, Fd} = file:open(File, [write]), [Ncp1,Ncp2,Ncp3] = node_names([cp1, cp2, cp3], Config), @@ -724,7 +724,7 @@ one_grp_x(suite) -> []; one_grp_x(doc) -> ["Check a system with only one global group. " "Start the nodes with different time intervals. "]; one_grp_x(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, "global_group.config"), ?line {ok, Fd} = file:open(File, [write]), [Ncp1,Ncp2,Ncp3] = node_names([cp1, cp2, cp3], Config), @@ -783,7 +783,7 @@ one_grp_x(Config) when is_list(Config) -> two_grp(suite) -> []; two_grp(doc) -> ["Test a two global group system. "]; two_grp(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, "global_group.config"), ?line {ok, Fd} = file:open(File, [write]), @@ -1080,7 +1080,7 @@ two_grp(Config) when is_list(Config) -> hidden_groups(suite) -> []; hidden_groups(doc) -> ["Test hidden global groups."]; hidden_groups(Config) when is_list(Config) -> - ?line Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), ?line File = filename:join(Dir, "global_group.config"), ?line {ok, Fd} = file:open(File, [write]), @@ -1180,25 +1180,25 @@ test_exit(Config) when is_list(Config) -> start_node(Name, Config) -> Pa=filename:dirname(code:which(?MODULE)), - Dir=?config(priv_dir, Config), + Dir=proplists:get_value(priv_dir, Config), ConfFile = " -config " ++ filename:join(Dir, "global_group"), test_server:start_node(Name, slave, [{args, "-pa " ++ Pa ++ ConfFile}]). start_node_no(Name, Config) -> Pa=filename:dirname(code:which(?MODULE)), - Dir=?config(priv_dir, Config), + Dir=proplists:get_value(priv_dir, Config), ConfFile = " -config " ++ filename:join(Dir, "no_global_group"), test_server:start_node(Name, slave, [{args, "-pa " ++ Pa ++ ConfFile}]). start_node_no2(Name, Config) -> Pa=filename:dirname(code:which(?MODULE)), - Dir=?config(priv_dir, Config), + Dir=proplists:get_value(priv_dir, Config), ConfFile = " -config " ++ filename:join(Dir, "no_global_group_sync"), test_server:start_node(Name, slave, [{args, "-pa " ++ Pa ++ ConfFile}]). start_node_comp(Name, Config) -> Pa=filename:dirname(code:which(?MODULE)), - Dir=?config(priv_dir, Config), + Dir=proplists:get_value(priv_dir, Config), ConfFile = " -config " ++ filename:join(Dir, "global_group_comp"), test_server:start_node(Name, slave, [{args, "-pa " ++ Pa ++ ConfFile}]). diff --git a/lib/kernel/test/heart_SUITE.erl b/lib/kernel/test/heart_SUITE.erl index 9a36b6efe7..1715566fac 100644 --- a/lib/kernel/test/heart_SUITE.erl +++ b/lib/kernel/test/heart_SUITE.erl @@ -454,7 +454,7 @@ do_dont_drop(Config,N) -> Env = [{"HEART_COMMAND", FirstCmd}], Func = "start_heart_stress", Arg = NN3 ++ "@" ++ Host ++ " " ++ - filename:join(?config(data_dir, Config), "simple_echo"), + filename:join(proplists:get_value(data_dir, Config), "simple_echo"), start_node_run(Name,Env,Func,Arg), case wait_for_any_of(list_to_atom(NN2 ++ "@" ++ Host), list_to_atom(NN3 ++ "@" ++ Host)) of diff --git a/lib/kernel/test/ignore_cores.erl b/lib/kernel/test/ignore_cores.erl index 6a37b48189..3aaade6853 100644 --- a/lib/kernel/test/ignore_cores.erl +++ b/lib/kernel/test/ignore_cores.erl @@ -53,7 +53,7 @@ init(Config) -> fini(Config) -> #ignore_cores{org_cwd = OrgCWD, org_path = OrgPath, - org_pwd_env = OrgPWD} = ?config(ignore_cores, Config), + org_pwd_env = OrgPWD} = proplists:get_value(ignore_cores, Config), ok = file:set_cwd(OrgCWD), true = code:set_path(OrgPath), case OrgPWD of @@ -70,10 +70,10 @@ setup(Suite, Testcase, Config, SetCwd) when is_atom(Suite), is_list(Config) -> #ignore_cores{org_cwd = OrgCWD, org_path = OrgPath, - org_pwd_env = OrgPWD} = ?config(ignore_cores, Config), + org_pwd_env = OrgPWD} = proplists:get_value(ignore_cores, Config), Path = lists:map(fun (".") -> OrgCWD; (Dir) -> Dir end, OrgPath), true = code:set_path(Path), - PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), IgnDir = filename:join([PrivDir, atom_to_list(Suite) ++ "_" @@ -119,7 +119,7 @@ restore(Config) -> org_path = OrgPath, org_pwd_env = OrgPWD, ign_dir = IgnDir, - cores_dir = CoresDir} = ?config(ignore_cores, Config), + cores_dir = CoresDir} = proplists:get_value(ignore_cores, Config), try case CoresDir of false -> @@ -155,5 +155,5 @@ restore(Config) -> dir(Config) -> - #ignore_cores{ign_dir = Dir} = ?config(ignore_cores, Config), + #ignore_cores{ign_dir = Dir} = proplists:get_value(ignore_cores, Config), Dir. diff --git a/lib/kernel/test/inet_SUITE.erl b/lib/kernel/test/inet_SUITE.erl index fe29521761..5834c990d5 100644 --- a/lib/kernel/test/inet_SUITE.erl +++ b/lib/kernel/test/inet_SUITE.erl @@ -107,7 +107,7 @@ init_per_testcase(_Func, Config) -> end_per_testcase(lookup_bad_search_option, Config) -> Db = inet_db, Key = res_lookup, - Prev = ?config(Key, Config), + Prev = proplists:get_value(Key, Config), ets:delete(Db, Key), ets:insert(Db, Prev), ?t:format("Restored resolver lookup order", []); @@ -437,7 +437,7 @@ get_hosts([], _, _, Result) -> parse_hosts(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir,Config), + DataDir = proplists:get_value(data_dir,Config), ?line HostFile = filename:join(DataDir, "hosts"), ?line inet_parse:hosts(HostFile), ?line HostFileErr1 = filename:join(DataDir, "hosts_err1"), diff --git a/lib/kernel/test/inet_res_SUITE.erl b/lib/kernel/test/inet_res_SUITE.erl index d91e575aaa..6f1e0126c9 100644 --- a/lib/kernel/test/inet_res_SUITE.erl +++ b/lib/kernel/test/inet_res_SUITE.erl @@ -79,8 +79,8 @@ zone_dir(TC) -> end. init_per_testcase(Func, Config) -> - PrivDir = ?config(priv_dir, Config), - DataDir = ?config(data_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), + DataDir = proplists:get_value(data_dir, Config), try ns_init(zone_dir(Func), PrivDir, DataDir) of NsSpec -> Lookup = inet_db:res_option(lookup), @@ -97,20 +97,20 @@ init_per_testcase(Func, Config) -> end. end_per_testcase(_Func, Config) -> - inet_db:set_lookup(?config(res_lookup, Config)), - NsSpec = ?config(nameserver, Config), + inet_db:set_lookup(proplists:get_value(res_lookup, Config)), + NsSpec = proplists:get_value(nameserver, Config), case NsSpec of {_,{IP,Port},_} -> inet_db:del_alt_ns(IP, Port); _ -> ok end, - ns_end(NsSpec, ?config(priv_dir, Config)). + ns_end(NsSpec, proplists:get_value(priv_dir, Config)). %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Nameserver control ns(Config) -> - {_ZoneDir,NS,_P} = ?config(nameserver, Config), + {_ZoneDir,NS,_P} = proplists:get_value(nameserver, Config), NS. ns_init(ZoneDir, PrivDir, DataDir) -> @@ -573,7 +573,7 @@ files_monitor(Config) when is_list(Config) -> end. do_files_monitor(Config) -> - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), {ok,Hostname} = inet:gethostname(), io:format("Hostname = ~p.~n", [Hostname]), FQDN = diff --git a/lib/kernel/test/inet_sockopt_SUITE.erl b/lib/kernel/test/inet_sockopt_SUITE.erl index bf815fef1e..bc77127363 100644 --- a/lib/kernel/test/inet_sockopt_SUITE.erl +++ b/lib/kernel/test/inet_sockopt_SUITE.erl @@ -899,7 +899,7 @@ create_socketpair(ListenOptions,ConnectOptions) -> start_helper(Config) -> - Progname = filename:join(?config(data_dir, Config), "sockopt_helper"), + Progname = filename:join(proplists:get_value(data_dir, Config), "sockopt_helper"), Port = open_port({spawn,Progname},[eof,line]), Port. diff --git a/lib/kernel/test/init_SUITE.erl b/lib/kernel/test/init_SUITE.erl index 4613cce49f..c7e6d9bbbd 100644 --- a/lib/kernel/test/init_SUITE.erl +++ b/lib/kernel/test/init_SUITE.erl @@ -618,7 +618,7 @@ long_args(A) -> [A])). create_script(Config) -> - ?line PrivDir = ?config(priv_dir,Config), + PrivDir = proplists:get_value(priv_dir,Config), ?line Name = PrivDir ++ "boot_var_test", ?line Apps = application_controller:which_applications(), ?line {value,{_,_,KernelVer}} = lists:keysearch(kernel,1,Apps), diff --git a/lib/kernel/test/interactive_shell_SUITE.erl b/lib/kernel/test/interactive_shell_SUITE.erl index a6cae02dac..1cede1930a 100644 --- a/lib/kernel/test/interactive_shell_SUITE.erl +++ b/lib/kernel/test/interactive_shell_SUITE.erl @@ -54,7 +54,7 @@ init_per_suite(Config) -> [{default_shell,DefShell},{term,Term}|Config]. end_per_suite(Config) -> - Term = ?config(term,Config), + Term = proplists:get_value(term,Config), os:putenv("TERM",Term), ok. diff --git a/lib/kernel/test/kernel_config_SUITE.erl b/lib/kernel/test/kernel_config_SUITE.erl index 761b6816c9..11c9fb7d76 100644 --- a/lib/kernel/test/kernel_config_SUITE.erl +++ b/lib/kernel/test/kernel_config_SUITE.erl @@ -73,7 +73,7 @@ sync(doc) -> []; sync(suite) -> []; sync(Conf) when is_list(Conf) -> % Write a config file - Dir = ?config(priv_dir,Conf), + Dir = proplists:get_value(priv_dir,Conf), {ok, Fd} = file:open(Dir ++ "sys.config", [write]), config(Fd), file:close(Fd), diff --git a/lib/kernel/test/os_SUITE.erl b/lib/kernel/test/os_SUITE.erl index 8fd7f0dc3f..271ce80807 100644 --- a/lib/kernel/test/os_SUITE.erl +++ b/lib/kernel/test/os_SUITE.erl @@ -63,7 +63,7 @@ space_in_cwd(doc) -> "with space in its name works."; space_in_cwd(suite) -> []; space_in_cwd(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Dirname = filename:join(PrivDir, "cwd with space"), ?line ok = file:make_dir(Dirname), ?line ok = file:set_cwd(Dirname), @@ -91,7 +91,7 @@ space_in_cwd(Config) when is_list(Config) -> quoting(doc) -> "Test that various ways of quoting arguments work."; quoting(suite) -> []; quoting(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), ?line Echo = filename:join(DataDir, "my_echo"), ?line comp("one", os:cmd(Echo ++ " one")), @@ -109,7 +109,7 @@ quoting(Config) when is_list(Config) -> cmd_unicode(doc) -> "Test that unicode arguments work."; cmd_unicode(suite) -> []; cmd_unicode(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), ?line Echo = filename:join(DataDir, "my_echo"), ?line comp("one", os:cmd(Echo ++ " one")), @@ -124,8 +124,8 @@ space_in_name(doc) -> "Test that program with a space in its name can be executed."; space_in_name(suite) -> []; space_in_name(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), - ?line DataDir = ?config(data_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), + DataDir = proplists:get_value(data_dir, Config), ?line Spacedir = filename:join(PrivDir, "program files"), Ext = case os:type() of {win32,_} -> ".exe"; @@ -180,7 +180,7 @@ find_executable(doc) -> []; find_executable(Config) when is_list(Config) -> case os:type() of {win32, _} -> - ?line DataDir = filename:join(?config(data_dir, Config), "win32"), + DataDir = filename:join(proplists:get_value(data_dir, Config), "win32"), ?line ok = file:set_cwd(filename:join([DataDir, "current"])), ?line Bin = filename:join(DataDir, "bin"), ?line Abin = filename:join(DataDir, "abin"), @@ -213,7 +213,7 @@ find_executable(Config) when is_list(Config) -> ?line find_exe(Current, "my_batch", ".bat", Path), ok; {unix, _} -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %% Smoke test. case lib:progname() of @@ -254,7 +254,7 @@ unix_comment_in_command(doc) -> "OTP-1805: Test that os:cmd(\"ls #\") works correctly (used to hang)."; unix_comment_in_command(suite) -> []; unix_comment_in_command(Config) when is_list(Config) -> - ?line Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), ?line ok = file:set_cwd(Priv), ?line _ = os:cmd("ls #"), % Any result is ok. ?t:sleep(5), diff --git a/lib/kernel/test/pg2_SUITE.erl b/lib/kernel/test/pg2_SUITE.erl index 0f143770bc..703cca5aec 100644 --- a/lib/kernel/test/pg2_SUITE.erl +++ b/lib/kernel/test/pg2_SUITE.erl @@ -22,8 +22,8 @@ -module(pg2_SUITE). -include_lib("common_test/include/ct.hrl"). --define(datadir, ?config(data_dir, Config)). --define(privdir, ?config(priv_dir, Config)). +-define(datadir, proplists:get_value(data_dir, Config)). +-define(privdir, proplists:get_value(priv_dir, Config)). -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, @@ -34,7 +34,7 @@ compat/1, basic/1]). -define(TESTCASE, testcase_name). --define(testcase, ?config(?TESTCASE, Config)). +-define(testcase, proplists:get_value(?TESTCASE, Config)). %% Internal export. -export([mk_part_node_and_group/3, part2/4, @@ -658,7 +658,7 @@ make_partition(Config, Part1, Part2) -> make_partition(Config, Part1, Part2, mk_part_node). make_partition(Config, Part1, Part2, Function) -> - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), Ns = [begin Name = lists:concat([atom_to_list(N),"_",msec(),".part"]), File = filename:join([Dir, Name]), @@ -774,7 +774,7 @@ file_contents(File, ContentsList, Config, LogFile) -> end). make_partition_file(Config) -> - Dir = ?config(priv_dir, Config), + Dir = proplists:get_value(priv_dir, Config), filename:join([Dir, atom_to_list(make_partition_done)]). msec() -> diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl index c295fab94c..ee8d5fc928 100644 --- a/lib/kernel/test/prim_file_SUITE.erl +++ b/lib/kernel/test/prim_file_SUITE.erl @@ -125,7 +125,7 @@ end_per_group(_GroupName, Config) -> init_per_suite(Config) when is_list(Config) -> case os:type() of {win32, _} -> - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), HasAccessTime = case file:read_file_info(Priv) of {ok, #file_info{atime={_, {0, 0, 0}}}} -> @@ -184,7 +184,7 @@ time_dist({_D1, _T1} = DT1, {_D2, _T2} = DT2) -> read_write_file(suite) -> []; read_write_file(doc) -> []; read_write_file(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_read_write_file"), @@ -253,7 +253,7 @@ make_del_dir_b(Config) when is_list(Config) -> Result. make_del_dir(Config, Handle, Suffix) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_mk-dir"++Suffix), @@ -339,7 +339,7 @@ cur_dir_0(Config, Handle) -> end, %% Make a new dir, and cd to that - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, DirName), ?line ok = ?PRIM_FILE_call(make_dir, Handle, [NewDir]), case {os:type(), length(NewDir) >= 260} of @@ -442,7 +442,7 @@ win_cur_dir_1(_Config, Handle) -> open1(suite) -> []; open1(doc) -> []; open1(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_files"), @@ -471,7 +471,7 @@ open1(Config) when is_list(Config) -> modes(suite) -> []; modes(doc) -> []; modes(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_open_modes"), @@ -513,7 +513,7 @@ modes(Config) when is_list(Config) -> close(suite) -> []; close(doc) -> []; close(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_close.fil"), @@ -534,7 +534,7 @@ close(Config) when is_list(Config) -> access(suite) -> []; access(doc) -> []; access(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_access.fil"), @@ -562,7 +562,7 @@ access(Config) when is_list(Config) -> read_write(suite) -> []; read_write(doc) -> []; read_write(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_read_write"), @@ -590,7 +590,7 @@ read_write_test(File) -> pread_write(suite) -> []; pread_write(doc) -> []; pread_write(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_pread_write"), @@ -620,7 +620,7 @@ pread_write_test(File) -> append(doc) -> "Test appending to a file."; append(suite) -> []; append(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_append"), @@ -651,7 +651,7 @@ append(Config) when is_list(Config) -> exclusive(suite) -> []; exclusive(doc) -> "Test exclusive access to a file."; exclusive(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_exclusive"), @@ -668,7 +668,7 @@ exclusive(Config) when is_list(Config) -> pos1(suite) -> []; pos1(doc) -> []; pos1(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_pos1.fil"), @@ -729,7 +729,7 @@ pos1(Config) when is_list(Config) -> pos2(suite) -> []; pos2(doc) -> []; pos2(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_pos2.fil"), @@ -762,7 +762,7 @@ file_info_basic_file_b(Config) when is_list(Config) -> Result. file_info_basic_file(Config, Handle, Suffix) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), %% Create a short file. ?line Name = filename:join(RootDir, @@ -809,7 +809,7 @@ file_info_basic_directory(Config, Handle) -> %% Note: filename:join/1 removes any trailing slash, %% which is essential for ?PRIM_FILE:read_file_info/1 to work on %% platforms such as Windows95. - ?line RootDir = filename:join([?config(priv_dir, Config)]), + RootDir = filename:join([proplists:get_value(priv_dir, Config)]), %% Test that the RootDir directory has the expected attributes. ?line test_directory(RootDir, read_write, Handle), @@ -866,7 +866,7 @@ file_info_bad_b(Config) when is_list(Config) -> Result. file_info_bad(Config, Handle) -> - ?line RootDir = filename:join([?config(priv_dir, Config)]), + RootDir = filename:join([proplists:get_value(priv_dir, Config)]), ?line {error, enoent} = ?PRIM_FILE_call( read_file_info, Handle, @@ -903,7 +903,7 @@ file_info_int(Config, Handle, Suffix) -> %% which is essential for ?PRIM_FILE:read_file_info/1 to work on %% platforms such as Windows95. - ?line RootDir = filename:join([?config(priv_dir, Config)]), + RootDir = filename:join([proplists:get_value(priv_dir, Config)]), ?line test_server:format("RootDir = ~p", [RootDir]), ?line Name = filename:join(RootDir, @@ -1151,12 +1151,12 @@ file_write_read_file_info_opts(Handle, Name, Mtime, Opts) -> %% Returns a directory on a file system that has correct file times. get_good_directory(Config) -> - ?line ?config(priv_dir, Config). + proplists:get_value(priv_dir, Config). truncate(suite) -> []; truncate(doc) -> []; truncate(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_truncate.fil"), @@ -1187,7 +1187,7 @@ truncate(Config) when is_list(Config) -> datasync(suite) -> []; datasync(doc) -> "Tests that ?PRIM_FILE:datasync/1 at least doesn't crash."; datasync(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Sync = filename:join(PrivDir, atom_to_list(?MODULE) ++"_sync.fil"), @@ -1203,7 +1203,7 @@ datasync(Config) when is_list(Config) -> sync(suite) -> []; sync(doc) -> "Tests that ?PRIM_FILE:sync/1 at least doesn't crash."; sync(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Sync = filename:join(PrivDir, atom_to_list(?MODULE) ++"_sync.fil"), @@ -1219,7 +1219,7 @@ sync(Config) when is_list(Config) -> advise(suite) -> []; advise(doc) -> "Tests that ?PRIM_FILE:advise/4 at least doesn't crash."; advise(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Advise = filename:join(PrivDir, atom_to_list(?MODULE) ++"_advise.fil"), @@ -1323,7 +1323,7 @@ check_large_write(Fd, _, _, []) -> allocate(suite) -> []; allocate(doc) -> "Tests that ?PRIM_FILE:allocate/3 at least doesn't crash."; allocate(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), ?line Allocate = filename:join(PrivDir, atom_to_list(?MODULE) ++"_allocate.fil"), @@ -1402,7 +1402,7 @@ delete_b(Config) when is_list(Config) -> Result. delete(Config, Handle, Suffix) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line Name = filename:join(RootDir, atom_to_list(?MODULE) ++"_delete"++Suffix++".fil"), @@ -1433,7 +1433,7 @@ rename_b(Config) when is_list(Config) -> Result. rename(Config, Handle, Suffix) -> - ?line RootDir = ?config(priv_dir,Config), + RootDir = proplists:get_value(priv_dir,Config), ?line FileName1 = atom_to_list(?MODULE)++"_rename"++Suffix++".fil", ?line FileName2 = atom_to_list(?MODULE)++"_rename"++Suffix++".ful", ?line Name1 = filename:join(RootDir, FileName1), @@ -1495,7 +1495,7 @@ rename(Config, Handle, Suffix) -> e_delete(suite) -> []; e_delete(doc) -> []; e_delete(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line Base = filename:join(RootDir, atom_to_list(?MODULE)++"_e_delete"), ?line ok = ?PRIM_FILE:make_dir(Base), @@ -1539,7 +1539,7 @@ e_delete(Config) when is_list(Config) -> e_rename(suite) -> []; e_rename(doc) -> []; e_rename(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line Base = filename:join(RootDir, atom_to_list(?MODULE)++"_e_rename"), ?line ok = ?PRIM_FILE:make_dir(Base), @@ -1640,7 +1640,7 @@ e_rename(Config) when is_list(Config) -> e_make_dir(suite) -> []; e_make_dir(doc) -> []; e_make_dir(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line Base = filename:join(RootDir, atom_to_list(?MODULE)++"_e_make_dir"), ?line ok = ?PRIM_FILE:make_dir(Base), @@ -1674,7 +1674,7 @@ e_make_dir(Config) when is_list(Config) -> e_del_dir(suite) -> []; e_del_dir(doc) -> []; e_del_dir(Config) when is_list(Config) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line Base = filename:join(RootDir, atom_to_list(?MODULE)++"_e_del_dir"), ?line io:format("Base: ~p", [Base]), @@ -1729,7 +1729,7 @@ e_del_dir(Config) when is_list(Config) -> read_compressed(suite) -> []; read_compressed(doc) -> []; read_compressed(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), + Data = proplists:get_value(data_dir, Config), ?line Real = filename:join(Data, "realmen.html.gz"), ?line {ok, Fd} = ?PRIM_FILE:open(Real, [read, compressed]), ?line try_read_file(Fd). @@ -1740,8 +1740,8 @@ read_compressed(Config) when is_list(Config) -> read_not_really_compressed(suite) -> []; read_not_really_compressed(doc) -> []; read_not_really_compressed(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), - ?line Priv = ?config(priv_dir, Config), + Data = proplists:get_value(data_dir, Config), + Priv = proplists:get_value(priv_dir, Config), %% The file realmen.html might have got CRs added (by WinZip). %% Remove them, or the file positions will not be correct. @@ -1803,7 +1803,7 @@ try_read_file(Fd) -> write_compressed(suite) -> []; write_compressed(doc) -> []; write_compressed(Config) when is_list(Config) -> - ?line Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), ?line MyFile = filename:join(Priv, atom_to_list(?MODULE)++"_test.gz"), @@ -1851,7 +1851,7 @@ write_compressed(Config) when is_list(Config) -> compress_errors(suite) -> []; compress_errors(doc) -> []; compress_errors(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), + Data = proplists:get_value(data_dir, Config), ?line {error, enoent} = ?PRIM_FILE:open("non_existing__", [compressed, read]), ?line {error, einval} = ?PRIM_FILE:open("non_existing__", @@ -1881,7 +1881,7 @@ make_link_b(Config) when is_list(Config) -> Result. make_link(Config, Handle, Suffix) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_make_link"++Suffix), @@ -1936,7 +1936,7 @@ symlinks_b(Config) when is_list(Config) -> Result. symlinks(Config, Handle, Suffix) -> - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE) ++"_make_symlink"++Suffix), @@ -1988,7 +1988,7 @@ list_dir_limit(Config) when is_list(Config) -> ?line MaxTime = 120, ?line MaxNumber = 20000, ct:timetrap({seconds,2*MaxTime + MaxTime}), - ?line RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), ?line NewDir = filename:join(RootDir, atom_to_list(?MODULE)++"_list_dir_limit"), ?line {ok, Handle1} = ?PRIM_FILE:start(), @@ -2077,7 +2077,7 @@ list_dir_limit_cleanup(Dir, Handle, N, Cnt) -> %%% list_dir_error(Config) -> - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), NonExisting = filename:join(Priv, "non-existing-dir"), {error,enoent} = prim_file:list_dir(NonExisting), ok. @@ -2087,7 +2087,7 @@ list_dir_error(Config) -> %%% list_dir(Config) -> - RootDir = ?config(priv_dir, Config), + RootDir = proplists:get_value(priv_dir, Config), TestDir = filename:join(RootDir, ?MODULE_STRING++"_list_dir"), ?PRIM_FILE:make_dir(TestDir), list_dir_1(TestDir, 42, []). @@ -2118,7 +2118,7 @@ run_large_file_test(Config, Run, Name) -> {{unix,sunos},OsVersion} when OsVersion < {5,5,1} -> {skip,"Only supported on Win32, Unix or SunOS >= 5.5.1"}; {{unix,_},_} -> - N = unix_free(?config(priv_dir, Config)), + N = unix_free(proplists:get_value(priv_dir, Config)), io:format("Free disk: ~w KByte~n", [N]), if N < 5 bsl 20 -> %% Less than 5 GByte free @@ -2132,7 +2132,7 @@ run_large_file_test(Config, Run, Name) -> do_run_large_file_test(Config, Run, Name0) -> - Name = filename:join(?config(priv_dir, Config), + Name = filename:join(proplists:get_value(priv_dir, Config), ?MODULE_STRING ++ Name0), %% Set up a process that will delete this file. diff --git a/lib/kernel/test/ram_file_SUITE.erl b/lib/kernel/test/ram_file_SUITE.erl index 408fadf461..96bd9a02c6 100644 --- a/lib/kernel/test/ram_file_SUITE.erl +++ b/lib/kernel/test/ram_file_SUITE.erl @@ -401,7 +401,7 @@ compress(suite) -> compress(doc) -> ["Test that compress/1 and uncompress/1 works."]; compress(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), + Data = proplists:get_value(data_dir, Config), ?line Real = filename:join(Data, "realmen.html"), ?line RealGz = filename:join(Data, "realmen.html.gz"), %% @@ -466,7 +466,7 @@ uuencode(suite) -> uuencode(doc) -> ["Test that uuencode/1 and uudecode/1 works."]; uuencode(Config) when is_list(Config) -> - ?line Data = ?config(data_dir, Config), + Data = proplists:get_value(data_dir, Config), ?line Real = filename:join(Data, "realmen.html"), ?line RealUu = filename:join(Data, "realmen.html.uu"), %% @@ -541,7 +541,7 @@ large_file_light(suite) -> large_file_light(doc) -> ["Test light operations on a \"large\" ram_file."]; large_file_light(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), %% Marker for next test case that is to heavy to run in a suite. ?line ok = ?FILE_MODULE:write_file( filename:join(PrivDir, "large_file_light"), @@ -574,7 +574,7 @@ large_file_heavy(suite) -> large_file_heavy(doc) -> ["Test operations on a maximum size (2 GByte - 1) ram_file."]; large_file_heavy(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), + PrivDir = proplists:get_value(priv_dir, Config), %% Check previous test case marker. case ?FILE_MODULE:read_file_info( filename:join(PrivDir, "large_file_light")) of diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl index a82b9c5fcd..775689a6bc 100644 --- a/lib/kernel/test/sendfile_SUITE.erl +++ b/lib/kernel/test/sendfile_SUITE.erl @@ -53,7 +53,7 @@ init_per_suite(Config) -> {{unix,sunos}, {5,8,_}} -> {skip, "Solaris 8 not supported for now"}; _ -> - Priv = ?config(priv_dir, Config), + Priv = proplists:get_value(priv_dir, Config), SFilename = filename:join(Priv, "sendfile_small.html"), {ok, DS} = file:open(SFilename,[write,raw]), file:write(DS,"yo baby yo"), diff --git a/lib/kernel/test/seq_trace_SUITE.erl b/lib/kernel/test/seq_trace_SUITE.erl index ba6d69b74d..ee75c49d16 100644 --- a/lib/kernel/test/seq_trace_SUITE.erl +++ b/lib/kernel/test/seq_trace_SUITE.erl @@ -871,7 +871,7 @@ stop_node(Node) -> test_server:stop_node(Node). load_tracer(Config) -> - Path = ?config(data_dir, Config), + Path = proplists:get_value(data_dir, Config), ok = erl_ddll:load_driver(Path, echo_drv), open_port({spawn,echo_drv}, [eof,binary]). diff --git a/lib/kernel/test/wrap_log_reader_SUITE.erl b/lib/kernel/test/wrap_log_reader_SUITE.erl index 65a304afae..31fe91f372 100644 --- a/lib/kernel/test/wrap_log_reader_SUITE.erl +++ b/lib/kernel/test/wrap_log_reader_SUITE.erl @@ -31,7 +31,7 @@ -else. -include_lib("common_test/include/ct.hrl"). -define(format(S, A), ok). --define(privdir(Conf), ?config(priv_dir, Conf)). +-define(privdir(Conf), proplists:get_value(priv_dir, Conf)). -endif. -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, @@ -82,7 +82,7 @@ end_per_testcase(_Func, _Config) -> no_file(suite) -> []; no_file(doc) -> ["No log file exists"]; no_file(Conf) when is_list(Conf) -> - ?line code:add_path(?config(data_dir,Conf)), + code:add_path(proplists:get_value(data_dir,Conf)), Dir = ?privdir(Conf), File = join(Dir, "sune.LOG"), delete_files(File), diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl index 1155157815..3b029107b9 100644 --- a/lib/kernel/test/zlib_SUITE.erl +++ b/lib/kernel/test/zlib_SUITE.erl @@ -1020,7 +1020,7 @@ otp_9981(Config) when is_list(Config) -> %%% Helps with testing directly %%%%%%%%%%%%% conf(What,Config) -> - try ?config(What,Config) of + try proplists:get_value(What,Config) of undefined -> "./zlib_SUITE_data"; Dir -> |