diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-13 15:47:15 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-13 15:47:15 +0200 |
commit | ea6c780391c8bc51fa04ee2e4892bdfd49d5623e (patch) | |
tree | 6f7072429f0615c23b60bdb8966c3ead79a8cdb1 /lib/tools/test/ignore_cores.erl | |
parent | c7fdee3325a19cce992093940a45ef07b422ecb9 (diff) | |
parent | d5db7d329bf597ad097d602b03a523b7a970d5d2 (diff) | |
download | otp-ea6c780391c8bc51fa04ee2e4892bdfd49d5623e.tar.gz otp-ea6c780391c8bc51fa04ee2e4892bdfd49d5623e.tar.bz2 otp-ea6c780391c8bc51fa04ee2e4892bdfd49d5623e.zip |
Merge branch 'egil/tools/modernize-tests'
* egil/tools/modernize-tests:
tools: Don't divide by zero in tests
Fix instruments_SUITE sumblock check
Eliminate use of doc and suite clauses
Replace ?t with test_server
Use test_server:is_debug/0 instead of custom check
Replace use of test_server:format/2 with io:format/2
Eliminate use of ?config() macro
Eliminate use of test_server:fail/0,1
Eliminate erlang:now/0
Modernize use of timetraps
Remove ?line macros
Diffstat (limited to 'lib/tools/test/ignore_cores.erl')
-rw-r--r-- | lib/tools/test/ignore_cores.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/tools/test/ignore_cores.erl b/lib/tools/test/ignore_cores.erl index 576bb812e8..25dce346b9 100644 --- a/lib/tools/test/ignore_cores.erl +++ b/lib/tools/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) ++ "_" @@ -94,7 +94,7 @@ setup(Suite, Testcase, Config, SetCwd) when is_atom(Suite), end, ok = file:write_file(filename:join([IgnDir, "ignore_core_files"]), <<>>), %% cores are dumped in /cores on MacOS X - CoresDir = case {?t:os_type(), filelib:is_dir("/cores")} of + CoresDir = case {os:type(), filelib:is_dir("/cores")} of {{unix,darwin}, true} -> filelib:fold_files("/cores", "^core.*$", @@ -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. |