From 2b984e4ff1282ac5acd50b78ad51b5ec90e55368 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 3 Jun 2014 15:17:37 +0200 Subject: Force CT log cache to rescan entries with incomplete results --- lib/common_test/src/ct_logs.erl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl index a4ad65c0a4..7305328e92 100644 --- a/lib/common_test/src/ct_logs.erl +++ b/lib/common_test/src/ct_logs.erl @@ -1842,14 +1842,27 @@ dir_diff_all_runs(LogDirs=[Dir|Dirs], Cached=[CElem|CElems], LatestInCache, AllRunsDirs) -> DirDate = datestr_from_dirname(Dir), if DirDate > LatestInCache -> - %% Dir is a new run entry + %% Dir is a new run entry (not cached) dir_diff_all_runs(Dirs, Cached, LatestInCache, [Dir|AllRunsDirs]); DirDate == LatestInCache, CElems /= [] -> - %% Dir is an existing run entry + %% Dir is an existing (cached) run entry + + %% Only add the cached element instead of Dir if the totals + %% are "non-empty" (a test might be executing on a different + %% node and results haven't been saved yet) + ElemToAdd = + case CElem of + {_CDir,{_NodeStr,_Label,_Logs,{0,0,0,0,0}},_IxLink} -> + %% "empty" element in cache - this could be an + %% incomplete test and should be checked again + Dir; + _ -> + CElem + end, dir_diff_all_runs(Dirs, CElems, datestr_from_dirname(element(1,hd(CElems))), - [CElem|AllRunsDirs]); + [ElemToAdd|AllRunsDirs]); DirDate == LatestInCache, CElems == [] -> %% we're done, Dirs must all be new lists:reverse(Dirs)++[CElem|AllRunsDirs]; -- cgit v1.2.3 From 499915f267e3d521905eb8edd0b602d9ffd73022 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 3 Jun 2014 16:35:36 +0200 Subject: Fix problem with mismatching html tags when running basic_html log mode --- lib/common_test/src/ct_logs.erl | 10 ++++++---- lib/test_server/src/test_server_ctrl.erl | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl index a4ad65c0a4..6fc8f9f3b9 100644 --- a/lib/common_test/src/ct_logs.erl +++ b/lib/common_test/src/ct_logs.erl @@ -1304,7 +1304,8 @@ total_row(Success, Fail, UserSkip, AutoSkip, NotBuilt, All) -> "",integer_to_list(AllSkip), " (",UserSkipStr,"/",AutoSkipStr,")\n", "",integer_to_list(NotBuilt),"\n", - AllInfo, "\n\n"]. + AllInfo, "\n", + xhtml("","\n")]. not_built(_BaseName,_LogDir,_All,[]) -> 0; @@ -1519,7 +1520,8 @@ all_suites_index_footer() -> xhtml("

\n", "

\n") | footer()]. all_runs_index_footer() -> - ["\n\n", + [xhtml("", "\n"), + "\n", "\n", xhtml("

\n", "

\n") | footer()]. @@ -1676,7 +1678,7 @@ config_table(Vars) -> config_table_header() -> [ xhtml(["

Configuration

\n" - "\n"], ["

CONFIGURATION

\n", "
\n", "\n"]), @@ -1692,7 +1694,7 @@ config_table1([{Key,Value}|Vars]) -> "\n\n"]) | config_table1(Vars)]; config_table1([]) -> - ["\n
", io_lib:format("~p",[Value]), "
\n"]. + [xhtml("","\n"),"\n"]. make_all_runs_index(When) -> diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl index 5fbc47a813..65aa65af37 100644 --- a/lib/test_server/src/test_server_ctrl.erl +++ b/lib/test_server/src/test_server_ctrl.erl @@ -1578,7 +1578,8 @@ do_test_cases(TopCases, SkipCases, [?suitelog_name,?coverlog_name,?unexpected_io_log]), print(html, "

~ts

\n" ++ - xhtml("", + xhtml(["
\n", + "\n"], ["
\n", "\n"]) ++ "" ++ -- cgit v1.2.3
NumModuleGroup