glib/tests/assert-msg-test.py: Skip the GDB test under sanitizers

This commit is contained in:
Marco Trevisan (Treviño) 2024-05-08 23:09:31 +02:00
parent aab0ff201b
commit d22e96aa72
2 changed files with 5 additions and 0 deletions

View File

@ -143,6 +143,10 @@ class TestAssertMessage(unittest.TestCase):
"""Test running g_assert() within gdb and fail the program."""
if self.__gdb is None:
self.skipTest("GDB is not installed, skipping this test!")
if {"thread", "address"} & set(
os.getenv("_GLIB_TEST_SANITIZERS", "").split(",")
):
self.skipTest("GDB can't run under sanitizers")
with tempfile.NamedTemporaryFile(
prefix="assert-msg-test-", suffix=".gdb", mode="w", delete=False

View File

@ -489,6 +489,7 @@ python_tests = {
'assert-msg-test.py' : {
'can_fail' : host_system == 'windows',
'extra_programs': ['assert-msg-test'],
'env': {'_GLIB_TEST_SANITIZERS': ','.join(glib_sanitizers)},
},
}