diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test_server/test/test_server_SUITE.erl | 8 | ||||
-rw-r--r-- | lib/test_server/test/test_server_test_lib.erl | 14 |
2 files changed, 13 insertions, 9 deletions
diff --git a/lib/test_server/test/test_server_SUITE.erl b/lib/test_server/test/test_server_SUITE.erl index cb8cb9da31..d20528d43b 100644 --- a/lib/test_server/test/test_server_SUITE.erl +++ b/lib/test_server/test/test_server_SUITE.erl @@ -120,9 +120,9 @@ run_test_server_tests(SuiteName, NCases, NFail, NExpected, NSucc, NUsrSkip, NAutoSkip, NActualSkip, NActualFail, NActualSucc, Config) -> + WorkDir = proplists:get_value(work_dir, Config), ct:log("<a href=\"file://~s\">Test case log files</a>\n", - [filename:join([proplists:get_value(priv_dir, Config), - SuiteName++".logs"])]), + [filename:join(WorkDir, SuiteName++".logs")]), Node = proplists:get_value(node, Config), {ok,_Pid} = rpc:call(Node,test_server_ctrl, start, []), @@ -140,8 +140,8 @@ run_test_server_tests(SuiteName, NCases, NFail, NExpected, NSucc, {ok,Data} = test_server_test_lib:parse_suite( hd(filelib:wildcard( - filename:join([proplists:get_value(priv_dir, Config), - SuiteName++".logs","run*","suite.log"])))), + filename:join([WorkDir,SuiteName++".logs", + "run*","suite.log"])))), check([{"Number of cases",NCases,Data#suite.n_cases}, {"Number failed",NFail,Data#suite.n_cases_failed}, {"Number expected",NExpected,Data#suite.n_cases_expected}, diff --git a/lib/test_server/test/test_server_test_lib.erl b/lib/test_server/test/test_server_test_lib.erl index 5ca24f3df7..8a808c5360 100644 --- a/lib/test_server/test/test_server_test_lib.erl +++ b/lib/test_server/test/test_server_test_lib.erl @@ -54,9 +54,13 @@ start_slave(Config,_Level) -> ok end, DataDir = proplists:get_value(data_dir, Config), - PrivDir = proplists:get_value(priv_dir, Config), + %% We would normally use priv_dir for temporary data, + %% but the pathnames gets too long on Windows. + %% Until the run-time system can support long pathnames, + %% use the data dir. + WorkDir = DataDir, - %% PrivDir as well as directory of Test Server suites + %% WorkDir as well as directory of Test Server suites %% have to be in code path on Test Server node. [_ | Parts] = lists:reverse(filename:split(DataDir)), TSDir = filename:join(lists:reverse(Parts)), @@ -64,7 +68,7 @@ start_slave(Config,_Level) -> undefined -> []; Ds -> Ds end, - PathDirs = [PrivDir,TSDir | AddPathDirs], + PathDirs = [WorkDir,TSDir | AddPathDirs], [true = rpc:call(Node, code, add_patha, [D]) || D <- PathDirs], io:format("Dirs added to code path (on ~w):~n", [Node]), @@ -73,8 +77,8 @@ start_slave(Config,_Level) -> true = rpc:call(Node, os, putenv, ["TEST_SERVER_FRAMEWORK", "undefined"]), - ok = rpc:call(Node, file, set_cwd, [PrivDir]), - [{node,Node} | Config] + ok = rpc:call(Node, file, set_cwd, [WorkDir]), + [{node,Node}, {work_dir,WorkDir} | Config] end. post_end_per_testcase(_TC, Config, Return, State) -> |