mirror of
https://github.com/intel/llvm.git
synced 2026-02-09 01:52:26 +08:00
Exempt some compilers from new static variable test.
Apparently some compilers generate incomplete debug information which caused the updated test to fail. Therefore I've extracted the new check into a separate test case with the necessary decorators. llvm-svn: 334456
This commit is contained in:
@@ -39,6 +39,40 @@ class StaticVariableTestCase(TestBase):
|
||||
substrs=['stopped',
|
||||
'stop reason = breakpoint'])
|
||||
|
||||
# Global variables are no longer displayed with the "frame variable"
|
||||
# command.
|
||||
self.expect(
|
||||
'target variable A::g_points',
|
||||
VARIABLES_DISPLAYED_CORRECTLY,
|
||||
patterns=['\(PointType \[[1-9]*\]\) A::g_points = {'])
|
||||
self.expect('target variable g_points', VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs=['(PointType [2]) g_points'])
|
||||
|
||||
# On Mac OS X, gcc 4.2 emits the wrong debug info for A::g_points.
|
||||
# A::g_points is an array of two elements.
|
||||
if self.platformIsDarwin() or self.getPlatform() == "linux":
|
||||
self.expect(
|
||||
"target variable A::g_points[1].x",
|
||||
VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr="(int) A::g_points[1].x = 11")
|
||||
|
||||
@expectedFailureAll(
|
||||
compiler=["gcc"],
|
||||
bugnumber="Compiler emits incomplete debug info")
|
||||
@expectedFailureAll(
|
||||
compiler=["clang"],
|
||||
compiler_version=["<", "3.9"],
|
||||
bugnumber='llvm.org/pr20550')
|
||||
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
|
||||
def test_with_run_command_complete(self):
|
||||
"""
|
||||
Test that file and class static variables display correctly with
|
||||
complete debug information.
|
||||
"""
|
||||
self.build()
|
||||
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
|
||||
self.assertTrue(target, VALID_TARGET)
|
||||
|
||||
# Global variables are no longer displayed with the "frame variable"
|
||||
# command.
|
||||
self.expect(
|
||||
@@ -67,14 +101,6 @@ class StaticVariableTestCase(TestBase):
|
||||
'(x = 11, y = 22)', '(x = 3, y = 4)', '(x = 33, y = 44)'
|
||||
])
|
||||
|
||||
# On Mac OS X, gcc 4.2 emits the wrong debug info for A::g_points.
|
||||
# A::g_points is an array of two elements.
|
||||
if self.platformIsDarwin() or self.getPlatform() == "linux":
|
||||
self.expect(
|
||||
"target variable A::g_points[1].x",
|
||||
VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr="(int) A::g_points[1].x = 11")
|
||||
|
||||
@expectedFailureAll(
|
||||
compiler=["gcc"],
|
||||
bugnumber="Compiler emits incomplete debug info")
|
||||
|
||||
Reference in New Issue
Block a user