aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct.erl
diff options
context:
space:
mode:
authorAndrey Pampukha <[email protected]>2010-03-24 11:35:59 +0100
committerRaimo Niskanen <[email protected]>2010-06-09 16:19:16 +0200
commit497c107bcdb7095f402d4b9884b0bfc8f9bbe97f (patch)
treee727a22eb45d5d5df0072cfcbdaac5a09ff7cdc1 /lib/common_test/src/ct.erl
parent743d8c90b1f7420fb29077daacf959b018cb4086 (diff)
downloadotp-497c107bcdb7095f402d4b9884b0bfc8f9bbe97f.tar.gz
otp-497c107bcdb7095f402d4b9884b0bfc8f9bbe97f.tar.bz2
otp-497c107bcdb7095f402d4b9884b0bfc8f9bbe97f.zip
Add support for user_config in ct_master
Diffstat (limited to 'lib/common_test/src/ct.erl')
-rw-r--r--lib/common_test/src/ct.erl23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index caae2326b6..6cc876b42e 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -807,8 +807,31 @@ decrypt_config_file(EncryptFileName, TargetFileName) ->
decrypt_config_file(EncryptFileName, TargetFileName, KeyOrFile) ->
ct_config:decrypt_config_file(EncryptFileName, TargetFileName, KeyOrFile).
+
+%%%-----------------------------------------------------------------
+%%% @spec add_config(Callback, Config) ->
+%%% ok | {error, Reason}
+%%% Callback = atom()
+%%% Config = string()
+%%% Reason = term()
+%%%
+%%% @doc <p>This function loads configuration variables using the
+%%% given callback module and configuration string. Callback module
+%%% should be either loaded or present in the code part. Loaded
+%%% configuration variables can later be removed using
+%%% <code>remove_config/2</code> function.</p>
add_config(Callback, Config)->
ct_config:add_config(Callback, Config).
+%%%-----------------------------------------------------------------
+%%% @spec remove_config(Callback, Config) ->
+%%% ok
+%%% Callback = atom()
+%%% Config = string()
+%%% Reason = term()
+%%%
+%%% @doc <p>This function removes configuration variables (together with
+%%% their aliases) which were loaded with specified callback module and
+%%% configuration string.</p>
remove_config(Callback, Config)->
ct_config:remove_config(Callback, Config).