diff --git a/test/test_advancedcpp.py b/test/test_advancedcpp.py index 9d754e7..bf896c8 100644 --- a/test/test_advancedcpp.py +++ b/test/test_advancedcpp.py @@ -819,7 +819,6 @@ def test24_typedef_to_private_class(self): assert cppjit.gbl.TypedefToPrivateClass().f().m_val == 42 - @mark.xfail(run=False, reason="Crashes") def test25_ostream_printing(self): """Mapping of __str__ through operator<<(ostream&)""" diff --git a/test/test_boost.py b/test/test_boost.py index bba20a1..157c066 100644 --- a/test/test_boost.py +++ b/test/test_boost.py @@ -1,7 +1,7 @@ import os from pytest import mark, raises, skip -from support import IS_MAC_ARM, IS_MAC_X86 +from support import IS_MAC_ARM, IS_MAC_X86, IS_VALGRIND # /usr/include and /usr/local/include are on the compiler's default search # path; the Homebrew (arm64) and MacPorts prefixes are not, so a hit there @@ -35,7 +35,10 @@ def setup_class(cls): import cppjit add_boost_include_path() - cppjit.include("boost/any.hpp") + try: + cppjit.include("boost/any.hpp") + except ImportError: + skip("boost headers not loadable") @mark.skipif((IS_MAC_ARM or IS_MAC_X86), reason="Fails to include boost on OS X") def test01_any_class(self): @@ -50,7 +53,11 @@ def test01_any_class(self): assert std.list[any] - @mark.xfail(run=False, reason="boost::any casting crashes") + @mark.xfail( + condition=IS_VALGRIND, + run=False, + reason="invalid reads in the JITed boost constructors under valgrind", + ) def test02_any_usage(self): """boost::any assignment and casting""" @@ -122,10 +129,17 @@ def setup_class(cls): import cppjit add_boost_include_path() - cppjit.include("boost/variant/variant.hpp") - cppjit.include("boost/variant/get.hpp") + try: + cppjit.include("boost/variant/variant.hpp") + cppjit.include("boost/variant/get.hpp") + except ImportError: + skip("boost headers not loadable") - @mark.xfail(run=False, reason="boost::variant access crashes") + @mark.xfail( + condition=IS_VALGRIND, + run=False, + reason="invalid reads in the JITed boost constructors under valgrind", + ) def test01_variant_usage(self): """boost::variant usage""" diff --git a/test/test_concurrent.py b/test/test_concurrent.py index 6adea08..026fdcc 100644 --- a/test/test_concurrent.py +++ b/test/test_concurrent.py @@ -15,7 +15,6 @@ def setup_class(cls): cppjit.gbl.Workers.calc.__release_gil__ = True - @mark.xfail(run=False, reason="Crashes") def test01_simple_threads(self): """Run basic Python threads""" @@ -35,7 +34,6 @@ def test01_simple_threads(self): for t in threads: t.join() - @mark.xfail(run=False, reason="Crashes") def test02_futures(self): """Run with Python futures""" @@ -266,7 +264,6 @@ def test(): for t in threads: t.join() - @mark.xfail(run=False, reason="Crashes") def test07_overload_reuse_in_threads_wo_gil(self): """Threads reuse overload objects; check for clashes if no GIL""" diff --git a/test/test_lowlevel.py b/test/test_lowlevel.py index b6ad122..0d8408e 100644 --- a/test/test_lowlevel.py +++ b/test/test_lowlevel.py @@ -669,7 +669,7 @@ def test15_templated_arrays_gmpxx(self): try: cppjit.include("gmpxx.h") cppjit.load_library("gmpxx") - except ImportError: + except (ImportError, RuntimeError): skip("gmpxx not installed") assert cppjit.gbl.std.vector[cppjit.gbl.mpz_class].value_type diff --git a/test/test_stltypes.py b/test/test_stltypes.py index 72d0a21..ad6fdbd 100644 --- a/test/test_stltypes.py +++ b/test/test_stltypes.py @@ -4,7 +4,6 @@ import py from pytest import mark, raises, skip from support import ( - IS_CLANG_DEBUG, IS_CLANG_REPL, IS_CLING, IS_LINUX_ARM, @@ -1839,10 +1838,6 @@ def test01_string_through_string_view(self): assert countit(v) == 4 assert countit_cr(v) == 4 - @mark.xfail( - run=not (IS_CLANG_DEBUG or IS_CLING), - reason="Crashes on ClangRepl with 'toString not implemented', and on Cling", - ) def test02_string_view_from_unicode(self): """Life-time management of converted unicode strings"""