File 0528-megaco-test-Add-a-skip-clause-for-another-linux-vers.patch of Package erlang

From 3417575e70707d8b0c5abab103306096a5f8eec8 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Wed, 12 May 2021 10:00:01 +0200
Subject: [PATCH 2/2] [megaco|test] Add a skip clause for another linux version

We get random failures in the timer suite on some *old* VMs.
So add a general skip (easier than special handle this specific
suite).
---
 lib/megaco/test/megaco_test_lib.erl | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/megaco/test/megaco_test_lib.erl b/lib/megaco/test/megaco_test_lib.erl
index a04b27a061..10e7ed90c8 100644
--- a/lib/megaco/test/megaco_test_lib.erl
+++ b/lib/megaco/test/megaco_test_lib.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %% 
-%% Copyright Ericsson AB 1999-2020. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2021. All Rights Reserved.
 %% 
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -524,6 +524,16 @@ maybe_skip(_HostInfo) ->
                     _ ->
                         false
                 end;
+           (V) when (V =:= {2,6,16}) ->
+                case string:trim(os:cmd("cat /etc/issue")) of
+                    %% Stone age SLES => Skip
+                    %% We have atleast one VM that has this version,
+                    %% and it causes randome timeout glitches...
+                    "Welcome to SUSE Linux Enterprise Server 10 SP1 " ++ _ ->
+                        true;
+                    _ ->
+                        false
+                end;
            (V) when (V =:= {2,6,10}) ->
                 case string:trim(os:cmd("cat /etc/issue")) of
                     "MontaVista" ++ _ -> % Stone age MontaVista => Skip
-- 
2.26.2

openSUSE Build Service is sponsored by