Making all @expectedFailure markers take an explicit bugnumber annotation. This used to be optional, but that makes it harder to track what tests are failing for what reason. So, make it mandatory, in the form of refusing to run the test suite if annotations are missing
llvm-svn: 220012
This commit is contained in:
parent
4b2f7456ad
commit
cf3ab58e47
|
@ -16,7 +16,7 @@ class AssertingInferiorTestCase(TestBase):
|
||||||
self.buildDsym()
|
self.buildDsym()
|
||||||
self.inferior_asserting()
|
self.inferior_asserting()
|
||||||
|
|
||||||
@expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly'
|
@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
|
||||||
@expectedFailureDarwin("rdar://15367233")
|
@expectedFailureDarwin("rdar://15367233")
|
||||||
def test_inferior_asserting_dwarf(self):
|
def test_inferior_asserting_dwarf(self):
|
||||||
"""Test that lldb reliably catches the inferior asserting (command)."""
|
"""Test that lldb reliably catches the inferior asserting (command)."""
|
||||||
|
@ -34,9 +34,9 @@ class AssertingInferiorTestCase(TestBase):
|
||||||
self.buildDwarf()
|
self.buildDwarf()
|
||||||
self.inferior_asserting_registers()
|
self.inferior_asserting_registers()
|
||||||
|
|
||||||
@expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
|
@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
|
||||||
@expectedFailureFreeBSD('llvm.org/pr18533') # PC in __assert frame is outside of function
|
@expectedFailureFreeBSD('llvm.org/pr18533 - PC in __assert frame is outside of function')
|
||||||
@expectedFailureLinux('') # PC in __GI___assert_fail frame is just after the function (this is a no-return so there is no epilogue afterwards)
|
@expectedFailureLinux("PC in __GI___assert_fail frame is just after the function (this is a no-return so there is no epilogue afterwards)")
|
||||||
def test_inferior_asserting_disassemble(self):
|
def test_inferior_asserting_disassemble(self):
|
||||||
"""Test that lldb reliably disassembles frames after asserting (command)."""
|
"""Test that lldb reliably disassembles frames after asserting (command)."""
|
||||||
self.buildDefault()
|
self.buildDefault()
|
||||||
|
@ -55,7 +55,7 @@ class AssertingInferiorTestCase(TestBase):
|
||||||
self.buildDsym()
|
self.buildDsym()
|
||||||
self.inferior_asserting_expr()
|
self.inferior_asserting_expr()
|
||||||
|
|
||||||
@expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
|
@expectedFailurei386('llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly')
|
||||||
@unittest2.expectedFailure("rdar://15367233")
|
@unittest2.expectedFailure("rdar://15367233")
|
||||||
def test_inferior_asserting_expr(self):
|
def test_inferior_asserting_expr(self):
|
||||||
"""Test that the lldb expression interpreter can read from the inferior after asserting (command)."""
|
"""Test that the lldb expression interpreter can read from the inferior after asserting (command)."""
|
||||||
|
@ -69,7 +69,7 @@ class AssertingInferiorTestCase(TestBase):
|
||||||
self.buildDsym()
|
self.buildDsym()
|
||||||
self.inferior_asserting_step()
|
self.inferior_asserting_step()
|
||||||
|
|
||||||
@expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
|
@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
|
||||||
@expectedFailureDarwin("rdar://15367233")
|
@expectedFailureDarwin("rdar://15367233")
|
||||||
def test_inferior_asserting_step(self):
|
def test_inferior_asserting_step(self):
|
||||||
"""Test that lldb functions correctly after stepping through a call to assert()."""
|
"""Test that lldb functions correctly after stepping through a call to assert()."""
|
||||||
|
|
|
@ -450,51 +450,52 @@ def expectedFailure(expected_fn, bugnumber=None):
|
||||||
if expected_fn(self):
|
if expected_fn(self):
|
||||||
raise case._UnexpectedSuccess(sys.exc_info(), bugnumber)
|
raise case._UnexpectedSuccess(sys.exc_info(), bugnumber)
|
||||||
return wrapper
|
return wrapper
|
||||||
if callable(bugnumber):
|
if bugnumber:
|
||||||
return expectedFailure_impl(bugnumber)
|
if callable(bugnumber):
|
||||||
else:
|
return expectedFailure_impl(bugnumber)
|
||||||
return expectedFailure_impl
|
else:
|
||||||
|
return expectedFailure_impl
|
||||||
|
|
||||||
def expectedFailureCompiler(compiler, compiler_version=None, bugnumber=None):
|
def expectedFailureCompiler(compiler, compiler_version=None, bugnumber=None):
|
||||||
if compiler_version is None:
|
if compiler_version is None:
|
||||||
compiler_version=['=', None]
|
compiler_version=['=', None]
|
||||||
def fn(self):
|
def fn(self):
|
||||||
return compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version)
|
return compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version)
|
||||||
return expectedFailure(fn, bugnumber)
|
if bugnumber: return expectedFailure(fn, bugnumber)
|
||||||
|
|
||||||
def expectedFailureClang(bugnumber=None):
|
def expectedFailureClang(bugnumber=None):
|
||||||
return expectedFailureCompiler('clang', None, bugnumber)
|
if bugnumber: return expectedFailureCompiler('clang', None, bugnumber)
|
||||||
|
|
||||||
def expectedFailureGcc(bugnumber=None, compiler_version=None):
|
def expectedFailureGcc(bugnumber=None, compiler_version=None):
|
||||||
return expectedFailureCompiler('gcc', compiler_version, bugnumber)
|
if bugnumber: return expectedFailureCompiler('gcc', compiler_version, bugnumber)
|
||||||
|
|
||||||
def expectedFailureIcc(bugnumber=None):
|
def expectedFailureIcc(bugnumber=None):
|
||||||
return expectedFailureCompiler('icc', None, bugnumber)
|
if bugnumber: return expectedFailureCompiler('icc', None, bugnumber)
|
||||||
|
|
||||||
def expectedFailureArch(arch, bugnumber=None):
|
def expectedFailureArch(arch, bugnumber=None):
|
||||||
def fn(self):
|
def fn(self):
|
||||||
return arch in self.getArchitecture()
|
return arch in self.getArchitecture()
|
||||||
return expectedFailure(fn, bugnumber)
|
if bugnumber: return expectedFailure(fn, bugnumber)
|
||||||
|
|
||||||
def expectedFailurei386(bugnumber=None):
|
def expectedFailurei386(bugnumber=None):
|
||||||
return expectedFailureArch('i386', bugnumber)
|
if bugnumber: return expectedFailureArch('i386', bugnumber)
|
||||||
|
|
||||||
def expectedFailurex86_64(bugnumber=None):
|
def expectedFailurex86_64(bugnumber=None):
|
||||||
return expectedFailureArch('x86_64', bugnumber)
|
if bugnumber: return expectedFailureArch('x86_64', bugnumber)
|
||||||
|
|
||||||
def expectedFailureOS(os, bugnumber=None, compilers=None):
|
def expectedFailureOS(os, bugnumber=None, compilers=None):
|
||||||
def fn(self):
|
def fn(self):
|
||||||
return os in sys.platform and self.expectedCompiler(compilers)
|
return os in sys.platform and self.expectedCompiler(compilers)
|
||||||
return expectedFailure(fn, bugnumber)
|
if bugnumber: return expectedFailure(fn, bugnumber)
|
||||||
|
|
||||||
def expectedFailureDarwin(bugnumber=None, compilers=None):
|
def expectedFailureDarwin(bugnumber=None, compilers=None):
|
||||||
return expectedFailureOS('darwin', bugnumber, compilers)
|
if bugnumber: return expectedFailureOS('darwin', bugnumber, compilers)
|
||||||
|
|
||||||
def expectedFailureFreeBSD(bugnumber=None, compilers=None):
|
def expectedFailureFreeBSD(bugnumber=None, compilers=None):
|
||||||
return expectedFailureOS('freebsd', bugnumber, compilers)
|
if bugnumber: return expectedFailureOS('freebsd', bugnumber, compilers)
|
||||||
|
|
||||||
def expectedFailureLinux(bugnumber=None, compilers=None):
|
def expectedFailureLinux(bugnumber=None, compilers=None):
|
||||||
return expectedFailureOS('linux', bugnumber, compilers)
|
if bugnumber: return expectedFailureOS('linux', bugnumber, compilers)
|
||||||
|
|
||||||
def skipIfRemote(func):
|
def skipIfRemote(func):
|
||||||
"""Decorate the item to skip tests if testing remotely."""
|
"""Decorate the item to skip tests if testing remotely."""
|
||||||
|
|
Loading…
Reference in New Issue