aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_config_SUITE_data
diff options
context:
space:
mode:
authorAndrey Pampukha <[email protected]>2010-03-11 14:21:51 +0100
committerRaimo Niskanen <[email protected]>2010-06-09 16:19:10 +0200
commite04b9be7167841c7eaefcfb7eee5b4bc2eb3a943 (patch)
tree98845383ba44ca1be74593c65cef275fb2e76cbd /lib/common_test/test/ct_config_SUITE_data
parent5b66bed40bd374dfcaa5e5669adf338734d812a3 (diff)
downloadotp-e04b9be7167841c7eaefcfb7eee5b4bc2eb3a943.tar.gz
otp-e04b9be7167841c7eaefcfb7eee5b4bc2eb3a943.tar.bz2
otp-e04b9be7167841c7eaefcfb7eee5b4bc2eb3a943.zip
Add tests for test specifications
Diffstat (limited to 'lib/common_test/test/ct_config_SUITE_data')
-rw-r--r--lib/common_test/test/ct_config_SUITE_data/config/test/config_driver.erl13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/common_test/test/ct_config_SUITE_data/config/test/config_driver.erl b/lib/common_test/test/ct_config_SUITE_data/config/test/config_driver.erl
index 37572500c7..670639f7c7 100644
--- a/lib/common_test/test/ct_config_SUITE_data/config/test/config_driver.erl
+++ b/lib/common_test/test/ct_config_SUITE_data/config/test/config_driver.erl
@@ -33,9 +33,14 @@ read_config(ServerName)->
check_parameter(ServerName)->
ServerModule = list_to_atom(ServerName),
- case code:load_file(ServerModule) of
- {module, ServerModule}->
+ case code:is_loaded(ServerModule) of
+ {file, _}->
{ok, {config, ServerName}};
- {error, nofile}->
- {nok, {wrong_config, "File not found: " ++ ServerName ++ ".beam"}}
+ false->
+ case code:load_file(ServerModule) of
+ {module, ServerModule}->
+ {ok, {config, ServerName}};
+ {error, nofile}->
+ {nok, {wrong_config, "File not found: " ++ ServerName ++ ".beam"}}
+ end
end.