diff options
author | Peter Andersson <[email protected]> | 2015-02-23 11:12:03 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2015-02-23 11:12:03 +0100 |
commit | 121b920ed5a729e69e21d8869d554d736c10f427 (patch) | |
tree | c74c92116c9a1aeaf6ca34d27859fb5ffda3fcb2 /lib/common_test | |
parent | 9741d1c9cdcce08ec7a0c5c91ab6e1af781ed745 (diff) | |
parent | daa3c46d80435b0b790911095b34dc7255b3a6b8 (diff) | |
download | otp-121b920ed5a729e69e21d8869d554d736c10f427.tar.gz otp-121b920ed5a729e69e21d8869d554d736c10f427.tar.bz2 otp-121b920ed5a729e69e21d8869d554d736c10f427.zip |
Merge remote-tracking branch 'origin/peppe/common_test/include_file_problems' into maint
* origin/peppe/common_test/include_file_problems:
Fix failing test case
Add valid include path to epp in erl2html2 and fix crashing code
OTP-12419
Diffstat (limited to 'lib/common_test')
-rw-r--r-- | lib/common_test/src/ct_run.erl | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl index 00d0aab507..3605385689 100644 --- a/lib/common_test/src/ct_run.erl +++ b/lib/common_test/src/ct_run.erl @@ -293,10 +293,10 @@ script_start1(Parent, Args) -> application:set_env(common_test, auto_compile, true), InclDirs = case proplists:get_value(include, Args) of - Incl when is_list(hd(Incl)) -> - Incl; + Incls when is_list(hd(Incls)) -> + [filename:absname(IDir) || IDir <- Incls]; Incl when is_list(Incl) -> - [Incl]; + [filename:absname(Incl)]; undefined -> [] end, @@ -1023,10 +1023,10 @@ run_test2(StartOpts) -> case proplists:get_value(include, StartOpts) of undefined -> []; - Incl when is_list(hd(Incl)) -> - Incl; + Incls when is_list(hd(Incls)) -> + [filename:absname(IDir) || IDir <- Incls]; Incl when is_list(Incl) -> - [Incl] + [filename:absname(Incl)] end, case os:getenv("CT_INCLUDE_PATH") of false -> @@ -1393,6 +1393,7 @@ run_testspec2(TestSpec) -> EnvInclude++Opts#opts.include end, application:set_env(common_test, include, AllInclude), + LogDir1 = which(logdir,Opts#opts.logdir), case check_and_install_configfiles( Opts#opts.config, LogDir1, Opts) of @@ -2134,6 +2135,14 @@ do_run_test(Tests, Skip, Opts0) -> case check_and_add(Tests, [], []) of {ok,AddedToPath} -> ct_util:set_testdata({stats,{0,0,{0,0}}}), + + %% test_server needs to know the include path too + InclPath = case application:get_env(common_test, include) of + {ok,Incls} -> Incls; + _ -> [] + end, + application:set_env(test_server, include, InclPath), + test_server_ctrl:start_link(local), %% let test_server expand the test tuples and count no of cases |