diff options
author | Peter Andersson <[email protected]> | 2012-11-20 12:19:31 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2012-11-20 12:20:11 +0100 |
commit | 8b2dcbaf0acd2350f8b3259701384e6d1a858824 (patch) | |
tree | c743f0f6c27a93a7ecaedc4bf840e772a5d91e0c | |
parent | 1ecc870573b37491e9dd7965d29d20efea557c01 (diff) | |
parent | 4a0600126b78a7083cb380c5d9efcdd364f551f8 (diff) | |
download | otp-8b2dcbaf0acd2350f8b3259701384e6d1a858824.tar.gz otp-8b2dcbaf0acd2350f8b3259701384e6d1a858824.tar.bz2 otp-8b2dcbaf0acd2350f8b3259701384e6d1a858824.zip |
Merge remote branch 'origin/peppe/common_test/config_broken_r15b03' into maint
* origin/peppe/common_test/config_broken_r15b03:
Fix problem with config start option not accepting list of files
OTP-10495
-rw-r--r-- | lib/common_test/src/ct_config.erl | 2 | ||||
-rw-r--r-- | lib/common_test/src/ct_run.erl | 6 | ||||
-rw-r--r-- | lib/common_test/test/ct_config_SUITE.erl | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/lib/common_test/src/ct_config.erl b/lib/common_test/src/ct_config.erl index 06a8e12f55..b1d709bc75 100644 --- a/lib/common_test/src/ct_config.erl +++ b/lib/common_test/src/ct_config.erl @@ -171,7 +171,7 @@ process_default_configs(Opts) -> lists:flatmap(fun({config,[_|_] = FileOrFiles}) -> case {io_lib:printable_list(FileOrFiles), io_lib:printable_list(hd(FileOrFiles))} of - {true,true} -> + {false,true} -> FileOrFiles; {true,false} -> [FileOrFiles]; diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl index 3383244bf4..ffa2a21ea9 100644 --- a/lib/common_test/src/ct_run.erl +++ b/lib/common_test/src/ct_run.erl @@ -2786,8 +2786,10 @@ opts2args(EnvStartOpts) -> [{halt_with,[atom_to_list(HaltM),atom_to_list(HaltF)]}]; ({interactive_mode,true}) -> [{shell,[]}]; - ({config,CfgFiles}) -> - [{ct_config,[CfgFiles]}]; + ({config,CfgFile}) when is_integer(hd(CfgFile)) -> + [{ct_config,[CfgFile]}]; + ({config,CfgFiles}) when is_list(hd(CfgFiles)) -> + [{ct_config,CfgFiles}]; ({userconfig,{CBM,CfgStr=[X|_]}}) when is_integer(X) -> [{userconfig,[atom_to_list(CBM),CfgStr]}]; ({userconfig,{CBM,CfgStrs}}) when is_list(CfgStrs) -> diff --git a/lib/common_test/test/ct_config_SUITE.erl b/lib/common_test/test/ct_config_SUITE.erl index 1e1df908db..d92be9ec6e 100644 --- a/lib/common_test/test/ct_config_SUITE.erl +++ b/lib/common_test/test/ct_config_SUITE.erl @@ -88,8 +88,8 @@ require(Config) when is_list(Config) -> DataDir = ?config(data_dir, Config), run_test(config_static_SUITE, Config, - [{config, filename:join(DataDir, "config/shadow.txt")}, - {config, filename:join(DataDir, "config/config.txt")}], + [{config, [filename:join(DataDir, "config/shadow.txt"), + filename:join(DataDir, "config/config.txt")]}], ["config_static_SUITE"]). install_config(Config) when is_list(Config) -> @@ -174,6 +174,7 @@ run_test(Name, Config, CTConfig, SuiteNames)-> Joiner = fun(Suite) -> filename:join(DataDir, "config/test/"++Suite) end, Suites = lists:map(Joiner, SuiteNames), {Opts,ERPid} = setup_env({suite,Suites}, Config, CTConfig), + ok = ct_test_support:run(Opts, Config), TestEvents = ct_test_support:get_events(ERPid, Config), ct_test_support:log_events(Name, |