aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/ts_run.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-08-27 11:39:27 +0200
committerLukas Larsson <[email protected]>2012-08-27 11:39:27 +0200
commitc44761ce22e76d9d07241ea5942e4b7e2c7aeb28 (patch)
treed164b84559e573aa61156a1b96869ee1fd45410c /lib/test_server/src/ts_run.erl
parent4877acc0598fe257315e8398dc9e11428d757000 (diff)
parenta95a238719369feb1002daeacf4e1485439a38d2 (diff)
downloadotp-c44761ce22e76d9d07241ea5942e4b7e2c7aeb28.tar.gz
otp-c44761ce22e76d9d07241ea5942e4b7e2c7aeb28.tar.bz2
otp-c44761ce22e76d9d07241ea5942e4b7e2c7aeb28.zip
Merge branch 'lukas/common_test/deep_get_config/OTP-9626' into maint
* lukas/common_test/deep_get_config/OTP-9626: Add more cross reference links to ct docs Remove config option from common_test args Update user config to use nested tuple keys
Diffstat (limited to 'lib/test_server/src/ts_run.erl')
-rw-r--r--lib/test_server/src/ts_run.erl27
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/test_server/src/ts_run.erl b/lib/test_server/src/ts_run.erl
index a61028e4bc..2e8c092400 100644
--- a/lib/test_server/src/ts_run.erl
+++ b/lib/test_server/src/ts_run.erl
@@ -334,9 +334,9 @@ path_separator() ->
end.
-make_common_test_args(Args0, Options, _Vars) ->
+make_common_test_args(Args0, Options0, _Vars) ->
Trace =
- case lists:keysearch(trace,1,Options) of
+ case lists:keysearch(trace,1,Options0) of
{value,{trace,TI}} when is_tuple(TI); is_tuple(hd(TI)) ->
ok = file:write_file(?tracefile,io_lib:format("~p.~n",[TI])),
[{ct_trace,?tracefile}];
@@ -348,7 +348,7 @@ make_common_test_args(Args0, Options, _Vars) ->
[]
end,
Cover =
- case lists:keysearch(cover,1,Options) of
+ case lists:keysearch(cover,1,Options0) of
{value,{cover, App, none, _Analyse}} ->
io:format("No cover file found for ~p~n",[App]),
[];
@@ -358,7 +358,7 @@ make_common_test_args(Args0, Options, _Vars) ->
[]
end,
- Logdir = case lists:keysearch(logdir, 1, Options) of
+ Logdir = case lists:keysearch(logdir, 1, Options0) of
{value,{logdir, _}} ->
[];
false ->
@@ -373,15 +373,16 @@ make_common_test_args(Args0, Options, _Vars) ->
{scale_timetraps, true}]
end,
- ConfigPath = case {os:getenv("TEST_CONFIG_PATH"),
- lists:keysearch(config, 1, Options)} of
- {false,{value, {config, Path}}} ->
- Path;
- {false,false} ->
- "../test_server";
- {Path,_} ->
- Path
- end,
+ {ConfigPath,
+ Options} = case {os:getenv("TEST_CONFIG_PATH"),
+ lists:keysearch(config, 1, Options0)} of
+ {_,{value, {config, Path}}} ->
+ {Path,lists:keydelete(config, 1, Options0)};
+ {false,false} ->
+ {"../test_server",Options0};
+ {Path,_} ->
+ {Path,Options0}
+ end,
ConfigFiles = [{config,[filename:join(ConfigPath,File)
|| File <- get_config_files()]}],
io_lib:format("~100000p",[Args0++Trace++Cover++Logdir++