[Lldb-commits] [lldb] r175945 - Fixing issues in previous checkin - still figuring out how to make expectedFailureClang take the bugnumber
Enrico Granata
egranata at apple.com
Fri Feb 22 17:28:31 PST 2013
Author: enrico
Date: Fri Feb 22 19:28:30 2013
New Revision: 175945
URL: http://llvm.org/viewvc/llvm-project?rev=175945&view=rev
Log:
Fixing issues in previous checkin - still figuring out how to make expectedFailureClang take the bugnumber
Modified:
lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py?rev=175945&r1=175944&r2=175945&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py (original)
+++ lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py Fri Feb 22 19:28:30 2013
@@ -27,9 +27,8 @@ class StaticVariableTestCase(TestBase):
self.static_variable_commands()
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
- #rdar://problem/9980907
- @expectedFailureClang
- @expectedFailureGcc
+ @expectedFailureClang(9980907)
+ @expectedFailureGcc(9980907)
@python_api_test
@dsym_test
def test_with_dsym_and_python_api(self):
@@ -37,9 +36,8 @@ class StaticVariableTestCase(TestBase):
self.buildDsym()
self.static_variable_python()
- #rdar://problem/9980907
- @expectedFailureClang
- @expectedFailureGcc
+ @expectedFailureClang(9980907)
+ @expectedFailureGcc(9980907)
@python_api_test
@dwarf_test
def test_with_dwarf_and_python_api(self):
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=175945&r1=175944&r2=175945&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Fri Feb 22 19:28:30 2013
@@ -368,39 +368,39 @@ def dwarf_test(func):
wrapper.__dwarf_test__ = True
return wrapper
-def expectedFailureCompiler(bugnumber=None):
+def expectedFailureCompiler(func,compiler,bugnumber=None):
if callable(bugnumber):
@wraps(bugnumber)
def expectedFailureCompiler_easy_wrapper(*args, **kwargs):
- from unittest2 import case
- self = args[0]
- test_compiler = self.getCompiler()
- try:
- bugnumber(*args, **kwargs)
- except Exception:
- if compiler in test_compiler:
- raise _ExpectedFailure(sys.exc_info(),None)
- else:
- raise
- if compiler in test_compiler:
- raise case._UnexpectedSuccess(sys.exc_info(),None)
+ from unittest2 import case
+ self = args[0]
+ test_compiler = self.getCompiler()
+ try:
+ bugnumber(*args, **kwargs)
+ except Exception:
+ if compiler in test_compiler:
+ raise case._ExpectedFailure(sys.exc_info(),None)
+ else:
+ raise
+ if compiler in test_compiler:
+ raise case._UnexpectedSuccess(sys.exc_info(),None)
return expectedFailureCompiler_easy_wrapper
else:
def expectedFailureCompiler_impl(func):
@wraps(func)
def wrapper(*args, **kwargs):
- from unittest2 import case
- self = args[0]
- test_compiler = self.getCompiler()
- try:
- func(*args, **kwargs)
- except Exception:
- if compiler in test_compiler:
- raise _ExpectedFailure(sys.exc_info(),None)
- else:
- raise
- if compiler in test_compiler:
- raise case._UnexpectedSuccess(sys.exc_info(),None)
+ from unittest2 import case
+ self = args[0]
+ test_compiler = self.getCompiler()
+ try:
+ func(*args, **kwargs)
+ except Exception:
+ if compiler in test_compiler:
+ raise case._ExpectedFailure(sys.exc_info(),bugnumber)
+ else:
+ raise
+ if compiler in test_compiler:
+ raise case._UnexpectedSuccess(sys.exc_info(),bugnumber)
return wrapper
return expectedFailureCompiler_impl
@@ -420,35 +420,35 @@ def expectedFailurei386(bugnumber=None):
if callable(bugnumber):
@wraps(bugnumber)
def expectedFailurei386_easy_wrapper(*args, **kwargs):
- from unittest2 import case
- self = args[0]
- arch = self.getArchitecture()
- try:
- bugnumber(*args, **kwargs)
- except Exception:
- if "i386" in arch:
- raise _ExpectedFailure(sys.exc_info(),None)
- else:
- raise
- if "i386" in arch:
- raise case._UnexpectedSuccess(sys.exc_info(),None)
+ from unittest2 import case
+ self = args[0]
+ arch = self.getArchitecture()
+ try:
+ bugnumber(*args, **kwargs)
+ except Exception:
+ if "i386" in arch:
+ raise case._ExpectedFailure(sys.exc_info(),None)
+ else:
+ raise
+ if "i386" in arch:
+ raise case._UnexpectedSuccess(sys.exc_info(),None)
return expectedFailurei386_easy_wrapper
else:
def expectedFailurei386_impl(func):
@wraps(func)
def wrapper(*args, **kwargs):
- from unittest2 import case
- self = args[0]
- arch = self.getArchitecture()
- try:
- func(*args, **kwargs)
- except Exception:
- if "i386" in arch:
- raise _ExpectedFailure(sys.exc_info(),None)
- else:
- raise
- if "i386" in arch:
- raise case._UnexpectedSuccess(sys.exc_info(),None)
+ from unittest2 import case
+ self = args[0]
+ arch = self.getArchitecture()
+ try:
+ func(*args, **kwargs)
+ except Exception:
+ if "i386" in arch:
+ raise case._ExpectedFailure(sys.exc_info(),bugnumber)
+ else:
+ raise
+ if "i386" in arch:
+ raise case._UnexpectedSuccess(sys.exc_info(),bugnumber)
return wrapper
return expectedFailurei386_impl
@@ -456,35 +456,35 @@ def expectedFailureLinux(bugnumber=None)
if callable(bugnumber):
@wraps(bugnumber)
def expectedFailureLinux_easy_wrapper(*args, **kwargs):
- from unittest2 import case
- self = args[0]
- platform = sys.platform
- try:
- bugnumber(*args, **kwargs)
- except Exception:
- if "linux" in platform:
- raise _ExpectedFailure(sys.exc_info(),None)
- else:
- raise
- if "linux" in platform:
- raise case._UnexpectedSuccess(sys.exc_info(),None)
+ from unittest2 import case
+ self = args[0]
+ platform = sys.platform
+ try:
+ bugnumber(*args, **kwargs)
+ except Exception:
+ if "linux" in platform:
+ raise case._ExpectedFailure(sys.exc_info(),None)
+ else:
+ raise
+ if "linux" in platform:
+ raise case._UnexpectedSuccess(sys.exc_info(),None)
return expectedFailureLinux_easy_wrapper
else:
def expectedFailureLinux_impl(func):
@wraps(func)
def wrapper(*args, **kwargs):
- from unittest2 import case
- self = args[0]
- platform = sys.platform
- try:
- func(*args, **kwargs)
- except Exception:
- if "linux" in platform:
- raise _ExpectedFailure(sys.exc_info(),None)
- else:
- raise
- if "linux" in platform:
- raise case._UnexpectedSuccess(sys.exc_info(),None)
+ from unittest2 import case
+ self = args[0]
+ platform = sys.platform
+ try:
+ func(*args, **kwargs)
+ except Exception:
+ if "linux" in platform:
+ raise case._ExpectedFailure(sys.exc_info(),bugnumber)
+ else:
+ raise
+ if "linux" in platform:
+ raise case._UnexpectedSuccess(sys.exc_info(),bugnumber)
return wrapper
return expectedFailureLinux_impl
More information about the lldb-commits
mailing list