aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-06-16 14:48:33 +0200
committerPeter Andersson <[email protected]>2014-06-16 14:54:14 +0200
commit2f1b2e8e946e28f9b18b3abd136913a9a2cbe447 (patch)
treef39554fd5ec5d5aece049473722d6e25c4d1a281 /lib
parenta432f076a6e4a515f1aaf8b786367d5a62ce416a (diff)
parent2b984e4ff1282ac5acd50b78ad51b5ec90e55368 (diff)
downloadotp-2f1b2e8e946e28f9b18b3abd136913a9a2cbe447.tar.gz
otp-2f1b2e8e946e28f9b18b3abd136913a9a2cbe447.tar.bz2
otp-2f1b2e8e946e28f9b18b3abd136913a9a2cbe447.zip
Merge branch 'peppe/common_test/ct_log_cache_error' into maint
* peppe/common_test/ct_log_cache_error: Force CT log cache to rescan entries with incomplete results OTP-11988
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/src/ct_logs.erl19
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index 32c8773ca5..e29c01a694 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -1856,14 +1856,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];