aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-07-11 11:46:49 +0200
committerSiri Hansen <[email protected]>2016-07-11 11:46:49 +0200
commit5e4c7b91c930552a2c121298672ab492a62f9afd (patch)
treee3c2ce4ced32d0f7acf7d1a4fc759e3fe1a7292f /lib
parent8ae4ab7c4839a19b1b2e8fc28087c0471d8dbd87 (diff)
parent359c0244d4389b6316549ae269978d3e48185a8a (diff)
downloadotp-5e4c7b91c930552a2c121298672ab492a62f9afd.tar.gz
otp-5e4c7b91c930552a2c121298672ab492a62f9afd.tar.bz2
otp-5e4c7b91c930552a2c121298672ab492a62f9afd.zip
Merge branch 'siri/cuddle-master'
* siri/cuddle-master: Make crashdump_viewer_SUITE independent of OTP version
Diffstat (limited to 'lib')
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl29
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," "]).