File 2441-snmp-test-Did-not-catch-skip-throw.patch of Package erlang

From acc7ad3da952960a086c956e5891f2dd44a5ab87 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Mon, 4 May 2020 06:57:43 +0200
Subject: [PATCH 1/3] [snmp|test] Did not catch skip throw

---
 lib/snmp/test/snmp_test_lib.erl | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/lib/snmp/test/snmp_test_lib.erl b/lib/snmp/test/snmp_test_lib.erl
index 1d3e66a901..40aa71d630 100644
--- a/lib/snmp/test/snmp_test_lib.erl
+++ b/lib/snmp/test/snmp_test_lib.erl
@@ -695,13 +695,22 @@ init_per_suite(Config) ->
     COND = [{unix,  [{linux, LinuxVersionVerify}, 
                      {darwin, DarwinVersionVerify}]},
             {win32, SkipWindowsOnVirtual}],
-    case os_based_skip(COND) of
+    try os_based_skip(COND) of
         true ->
             {skip, "Unstable host and/or os (or combo thererof)"};
         false ->
-            Factor = analyze_and_print_host_info(),
-            snmp_test_global_sys_monitor:start(),
-            [{snmp_factor, Factor} | Config]
+            %% Factor = analyze_and_print_host_info(),
+            try analyze_and_print_host_info() of
+                Factor ->
+                    snmp_test_global_sys_monitor:start(),
+                    [{snmp_factor, Factor} | Config]
+            catch
+                throw:{skip, _} = SKIP ->
+                    SKIP
+            end
+    catch
+        throw:{skip, _} = SKIP ->
+            SKIP
     end.
 
 
-- 
2.26.1

openSUSE Build Service is sponsored by