diff options
author | Siri Hansen <[email protected]> | 2016-06-27 16:09:51 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-06-27 16:09:51 +0200 |
commit | 359c0244d4389b6316549ae269978d3e48185a8a (patch) | |
tree | 5cb2961be114f5dfd6b29a8e5ccab0d70d441c61 | |
parent | fdd99d206f15ce8e088b5c63b84c0e7a9b5b34d5 (diff) | |
download | otp-359c0244d4389b6316549ae269978d3e48185a8a.tar.gz otp-359c0244d4389b6316549ae269978d3e48185a8a.tar.bz2 otp-359c0244d4389b6316549ae269978d3e48185a8a.zip |
Make crashdump_viewer_SUITE independent of OTP version
-rw-r--r-- | lib/observer/test/crashdump_viewer_SUITE.erl | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl index 73ed890802..1947341ebe 100644 --- a/lib/observer/test/crashdump_viewer_SUITE.erl +++ b/lib/observer/test/crashdump_viewer_SUITE.erl @@ -101,7 +101,10 @@ end_per_group(_GroupName, Config) -> init_per_suite(Config) when is_list(Config) -> delete_saved(Config), DataDir = ?config(data_dir,Config), - Rels = [R || R <- ['17','18'], ?t:is_release_available(R)] ++ [current], + CurrVsn = list_to_integer(erlang:system_info(otp_release)), + OldRels = [R || R <- [CurrVsn-2,CurrVsn-1], + ?t:is_release_available(list_to_atom(integer_to_list(R)))], + Rels = OldRels ++ [current], io:format("Creating crash dumps for the following releases: ~p", [Rels]), AllDumps = create_dumps(DataDir,Rels), [{dumps,AllDumps}|Config]. @@ -604,23 +607,17 @@ dos_dump(DataDir,Rel,Dump) -> [] end. +rel_opt(current) -> + []; rel_opt(Rel) -> - case Rel of - '17' -> [{erl,[{release,"17_latest"}]}]; - '18' -> [{erl,[{release,"18_latest"}]}]; - current -> [] - end. + [{erl,[{release,lists:concat([Rel,"_latest"])}]}]. +dump_prefix(current) -> + dump_prefix(erlang:system_info(otp_release)); dump_prefix(Rel) -> - case Rel of - '17' -> "r17_dump."; - '18' -> "r18_dump."; - current -> "r19_dump." - end. + lists:concat(["r",Rel,"_dump."]). +compat_rel(current) -> + ""; compat_rel(Rel) -> - case Rel of - '17' -> "+R17 "; - '18' -> "+R18 "; - current -> "" - end. + lists:concat(["+R",Rel," "]). |