aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2015-05-06 10:46:16 +0200
committerErlang/OTP <[email protected]>2015-05-06 10:46:16 +0200
commit3cbf90061405a1b002bb91e801a3e37c754f5060 (patch)
treec6b3a5a567fedb528037db80a7f9e32602a00d24 /lib
parent22aad3743a87289a0ff4bd1caefc5d1fd264967b (diff)
parentcb0f971faaf04fc0270f51e688e84b8279c33afb (diff)
downloadotp-3cbf90061405a1b002bb91e801a3e37c754f5060.tar.gz
otp-3cbf90061405a1b002bb91e801a3e37c754f5060.tar.bz2
otp-3cbf90061405a1b002bb91e801a3e37c754f5060.zip
Merge branch 'peppe/common_test/longname_problem.maint' into maint-17
* peppe/common_test/longname_problem.maint: 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 dc118ed149..fa55a9754e 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -1908,13 +1908,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