diff options
author | Peter Andersson <[email protected]> | 2015-04-13 16:42:49 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2015-04-13 16:42:49 +0200 |
commit | 85db2e1824dddec9e070af34e5f365cced54aff1 (patch) | |
tree | 600e7e2b77c08ced19a5f4671746a1ca1439c077 /lib/common_test/src/ct_logs.erl | |
parent | 6e3e48d39a77aa18b92fb048d6a910baa71badf3 (diff) | |
parent | 8a23259a81563e3b35966ecd19f8e63272e579a4 (diff) | |
download | otp-85db2e1824dddec9e070af34e5f365cced54aff1.tar.gz otp-85db2e1824dddec9e070af34e5f365cced54aff1.tar.bz2 otp-85db2e1824dddec9e070af34e5f365cced54aff1.zip |
Merge remote-tracking branch 'origin/peppe/common_test/longname_problem'
* origin/peppe/common_test/longname_problem:
Fix error in ct_logs, not handling long names correctly
OTP-12643
Diffstat (limited to 'lib/common_test/src/ct_logs.erl')
-rw-r--r-- | lib/common_test/src/ct_logs.erl | 15 |
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 |