From c7c2e51c24759470f2ee46cfbe3a2ade1e32a702 Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Fri, 20 Sep 2024 13:37:37 +0200 Subject: [PATCH] [test] Update tags --- test/support.py | 5 +++++ test/test_datatypes.py | 9 ++++----- test/test_fragile.py | 4 ++-- test/test_regression.py | 2 +- test/test_stltypes.py | 4 ++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/test/support.py b/test/support.py index d78726c3..dddd8073 100644 --- a/test/support.py +++ b/test/support.py @@ -42,6 +42,11 @@ def setup_make(targetname): os.environ["CPPYY_UNCAUGHT_QUIET"] = "1" else: IS_MAC_X86 = 1 +IS_MAC = IS_MAC_ARM or IS_MAC_X86 + +IS_LINUX = 0 +if 'linux' in sys.platform: + IS_LINUX = 1 try: import __pypy__ diff --git a/test/test_datatypes.py b/test/test_datatypes.py index 72ec5e8c..dba7127e 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, IS_MAC_ARM +from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM, IS_MAC IS_MAC = IS_MAC_X86 or IS_MAC_ARM @@ -378,7 +378,7 @@ def test03_array_passing(self): c.__destruct__() - @mark.xfail + @mark.xfail(condition= not(IS_CLANG_REPL), reason="Fails on with Cling") def test04_class_read_access(self): """Test read access to class public data and verify values""" @@ -442,7 +442,7 @@ def test04_class_read_access(self): c.__destruct__() - @mark.xfail + @mark.xfail(condition=(not(IS_CLANG_REPL) and IS_MAC), reason="Fails on OS X + Cling") def test05_class_data_write_access(self): """Test write access to class public data and verify values""" @@ -578,7 +578,7 @@ def test07_type_conversions(self): c.__destruct__() - @mark.xfail + @mark.xfail(condition= IS_MAC, reason="Fails on OS X") def test08_global_builtin_type(self): """Test access to a global builtin type""" @@ -1967,7 +1967,6 @@ def test38_plain_old_data(self): assert len(f1.fPtrArr) == 3 assert list(f1.fPtrArr) == [1., 2., 3] - @mark.xfail(run=not IS_CLANG_REPL, reason="Crashes") def test39_aggregates(self): """Initializer construction of aggregates""" diff --git a/test/test_fragile.py b/test/test_fragile.py index 333bbd37..55f9d3ad 100644 --- a/test/test_fragile.py +++ b/test/test_fragile.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_ARM, IS_CLANG_REPL +from .support import setup_make, ispypy, IS_LINUX, IS_WINDOWS, IS_MAC_ARM, IS_CLANG_REPL currpath = py.path.local(__file__).dirpath() @@ -562,7 +562,7 @@ def test23_set_debug(self): cppyy.set_debug(False) assert cppyy.gbl.Cpp.IsDebugOutputEnabled() == False - @mark.xfail + @mark.xfail(condition = IS_LINUX, reason="Fails on Ubuntu") def test24_asan(self): """Check availability of ASAN with gcc""" diff --git a/test/test_regression.py b/test/test_regression.py index 29f55a5e..fd315886 100644 --- a/test/test_regression.py +++ b/test/test_regression.py @@ -587,7 +587,7 @@ class Bar { r21.Bar([1,2]) # used to call Bar(Foo x) through implicit conversion assert r21.what_called == 'Bar(il)' - @mark.xfail + @mark.xfail(condition= IS_MAc, reason="Fails on with Cling") def test23_copy_constructor(self): """Copy construct an object into an empty (NULL) proxy""" diff --git a/test/test_stltypes.py b/test/test_stltypes.py index 634a2924..53751564 100644 --- a/test/test_stltypes.py +++ b/test/test_stltypes.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- import py, os, sys from pytest import raises, skip, mark -from .support import setup_make, pylong, pyunicode, maxvalue, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM +from .support import setup_make, pylong, pyunicode, maxvalue, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM, IS_MAC, IS_LINUX currpath = py.path.local(__file__).dirpath() test_dct = str(currpath.join("stltypesDict")) @@ -1950,7 +1950,7 @@ def test01_basics(self): assert YourError.__cpp_name__ == 'ErrorNamespace::YourError' assert YourError.__module__ == 'cppyy.gbl.ErrorNamespace' - @mark.xfail + @mark.xfail(condition = IS_MAC or (IS_LINUX and IS_CLANG_REPL), reason="Fails on OS X") def test02_raising(self): """Raise a C++ std::exception derived class as a Python excption"""