diff options
author | Peter Andersson <[email protected]> | 2015-03-18 11:00:05 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2015-03-18 11:00:05 +0100 |
commit | 432dff6c5f5a82ffc9613a409d8d3c4ba731dc56 (patch) | |
tree | 16d960b0b0cf73fcfb00849f91f19b591ecb79e6 | |
parent | efe02cfb0ec2c44b5fc076787cc8ab40ea83c2b3 (diff) | |
parent | 75c65bd7f4892f308657fdca9f3add79d0c05783 (diff) | |
download | otp-432dff6c5f5a82ffc9613a409d8d3c4ba731dc56.tar.gz otp-432dff6c5f5a82ffc9613a409d8d3c4ba731dc56.tar.bz2 otp-432dff6c5f5a82ffc9613a409d8d3c4ba731dc56.zip |
Merge branch 'maint'
-rw-r--r-- | lib/common_test/src/ct_logs.erl | 14 |
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), |