aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/ts.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-02-16 09:48:56 +0100
committerLukas Larsson <[email protected]>2011-02-16 09:49:40 +0100
commit00db7dddae0c6f1acddf52d97c9e6c65393d2459 (patch)
tree58c8c5b8cd4b81c6a8788bf80fa9808be59f7bb1 /lib/test_server/src/ts.erl
parent8b86cd551352ac06bccbeab4c76849d3978876ec (diff)
downloadotp-00db7dddae0c6f1acddf52d97c9e6c65393d2459.tar.gz
otp-00db7dddae0c6f1acddf52d97c9e6c65393d2459.tar.bz2
otp-00db7dddae0c6f1acddf52d97c9e6c65393d2459.zip
Update ts to take the config path as an invironmental and as a variables passed with all_tests and also with the normal run
Diffstat (limited to 'lib/test_server/src/ts.erl')
-rw-r--r--lib/test_server/src/ts.erl17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl
index befa6bf7f1..3d55f41b8c 100644
--- a/lib/test_server/src/ts.erl
+++ b/lib/test_server/src/ts.erl
@@ -150,6 +150,14 @@ help(installed) ->
" TraceSpec is the name of a file containing\n",
" trace specifications or a list of trace\n",
" specification elements.\n",
+ " {config, Path} - Specify which directory ts should get it's \n"
+ " config files from. The files should follow\n"
+ " the convention lib/test_server/src/ts*.config.\n"
+ " These config files can also be specified by\n"
+ " setting the TEST_CONFIG_PATH environment\n"
+ " variable to the directory where the config\n"
+ " files are. The default location is\n"
+ " tests/test_server/.\n"
"\n",
"Supported trace information elements\n",
" {tp | tpl, Mod, [] | match_spec()}\n",
@@ -330,10 +338,11 @@ check_test_get_opts(Testspec, Config) ->
validate_test(Testspec),
Mode = configmember(batch, {batch, interactive}, Config),
Vars = configvars(Config),
- Trace = configtrace(Config),
+ Trace = get_config(trace,Config),
+ ConfigPath = get_config(config,Config),
KeepTopcase = configmember(keep_topcase, {keep_topcase,[]}, Config),
Cover = configcover(Testspec,Config),
- lists:flatten([Vars,Mode,Trace,KeepTopcase,Cover]).
+ lists:flatten([Vars,Mode,Trace,KeepTopcase,Cover,ConfigPath]).
to_erlang_term(Atom) ->
String = atom_to_list(Atom),
@@ -401,8 +410,8 @@ special_vars(Config) ->
SpecVars1
end.
-configtrace(Config) ->
- case lists:keysearch(trace,1,Config) of
+get_config(Key,Config) ->
+ case lists:keysearch(Key,1,Config) of
{value,Value} -> Value;
false -> []
end.