Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Disable crashing tests on Apple Silicon #79

Merged
merged 2 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/test_advancedcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setup_class(cls):
import cppyy
cls.advanced = cppyy.load_reflection_info(cls.test_dct)

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test01_default_arguments(self):
"""Test usage of default arguments"""

Expand Down Expand Up @@ -683,7 +683,7 @@ def test19_comparator(self):
assert a.__eq__(a) == False
assert b.__eq__(b) == False

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test20_overload_order_with_proper_return(self):
"""Test return type against proper overload w/ const and covariance"""

Expand Down
6 changes: 3 additions & 3 deletions test/test_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import ispypy, IS_MAC_X86
from .support import ispypy, IS_MAC_X86, IS_MAC_ARM


class TestAPI:
Expand Down Expand Up @@ -35,7 +35,7 @@ class APICheck {
assert API.Overload_Check(m)
assert API.Overload_CheckExact(m)

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test02_interpreter_access(self):
"""Access to the python interpreter"""

Expand All @@ -44,7 +44,7 @@ def test02_interpreter_access(self):

assert API.Exec('import sys')

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test03_instance_conversion(self):
"""Proxy object conversions"""

Expand Down
13 changes: 7 additions & 6 deletions test/test_crossinheritance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""

Expand Down Expand Up @@ -507,7 +508,7 @@ def __init__(self):
assert m.get_data() == 42
assert m.get_data_v() == 42

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test15_object_returns(self):
"""Return of C++ objects from overridden functions"""

Expand Down Expand Up @@ -575,7 +576,7 @@ def whoami(self):
assert not not new_obj
assert new_obj.whoami() == "PyDerived4"

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test16_cctor_access_controlled(self):
"""Python derived class of C++ class with access controlled cctor"""

Expand Down Expand Up @@ -617,7 +618,7 @@ def whoami(self):
obj = PyDerived()
assert ns.callit(obj) == "PyDerived"

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test17_deep_hierarchy(self):
"""Test a deep Python hierarchy with pure virtual functions"""

Expand Down Expand Up @@ -664,7 +665,7 @@ def whoami(self):
assert obj.whoami() == "PyDerived4"
assert ns.callit(obj) == "PyDerived4"

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test18_abstract_hierarchy(self):
"""Hierarchy with abstract classes"""

Expand Down Expand Up @@ -997,7 +998,7 @@ def verify(a, n1, n2, n3):
a = MyPyDerived(27, 55, nArgs=2)
verify(a, 27, 55, 67)

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test23_const_byvalue_return(self):
"""Const by-value return in overridden method"""

Expand Down Expand Up @@ -1241,7 +1242,7 @@ class MyPyDerived(ns.Derived):
assert obj.calc2() == 2
assert ns.callback2(obj) == 2

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test28_cross_deep(self):
"""Deep inheritance hierarchy"""

Expand Down
8 changes: 4 additions & 4 deletions test/test_datatypes.py
Original file line number Diff line number Diff line change
@@ -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"))
Expand Down Expand Up @@ -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"""

Expand Down Expand Up @@ -1483,7 +1483,7 @@ def pyd(arg0, arg1):
gc.collect()
raises(TypeError, c, 3, 3) # lambda gone out of scope

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test29_std_function_life_lines(self):
"""Life lines to std::function data members"""

Expand Down Expand Up @@ -2211,7 +2211,7 @@ def test44_buffer_memory_handling(self):
assert buf1.data1[i] == 1.*i
assert buf1.data2[i] == 2.*i

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test45_const_ref_data(self):
"""Proper indirection for addressing const-ref data"""

Expand Down
12 changes: 6 additions & 6 deletions test/test_doc_features.py
Original file line number Diff line number Diff line change
@@ -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"))
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"""

Expand Down Expand Up @@ -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"""

Expand Down Expand Up @@ -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"""

Expand All @@ -1269,7 +1269,7 @@ class MyException : public std::exception {
with raises(CC.MyException):
CC.throw_error()

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test_unicode(self):
"""Unicode non-UTF-8 example"""

Expand Down
12 changes: 6 additions & 6 deletions test/test_overloads.py
Original file line number Diff line number Diff line change
@@ -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"))
Expand Down Expand Up @@ -70,7 +70,7 @@ def test02_class_based_overloads_explicit_resolution(self):
nb = ns_a_overload.b_overload()
raises(TypeError, nb.f, c_overload())

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test03_fragile_class_based_overloads(self):
"""Test functions overloaded on void* and non-existing classes"""

Expand All @@ -91,7 +91,7 @@ def test03_fragile_class_based_overloads(self):
dd = cppyy.gbl.get_dd_ol()
assert more_overloads().call(dd ) == "dd_ol"

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test04_fully_fragile_overloads(self):
"""Test that unknown* is preferred over unknown&"""

Expand Down Expand Up @@ -121,7 +121,7 @@ def test05_array_overloads(self):
assert c_overload().get_int(ah) == 25
assert d_overload().get_int(ah) == 25

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test06_double_int_overloads(self):
"""Test overloads on int/doubles"""

Expand All @@ -146,7 +146,7 @@ def test07_mean_overloads(self):
a = array.array(l, numbers)
assert round(cmean(len(a), a) - mean, 8) == 0

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test08_const_non_const_overloads(self):
"""Check selectability of const/non-const overloads"""

Expand Down Expand Up @@ -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"""

Expand Down
4 changes: 2 additions & 2 deletions test/test_pythonization.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, mark
from .support import setup_make, pylong, IS_MAC_X86
from .support import setup_make, pylong, IS_MAC_X86, IS_MAC_ARM

currpath = py.path.local(__file__).dirpath()
test_dct = str(currpath.join("pythonizablesDict"))
Expand Down Expand Up @@ -230,7 +230,7 @@ def test08_base_class_pythonization(self):
# associative container, with 'index' a key, not a counter
#raises(IndexError, d.__getitem__, 1)

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test09_cpp_side_pythonization(self):
"""Use of C++ side pythonizations"""

Expand Down
8 changes: 4 additions & 4 deletions test/test_regression.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import setup_make, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86
from .support import setup_make, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM


class TestREGRESSION:
Expand Down Expand Up @@ -271,7 +271,7 @@ def test12_exception_while_exception(self):
except AttributeError:
pass

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test13_char_star_over_char(self):
"""Map str to const char* over char"""

Expand Down Expand Up @@ -489,7 +489,7 @@ def test18_operator_plus_overloads(self):
assert type(a+b) == cppyy.gbl.std.string
assert a+b == 'ab'

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test19_std_string_hash(self):
"""Hashing of std::string"""

Expand Down Expand Up @@ -524,7 +524,7 @@ class SignedCharRefGetter {

assert obj.getter() == 'c'

@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
def test21_temporaries_and_vector(self):
"""Extend a life line to references into a vector if needed"""

Expand Down
Loading
Loading