File 5611-megaco-test-Skip-Virtual-Windows.patch of Package erlang
From 50e0d86bc17dce271f1a49b66e178ee96184ed00 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Mon, 6 Apr 2020 10:51:05 +0200
Subject: [PATCH 1/8] [megaco|test] Skip Virtual Windows
We have a Virtual Windows that causes random failures.
Skip to avoid the noice.
---
lib/megaco/test/megaco_test_lib.erl | 33 +++++++++++++--------------------
1 file changed, 13 insertions(+), 20 deletions(-)
diff --git a/lib/megaco/test/megaco_test_lib.erl b/lib/megaco/test/megaco_test_lib.erl
index d73ed45add..d35cfb221e 100644
--- a/lib/megaco/test/megaco_test_lib.erl
+++ b/lib/megaco/test/megaco_test_lib.erl
@@ -478,28 +478,21 @@ init_per_suite(Config) ->
%% This version is *not* ok: Skip
true
end,
- %% We are "looking" for a specific machine (a VM)
- %% which are *old and crappy" and slow, because it
- %% causes a bunch of test cases to fail randomly.
- %% But we don not want to test for the host name...
- %% WinVersionVerify =
- %% fun(V) when (V =:= {6,2,9200}) ->
- %% try erlang:system_info(schedulers) of
- %% 2 ->
- %% true;
- %% _ ->
- %% false
- %% catch
- %% _:_:_ ->
- %% true
- %% end;
- %% (_) ->
- %% false
- %% end,
+ SkipWindowsOnVirtual =
+ fun() ->
+ SysInfo = which_win_system_info(),
+ SysMan = win_sys_info_lookup(system_manufacturer, SysInfo),
+ case string:to_lower(SysMan) of
+ "vmware" ++ _ ->
+ true;
+ _ ->
+ false
+ end
+ end,
COND = [
{unix, [{linux, LinuxVersionVerify},
{darwin, DarwinVersionVerify}]},
- {win32, [{nt, WinVersionVerify}]}
+ {win32, SkipWindowsOnVirtual}
],
case os_based_skip(COND) of
true ->
--
2.16.4