Skip to content

Commit 8e043c5

Browse files
mcbartonaaronj0
authored andcommitted
Add support for Ubuntu 22.04 arm
1 parent a79035c commit 8e043c5

File tree

8 files changed

+44
-19
lines changed

8 files changed

+44
-19
lines changed

.github/workflows/Ubuntu.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -343,26 +343,26 @@ jobs:
343343
compiler: gcc-12
344344
clang-runtime: '19'
345345
cling: Off
346-
cppyy: Off
347-
- name: ubu22-arm-gcc12-clang-repl-18
346+
cppyy: On
347+
- name: ubu22-arm-gcc12-clang-repl-18-cppyy
348348
os: ubuntu-22.04-arm
349349
compiler: gcc-12
350350
clang-runtime: '18'
351351
cling: Off
352-
cppyy: Off
353-
- name: ubu22-arm-gcc12-clang-repl-17
352+
cppyy: On
353+
- name: ubu22-arm-gcc12-clang-repl-17-cppyy
354354
os: ubuntu-22.04-arm
355355
compiler: gcc-12
356356
clang-runtime: '17'
357357
cling: Off
358-
cppyy: Off
359-
- name: ubu22-arm-gcc9-clang13-cling
358+
cppyy: On
359+
- name: ubu22-arm-gcc9-clang13-cling-cppyy
360360
os: ubuntu-22.04-arm
361361
compiler: gcc-9
362362
clang-runtime: '13'
363363
cling: On
364364
cling-version: '1.0'
365-
cppyy: Off
365+
cppyy: On
366366

367367
steps:
368368
- uses: actions/checkout@v4
@@ -588,7 +588,8 @@ jobs:
588588
# source virtual environment
589589
source ${{ github.workspace }}/CppInterOp/.venv/bin/activate
590590
cd ${{ github.workspace }}
591-
python -m pip install --upgrade . --no-deps
591+
python -m pip install uv
592+
python -m uv pip install --upgrade . --no-deps --verbose
592593
cd ..
593594
594595
- name: Run cppyy
@@ -610,9 +611,9 @@ jobs:
610611
echo ::group::Prepare For Testing
611612
make all
612613
python -m pip install --upgrade pip
613-
python -m pip install pytest
614-
python -m pip install pytest-xdist
615-
python -m pip install numba
614+
python -m uv pip install pytest
615+
python -m uv pip install pytest-xdist
616+
python -m uv pip install numba
616617
echo ::endgroup::
617618
echo ::group::Run complete test suite
618619
set -o pipefail

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
[build-system]
22
requires = ["setuptools", "wheel"]
3-
backend-path = ["installer"]
4-
build-backend = "cppyy_monkey_patch:main"

test/support.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,16 @@ def setup_make(targetname):
4545
IS_MAC = IS_MAC_ARM or IS_MAC_X86
4646

4747
IS_LINUX = 0
48+
IS_LINUX_ARM = 0
49+
IS_LINUX_X86 = 0
4850
if 'linux' in sys.platform:
4951
IS_LINUX = 1
52+
import platform
53+
if 'aarch64' in platform.machine():
54+
IS_LINUX_ARM = 64
55+
os.environ["CPPYY_UNCAUGHT_QUIET"] = "1"
56+
else:
57+
IS_LINUX_X86 = 1
5058

5159
try:
5260
import __pypy__

test/test_api.py

Lines changed: 3 additions & 1 deletion
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
3+
from .support import ispypy, IS_MAC, IS_LINUX_ARM
44

55

