From 2e81018e64bdd3d78077623381bd95b20696a956 Mon Sep 17 00:00:00 2001 From: maximusron Date: Sat, 4 May 2024 16:02:26 +0200 Subject: [PATCH] [ci] Disable crashing tests on Apple Silicon --- test/test_crossinheritance.py | 1 + test/test_datatypes.py | 4 ++-- test/test_doc_features.py | 10 +++++----- test/test_overloads.py | 4 ++-- test/test_stltypes.py | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/test/test_crossinheritance.py b/test/test_crossinheritance.py index 8e3e443..97c6145 100644 --- a/test/test_crossinheritance.py +++ b/test/test_crossinheritance.py @@ -273,6 +273,7 @@ def sum_value(self, val): assert 'ValueError' in res assert os.path.basename(__file__) in res + @mark.xfail(run=not IS_MAC_ARM, condition=IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon") def test09_interface_checking(self): """Conversion errors should be Python exceptions""" diff --git a/test/test_datatypes.py b/test/test_datatypes.py index 9d3e388..ed798b4 100644 --- a/test/test_datatypes.py +++ b/test/test_datatypes.py @@ -1,6 +1,6 @@ import py, os, sys from pytest import raises, skip, mark -from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86 +from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM currpath = py.path.local(__file__).dirpath() test_dct = str(currpath.join("datatypesDict")) @@ -1410,7 +1410,7 @@ def pyd(arg0, arg1): gc.collect() raises(TypeError, c, 3, 3) # lambda gone out of scope - @mark.xfail + @mark.xfail(run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon") def test28_callable_through_function_passing(self): """Passing callables through std::function""" diff --git a/test/test_doc_features.py b/test/test_doc_features.py index 6a9d773..8edb8de 100644 --- a/test/test_doc_features.py +++ b/test/test_doc_features.py @@ -1,6 +1,6 @@ import py, os, sys from pytest import raises, skip, mark -from .support import setup_make, ispypy, IS_WINDOWS, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86 +from .support import setup_make, ispypy, IS_WINDOWS, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM currpath = py.path.local(__file__).dirpath() test_dct = str(currpath.join("doc_helperDict")) @@ -387,7 +387,7 @@ def test_unary_operators(sef): pass - @mark.xfail + @mark.xfail(run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon") def test_x_inheritance(self): import cppyy from cppyy.gbl import Abstract, Concrete, call_abstract_method @@ -453,7 +453,7 @@ def abstract_method2(self): assert cppyy.gbl.call_abstract_method1(pc) == "first message" assert cppyy.gbl.call_abstract_method2(pc) == "second message" - @mark.xfail + @mark.xfail(run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon") def test_exceptions(self): """Exception throwing and catching""" @@ -1125,7 +1125,7 @@ def add(self, i): m = PyMyClass(1) assert CC.callb(m, 2) == 5 - @mark.xfail(condition=IS_CLANG_REPL, reason="Fails with ClangRepl") + @mark.xfail(run=not IS_MAC_ARM, condition=IS_CLANG_REPL, reason="Fails with ClangRepl, Crashes on OS X arm") def test_cross_and_templates(self): """Template instantiation with cross-inheritance example""" @@ -1244,7 +1244,7 @@ def test_autocast_and_identiy(self): assert type(b) == CC.Derived assert d is b - @mark.xfail + @mark.xfail(run=not IS_MAC_ARM, reason="Seg Faults") def test_exceptions(self): """Exceptions example""" diff --git a/test/test_overloads.py b/test/test_overloads.py index 2b0936a..58c0e6c 100644 --- a/test/test_overloads.py +++ b/test/test_overloads.py @@ -1,6 +1,6 @@ import py, os, sys from pytest import raises, skip, mark -from .support import setup_make, ispypy, IS_WINDOWS, IS_MAC_X86 +from .support import setup_make, ispypy, IS_WINDOWS, IS_MAC_X86, IS_MAC_ARM currpath = py.path.local(__file__).dirpath() test_dct = str(currpath.join("overloadsDict")) @@ -206,7 +206,7 @@ def test09_bool_int_overloads(self): with raises(ValueError): cpp.BoolInt4.fff(2) - @mark.xfail + @mark.xfail(run=not IS_MAC_ARM, reason="Seg Faults") def test10_overload_and_exceptions(self): """Prioritize reporting C++ exceptions from callee""" diff --git a/test/test_stltypes.py b/test/test_stltypes.py index 0857506..49a1b08 100644 --- a/test/test_stltypes.py +++ b/test/test_stltypes.py @@ -2028,7 +2028,7 @@ def run_raiseit(t1, t2): gc.collect() assert cppyy.gbl.GetMyErrorCount() == 0 - @mark.xfail + @mark.xfail(run=not IS_MAC_ARM, reason="Seg Faults") def test04_from_cpp(self): """Catch C++ exceptiosn from C++"""