Skip to content

Commit c9ab78d

Browse files
committed
Turn off some gdb tests when compiled with clang
1 parent 3a3817e commit c9ab78d

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Lib/test/test_gdb/test_backtrace.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import textwrap
22
import unittest
3+
import sysconfig
34
from test import support
45
from test.support import python_is_optimized
56

67
from .util import setup_module, DebuggerTests, CET_PROTECTION, SAMPLE_SCRIPT
78

9+
def built_with_clang():
10+
return sysconfig.get_config_var("CC") == "clang"
811

912
def setUpModule():
1013
setup_module()
1114

1215

1316
class PyBtTests(DebuggerTests):
17+
@unittest.skipIf(built_with_clang())
1418
@unittest.skipIf(python_is_optimized(),
1519
"Python was compiled with optimizations")
1620
def test_bt(self):

Lib/test/test_gdb/test_cfunction.py

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
from .util import setup_module, DebuggerTests
66

7+
def built_with_clang():
8+
return sysconfig.get_config_var("CC") == "clang"
9+
710

811
def setUpModule():
912
setup_module()
@@ -78,6 +81,7 @@ def test_pycfunction_varargs(self):
7881
def test_pycfunction_varargs_keywords(self):
7982
self.check_pycfunction('meth_varargs_keywords', '')
8083

84+
@unittest.skipIf(built_with_clang())
8185
def test_pycfunction_fastcall(self):
8286
self.check_pycfunction('meth_fastcall', '')
8387

Lib/test/test_gdb/test_misc.py

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
from .util import run_gdb, setup_module, DebuggerTests, SAMPLE_SCRIPT
66

7+
def built_with_clang():
8+
return sysconfig.get_config_var("CC") == "clang"
9+
710

811
def setUpModule():
912
setup_module()
@@ -128,6 +131,7 @@ def test_up_then_down(self):
128131
#[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12, in baz \(args=\(1, 2, 3\)\)
129132
$''')
130133

134+
@unittest.skipIf(built_with_clang())
131135
class PyPrintTests(DebuggerTests):
132136
@unittest.skipIf(python_is_optimized(),
133137
"Python was compiled with optimizations")

0 commit comments

Comments
 (0)