LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File otp_src_20.2-lib-common_test-ct_logs.patch of Package erlang (Project home:Ledest:erlang:20)

diff -Ndurp otp_src_20.2/lib/common_test/src/ct_logs.erl otp_src_20.2-lib-common_test-ct_logs/lib/common_test/src/ct_logs.erl
--- otp_src_20.2/lib/common_test/src/ct_logs.erl	2017-12-08 11:57:52.000000000 +0200
+++ otp_src_20.2-lib-common_test-ct_logs/lib/common_test/src/ct_logs.erl	2017-12-13 21:17:26.390570412 +0200
@@ -216,16 +216,24 @@ clear_stylesheet(TC) ->
 %%%-----------------------------------------------------------------
 %%% @spec get_log_dir() -> {ok,Dir} | {error,Reason}
 get_log_dir() ->
-    get_log_dir(false).
+    case call({get_log_dir,false}) of
+	{error,does_not_exist} ->
+	    {ok,"."};
+	Result ->
+	    Result
+    end.
 
 %%%-----------------------------------------------------------------
 %%% @spec get_log_dir(ReturnAbsName) -> {ok,Dir} | {error,Reason}
-get_log_dir(ReturnAbsName) ->
-    case call({get_log_dir,ReturnAbsName}) of
-	{error,does_not_exist} when ReturnAbsName == true ->
-	    {ok,filename:absname(".")};
+get_log_dir(true) ->
+    get_log_dir_abs();
+get_log_dir(false) ->
+    get_log_dir().
+
+get_log_dir_abs() ->
+    case call({get_log_dir,true}) of
 	{error,does_not_exist} ->
-	    {ok,"."};
+	    {ok,filename:absname(".")};
 	Result ->
 	    Result
     end.
@@ -3148,7 +3156,7 @@ locate_priv_file(FileName) ->
 			filename:join(get(ct_run_dir), FileName);
 		    _ ->			
 			%% executed on other process than ct_logs
-			{ok,LogDir} = get_log_dir(true),
+			{ok,LogDir} = get_log_dir_abs(),
 			filename:join(LogDir, FileName)
 		end,
 	    case filelib:is_file(PrivResultFile) of
@@ -3223,7 +3231,7 @@ get_ts_html_wrapper(TestName, Logdir, Pr
     CTPath = code:lib_dir(common_test),
 
     {ok,CtLogdir} =
-	if Logdir == undefined -> get_log_dir(true);
+	if Logdir == undefined -> get_log_dir_abs();
 	   true -> {ok,Logdir}
 	end,