66
class TestAPI:
@@ -64,6 +64,7 @@ class APICheck2 {
6464
m2 = API.Instance_FromVoidPtr(voidp, 'APICheck2')
6565
assert m is m2
6666

67+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
6768
def test04_custom_converter(self):
6869
"""Custom type converter"""
6970

@@ -142,6 +143,7 @@ class APICheck3Converter : public CPyCppyy::Converter {
142143
assert type(gA3b) == cppyy.gbl.APICheck3
143144
assert not gA3b.wasFromMemoryCalled()
144145

146+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
145147
def test05_custom_executor(self):
146148
"""Custom type executor"""
147149

test/test_concurrent.py

Lines changed: 2 additions & 1 deletion
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 IS_MAC_ARM, IS_MAC_X86
3+
from .support import IS_MAC_ARM, IS_MAC_X86, IS_LINUX_ARM
44

55

66
class TestCONCURRENT:
@@ -166,6 +166,7 @@ def process(self, c):
166166
assert "RuntimeError" in w.err_msg
167167
assert "all wrong" in w.err_msg
168168

169+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
169170
def test05_float2d_callback(self):
170171
"""Passing of 2-dim float arguments"""
171172

test/test_cpp11features.py

Lines changed: 2 additions & 1 deletion
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, ispypy, IS_CLANG_REPL
3+
from .support import setup_make, ispypy, IS_CLANG_REPL, IS_LINUX_ARM
44

55

66
currpath = py.path.local(__file__).dirpath()
@@ -15,6 +15,7 @@ def setup_class(cls):
1515
import cppyy
1616
cls.cpp11features = cppyy.load_reflection_info(cls.test_dct)
1717

18+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
1819
def test01_smart_ptr(self):
1920
"""Usage and access of std::shared/unique_ptr<>"""
2021

test/test_crossinheritance.py

Lines changed: 13 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, skip, mark
3-
from .support import setup_make, pylong, IS_MAC_ARM, IS_MAC, IS_CLANG_REPL, IS_CLANG_DEBUG
3+
from .support import setup_make, pylong, IS_MAC_ARM, IS_MAC, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_LINUX_ARM
44

55

66
currpath = py.path.local(__file__).dirpath()
@@ -36,6 +36,7 @@ def get_value(self):
3636
assert Base1.call_get_value(Base1()) == 42
3737
assert Base1.call_get_value(Derived()) == 13
3838

39+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
3940
def test02_constructor(self):
4041
"""Test constructor usage for derived classes"""
4142

@@ -72,6 +73,7 @@ def get_value(self):
7273
assert d.get_value() == 29
7374
assert Base1.call_get_value(d) == 29
7475

76+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
7577
def test03_override_function_abstract_base(self):
7678
"""Test ability to override a simple function with an abstract base"""
7779

@@ -164,6 +166,7 @@ def pass_value5(self, b):
164166
d2 = Derived2()
165167
assert Base1.sum_pass_value(d2) == 12+4*d2.m_int
166168

169+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
167170
def test05_override_overloads(self):
168171
"""Test ability to override overloaded functions"""
169172

@@ -184,6 +187,7 @@ def sum_all(self, *args):
184187
assert d.sum_all(-7, -5) == 1
185188
assert Base1.call_sum_all(d, -7, -5) == 1
186189

190+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
187191
def test06_const_methods(self):
188192
"""Declared const methods should keep that qualifier"""
189193

@@ -206,6 +210,7 @@ def __init__(self):
206210
assert CX.IBase4.call_get_value(c1) == 17
207211
assert CX.IBase4.call_get_value(c2) == 27
208212

213+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Fails with ModuleNotFound error")
209214
def test07_templated_base(self):
210215
"""Derive from a base class that is instantiated from a template"""
211216

@@ -505,7 +510,8 @@ def __init__(self):
505510
assert m.my_data == 42
506511
assert m.get_data() == 42
507512
assert m.get_data_v() == 42
508-
513+
514+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
509515
def test15_object_returns(self):
510516
"""Return of C++ objects from overridden functions"""
511517

@@ -740,6 +746,7 @@ class Derived(ns.Base):
740746
def abstract1(self):
741747
return ns.Result(1)
742748

749+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
743750
def test20_basic_multiple_inheritance(self):
744751
"""Basic multiple inheritance"""
745752

@@ -818,6 +825,7 @@ def z(self):
818825
assert a.m_2 == 42
819826
assert a.m_3 == 67
820827

828+
@mark.xfail(run=not IS_CLANG_DEBUG, reason="Crashes with ClangRepl with 'toString not implemented'")
821829
def test21_multiple_inheritance_with_constructors(self):
822830
"""Multiple inheritance with constructors"""
823831

@@ -905,6 +913,7 @@ def z(self):
905913
assert a.m_2 == 88
906914
assert a.m_3 == -11
907915

916+
@mark.xfail(run=not IS_CLANG_DEBUG, reason="Crashes with ClangRepl with 'toString not implemented'")
908917
def test22_multiple_inheritance_with_defaults(self):
909918
"""Multiple inheritance with defaults"""
910919

@@ -1276,6 +1285,7 @@ class D(B):
12761285
assert inst.fun1() == val1
12771286
assert inst.fun2() == inst.fun1()
12781287

1288+
@mark.xfail(run=not IS_CLANG_DEBUG, reason="Crashes with ClangRepl with 'toString not implemented'")
12791289
def test29_cross_deep_multi(self):
12801290
"""Deep multi-inheritance hierarchy"""
12811291

@@ -1517,6 +1527,7 @@ def getValue(self):
15171527
gc.collect()
15181528
assert ns.Component.get_count() == 0
15191529

1530+
@mark.xfail(run=not IS_CLANG_DEBUG, reason="Crashes with ClangRepl with 'toString not implemented'")
15201531
def test32_by_value_arguments(self):
15211532
"""Override base function taking by-value arguments"""
15221533

test/test_doc_features.py

Lines changed: 4 additions & 1 deletion
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, IS_MAC_X86, IS_MAC_ARM
3+
from .support import setup_make, ispypy, IS_WINDOWS, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC, IS_MAC_X86, IS_MAC_ARM, IS_LINUX_ARM
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("doc_helperDict"))
@@ -1106,6 +1106,7 @@ def test_template_instantiation(self):
11061106
assert len(v) == 10
11071107
assert [m.fData for m in v] == list(range(10))
11081108

1109+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
11091110
def test_cross_inheritance(self):
11101111
"""Cross-inheritance example"""
11111112

@@ -1145,6 +1146,7 @@ def add(self, i):
11451146

11461147
assert v.back().add(17) == 4+42+2*17
11471148

1149+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
11481150
def test_fallbacks(self):
11491151
"""Template instantation switches based on value sizes"""
11501152

@@ -1163,6 +1165,7 @@ def test_fallbacks(self):
11631165
assert CC.passT(2**64-1) == 2**64-1
11641166
assert 'unsigned long long' in CC.passT.__doc__
11651167

1168+
@mark.xfail(run=False, condition=IS_LINUX_ARM, reason="Crashes pytest on Linux ARM")
11661169
def test_callbacks(self):
11671170
"""Function callback example"""
11681171

0 commit comments

Comments
 (0)