From 162db37f1e90899c6d28c8e806e3d8eccbee9e6d Mon Sep 17 00:00:00 2001
From: Peter Andersson
Date: Wed, 19 Apr 2017 15:11:16 +0200
Subject: Show links to latest test run by using an html redirection file
---
lib/common_test/src/ct_logs.erl | 16 +++++++++++----
lib/common_test/src/test_server_ctrl.erl | 35 ++++++++++++++++++++++++++++----
2 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index ba7660fe6a..81b5bad2bc 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -3144,8 +3144,8 @@ locate_priv_file(FileName) ->
filename:join(get(ct_run_dir), FileName);
_ ->
%% executed on other process than ct_logs
- {ok,RunDir} = get_log_dir(true),
- filename:join(RunDir, FileName)
+ {ok,LogDir} = get_log_dir(true),
+ filename:join(LogDir, FileName)
end,
case filelib:is_file(PrivResultFile) of
true ->
@@ -3227,6 +3227,10 @@ get_ts_html_wrapper(TestName, Logdir, PrintLabel, Cwd, TableCols, Encoding) ->
?all_runs_name), Cwd),
TestIndex = make_relative(filename:join(filename:dirname(CtLogdir),
?index_name), Cwd),
+ LatestTest = make_relative(filename:join(filename:dirname(CtLogdir),
+ ?suitelog_name++".latest.html"),
+ Cwd),
+
case Basic of
true ->
TileFile = filename:join(filename:join(CTPath,"priv"),"tile1.jpg"),
@@ -3253,7 +3257,9 @@ get_ts_html_wrapper(TestName, Logdir, PrintLabel, Cwd, TableCols, Encoding) ->
"Test run history\n | ",
"Top level test index\n\n
\n",
+ "\">Top level test index\n | ",
+ "Latest test result\n\n",
Copyright,"\n