diff options
author | Peter Andersson <[email protected]> | 2012-01-18 15:45:40 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2012-03-13 14:57:35 +0100 |
commit | 4aabf295e7b11d5ae03553aab1ba83a2657fa7aa (patch) | |
tree | fcb2c6b03a63af56a00da21b53aa536e4170d0fc /lib/common_test/src/ct.erl | |
parent | 24cb87703d919598d5b95268d868432c8ada3232 (diff) | |
download | otp-4aabf295e7b11d5ae03553aab1ba83a2657fa7aa.tar.gz otp-4aabf295e7b11d5ae03553aab1ba83a2657fa7aa.tar.bz2 otp-4aabf295e7b11d5ae03553aab1ba83a2657fa7aa.zip |
Make it possible to use unique priv_dir names
Introduce the optional feature to have Test Server generate
priv_dir directory names that are unique for each test case
or config function. The name of the option/flag is
'unique_priv_dir' and it can be set to value 'auto' or
'manual'. If auto, Test Server creates each priv_dir
automatically (can be expensive in case of many and/or repeated
cases). If manual, the user needs to create the priv_dir
explicitly by calling ct:make_priv_dir/0.
Diffstat (limited to 'lib/common_test/src/ct.erl')
-rw-r--r-- | lib/common_test/src/ct.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl index 0a77527b2f..83ed0a66d7 100644 --- a/lib/common_test/src/ct.erl +++ b/lib/common_test/src/ct.erl @@ -64,7 +64,7 @@ print/1, print/2, print/3, pal/1, pal/2, pal/3, capture_start/0, capture_stop/0, capture_get/0, capture_get/1, - fail/1, fail/2, comment/1, comment/2, + fail/1, fail/2, comment/1, comment/2, make_priv_dir/0, testcases/2, userdata/2, userdata/3, timetrap/1, get_timetrap_info/0, sleep/1]). @@ -673,6 +673,15 @@ send_html_comment(Comment) -> ct_util:set_testdata({comment,Html}), test_server:comment(Html). +%%%----------------------------------------------------------------- +%%% @spec make_priv_dir() -> ok | {error,Reason} +%%% Reason = term() +%%% @doc If the test has been started with the unique_priv_dir +%%% option set to manual, in order for the test case to use the +%%% private directory, it must first create it by calling +%%% this function. +make_priv_dir() -> + test_server:make_priv_dir(). %%%----------------------------------------------------------------- %%% @spec get_target_name(Handle) -> {ok,TargetName} | {error,Reason} |