Skip to content

Commit d0f72e7

Browse files
authored
[ci] Disable crashing tests on Apple Silicon (#79)
* [ci] Disable crashing tests on Apple Silicon * [ci] Extend fail tags for OS X x86 to arm
1 parent bc5cd0e commit d0f72e7

File tree

9 files changed

+46
-45
lines changed

9 files changed

+46
-45
lines changed

test/test_advancedcpp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def setup_class(cls):
1616
import cppyy
1717
cls.advanced = cppyy.load_reflection_info(cls.test_dct)
1818

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

@@ -683,7 +683,7 @@ def test19_comparator(self):
683683
assert a.__eq__(a) == False
684684
assert b.__eq__(b) == False
685685

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

test/test_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import ispypy, IS_MAC_X86
3+
from .support import ispypy, IS_MAC_X86, IS_MAC_ARM
44

55

66
class TestAPI:
@@ -35,7 +35,7 @@ class APICheck {
3535
assert API.Overload_Check(m)
3636
assert API.Overload_CheckExact(m)
3737

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

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

4545
assert API.Exec('import sys')
4646

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

test/test_crossinheritance.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ def sum_value(self, val):
273273
assert 'ValueError' in res
274274
assert os.path.basename(__file__) in res
275275

276+
@mark.xfail(run=not IS_MAC_ARM, condition=IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon")
276277
def test09_interface_checking(self):
277278
"""Conversion errors should be Python exceptions"""
278279

@@ -507,7 +508,7 @@ def __init__(self):
507508
assert m.get_data() == 42
508509
assert m.get_data_v() == 42
509510

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

@@ -575,7 +576,7 @@ def whoami(self):
575576
assert not not new_obj
576577
assert new_obj.whoami() == "PyDerived4"
577578

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

@@ -617,7 +618,7 @@ def whoami(self):
617618
obj = PyDerived()
618619
assert ns.callit(obj) == "PyDerived"
619620

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

@@ -664,7 +665,7 @@ def whoami(self):
664665
assert obj.whoami() == "PyDerived4"
665666
assert ns.callit(obj) == "PyDerived4"
666667

667-
@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
668+
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
668669
def test18_abstract_hierarchy(self):
669670
"""Hierarchy with abstract classes"""
670671

@@ -997,7 +998,7 @@ def verify(a, n1, n2, n3):
997998
a = MyPyDerived(27, 55, nArgs=2)
998999
verify(a, 27, 55, 67)
9991000

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

@@ -1241,7 +1242,7 @@ class MyPyDerived(ns.Derived):
12411242
assert obj.calc2() == 2
12421243
assert ns.callback2(obj) == 2
12431244

1244-
@mark.xfail(condition=IS_MAC_X86, reason="Fails on OS X x86")
1245+
@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
12451246
def test28_cross_deep(self):
12461247
"""Deep inheritance hierarchy"""
12471248

test/test_datatypes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86
3+
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("datatypesDict"))
@@ -1410,7 +1410,7 @@ def pyd(arg0, arg1):
14101410
gc.collect()
14111411
raises(TypeError, c, 3, 3) # lambda gone out of scope
14121412

1413-
@mark.xfail
1413+
@mark.xfail(run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon")
14141414
def test28_callable_through_function_passing(self):
14151415
"""Passing callables through std::function"""
14161416

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

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

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

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

test/test_doc_features.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, ispypy, IS_WINDOWS, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86
3+
from .support import setup_make, ispypy, IS_WINDOWS, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("doc_helperDict"))
@@ -387,7 +387,7 @@ def test_unary_operators(sef):
387387

388388
pass
389389

390-
@mark.xfail
390+
@mark.xfail(run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon")
391391
def test_x_inheritance(self):
392392
import cppyy
393393
from cppyy.gbl import Abstract, Concrete, call_abstract_method
@@ -453,7 +453,7 @@ def abstract_method2(self):
453453
assert cppyy.gbl.call_abstract_method1(pc) == "first message"
454454
assert cppyy.gbl.call_abstract_method2(pc) == "second message"
455455

456-
@mark.xfail
456+
@mark.xfail(run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon")
457457
def test_exceptions(self):
458458
"""Exception throwing and catching"""
459459

@@ -1125,7 +1125,7 @@ def add(self, i):
11251125
m = PyMyClass(1)
11261126
assert CC.callb(m, 2) == 5
11271127

1128-
@mark.xfail(condition=IS_CLANG_REPL, reason="Fails with ClangRepl")
1128+
@mark.xfail(run=not IS_MAC_ARM, condition=IS_CLANG_REPL, reason="Fails with ClangRepl, Crashes on OS X arm")
11291129
def test_cross_and_templates(self):
11301130
"""Template instantiation with cross-inheritance example"""
11311131

@@ -1244,7 +1244,7 @@ def test_autocast_and_identiy(self):
12441244
assert type(b) == CC.Derived
12451245
assert d is b
12461246

1247-
@mark.xfail
1247+
@mark.xfail(run=not IS_MAC_ARM, reason="Seg Faults")
12481248
def test_exceptions(self):
12491249
"""Exceptions example"""
12501250

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

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

test/test_overloads.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, ispypy, IS_WINDOWS, IS_MAC_X86
3+
from .support import setup_make, ispypy, IS_WINDOWS, IS_MAC_X86, IS_MAC_ARM
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("overloadsDict"))
@@ -70,7 +70,7 @@ def test02_class_based_overloads_explicit_resolution(self):
7070
nb = ns_a_overload.b_overload()
7171
raises(TypeError, nb.f, c_overload())
7272

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

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

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

@@ -121,7 +121,7 @@ def test05_array_overloads(self):
121121
assert c_overload().get_int(ah) == 25
122122
assert d_overload().get_int(ah) == 25
123123

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

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

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

@@ -206,7 +206,7 @@ def test09_bool_int_overloads(self):
206206
with raises(ValueError):
207207
cpp.BoolInt4.fff(2)
208208

209-
@mark.xfail
209+
@mark.xfail(run=not IS_MAC_ARM, reason="Seg Faults")
210210
def test10_overload_and_exceptions(self):
211211
"""Prioritize reporting C++ exceptions from callee"""
212212

test/test_pythonization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, mark
3-
from .support import setup_make, pylong, IS_MAC_X86
3+
from .support import setup_make, pylong, IS_MAC_X86, IS_MAC_ARM
44

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

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

test/test_regression.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86
3+
from .support import setup_make, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM
44

55

66
class TestREGRESSION:
@@ -271,7 +271,7 @@ def test12_exception_while_exception(self):
271271
except AttributeError:
272272
pass
273273

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

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

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

@@ -524,7 +524,7 @@ class SignedCharRefGetter {
524524

525525
assert obj.getter() == 'c'
526526

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

0 commit comments

Comments
 (0)