aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2015-03-18 10:59:01 +0100
committerPeter Andersson <[email protected]>2015-03-18 10:59:01 +0100
commit75c65bd7f4892f308657fdca9f3add79d0c05783 (patch)
tree490abb33786234052b9ed010eb6b7f17d95582d1 /lib
parent09d3fe862a7aea715029b88237f0390296eb294a (diff)
parent4e61b42c83984db3da78ff50a4e9f27518fa0110 (diff)
downloadotp-75c65bd7f4892f308657fdca9f3add79d0c05783.tar.gz
otp-75c65bd7f4892f308657fdca9f3add79d0c05783.tar.bz2
otp-75c65bd7f4892f308657fdca9f3add79d0c05783.zip
Merge remote-tracking branch 'origin/peppe/common_test/log_cache_problem' into maint
* origin/peppe/common_test/log_cache_problem: Fix problem with directories not listed in expected order OTP-11400
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/src/ct_logs.erl14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index 23332ad268..dc118ed149 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -1905,6 +1905,17 @@ sort_all_runs(Dirs) ->
{Date1,HH1,MM1,SS1} > {Date2,HH2,MM2,SS2}
end, Dirs).
+sort_ct_runs(Dirs) ->
+ %% Directory naming: <Prefix>.NodeName.Date_Time[/...]
+ %% Sort on Date_Time string: "YYYY-MM-DD_HH.MM.SS"
+ lists:sort(fun(Dir1,Dir2) ->
+ [_Prefix,_Node1,DateHH1,MM1,SS1] =
+ string:tokens(filename:dirname(Dir1),[$.]),
+ [_Prefix,_Node2,DateHH2,MM2,SS2] =
+ string:tokens(filename:dirname(Dir2),[$.]),
+ {DateHH1,MM1,SS1} =< {DateHH2,MM2,SS2}
+ end, Dirs).
+
dir_diff_all_runs(Dirs, LogCache) ->
case LogCache#log_cache.all_runs of
[] ->
@@ -2217,7 +2228,8 @@ make_all_suites_index(When) when is_atom(When) ->
end
end,
- LogDirs = filelib:wildcard(logdir_prefix()++".*/*"++?logdir_ext),
+ Wildcard = logdir_prefix()++".*/*"++?logdir_ext,
+ LogDirs = sort_ct_runs(filelib:wildcard(Wildcard)),
LogCacheInfo = get_cache_data(UseCache),