aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2015-04-10 16:12:48 +0200
committerPeter Andersson <[email protected]>2015-04-10 16:12:48 +0200
commit8a23259a81563e3b35966ecd19f8e63272e579a4 (patch)
tree881dd0252bf438277c7a96b516215f24fb8b170f /lib
parentf54392bc3c811d44cef2b31c20cac9fb11bf38e1 (diff)
downloadotp-8a23259a81563e3b35966ecd19f8e63272e579a4.tar.gz
otp-8a23259a81563e3b35966ecd19f8e63272e579a4.tar.bz2
otp-8a23259a81563e3b35966ecd19f8e63272e579a4.zip
Fix error in ct_logs, not handling long names correctly
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/src/ct_logs.erl15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index 12749a8cc4..4d5a75d354 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -1910,13 +1910,14 @@ sort_all_runs(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).
+ lists:sort(
+ fun(Dir1,Dir2) ->
+ [SS1,MM1,DateHH1 | _] =
+ lists:reverse(string:tokens(filename:dirname(Dir1),[$.])),
+ [SS2,MM2,DateHH2 | _] =
+ lists:reverse(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