[Lldb-commits] [lldb] r173394 - in /lldb/trunk/test: functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py lang/c/anonymous/TestAnonymous.py lang/cpp/this/TestCPPThis.py lldbtest.py

Daniel Malea daniel.malea at intel.com
Thu Jan 24 15:52:09 PST 2013


Author: dmalea
Date: Thu Jan 24 17:52:09 2013
New Revision: 173394

URL: http://llvm.org/viewvc/llvm-project?rev=173394&view=rev
Log:
Mark test cases affected by PR 15036 (GCC-generated DWARF causes parser crash)
- Add new decorator "@skipIfGcc" to lldbtest.py


Modified:
    lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
    lldb/trunk/test/lang/c/anonymous/TestAnonymous.py
    lldb/trunk/test/lang/cpp/this/TestCPPThis.py
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py?rev=173394&r1=173393&r2=173394&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py Thu Jan 24 17:52:09 2013
@@ -19,6 +19,7 @@
         self.buildDsym()
         self.data_formatter_commands()
 
+    @skipIfGcc # bugzilla 15036: if compiled with GCC 4.6 (but not 4.4) lldb crashes with assertion in RecordLayoutBuilder: "field does not have external offset"
     @dwarf_test
     def test_with_dwarf_and_run_command(self):
         """Test data formatter commands."""

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py?rev=173394&r1=173393&r2=173394&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py Thu Jan 24 17:52:09 2013
@@ -19,6 +19,8 @@
         self.buildDsym()
         self.data_formatter_commands()
 
+    @skipIfGcc # bugzilla 15036: When built with GCC, this test causes lldb to crash with
+               # assert DeclCXX.h:554 queried property of class with no definition
     @dwarf_test
     def test_with_dwarf_and_run_command(self):
         """Test data formatter commands."""

Modified: lldb/trunk/test/lang/c/anonymous/TestAnonymous.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/anonymous/TestAnonymous.py?rev=173394&r1=173393&r2=173394&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/anonymous/TestAnonymous.py (original)
+++ lldb/trunk/test/lang/c/anonymous/TestAnonymous.py Thu Jan 24 17:52:09 2013
@@ -15,6 +15,7 @@
         self.buildDsym()
         self.expr()
 
+    @skipIfGcc # bugzilla 15036: When built with GCC, causes linux crash in RecordLayoutBuilder.cpp:2272: "Field does not have an external offset"
     @dwarf_test
     def test_expr_with_dwarf(self):
         self.buildDwarf()

Modified: lldb/trunk/test/lang/cpp/this/TestCPPThis.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/this/TestCPPThis.py?rev=173394&r1=173393&r2=173394&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/this/TestCPPThis.py (original)
+++ lldb/trunk/test/lang/cpp/this/TestCPPThis.py Thu Jan 24 17:52:09 2013
@@ -20,6 +20,7 @@
 
     #rdar://problem/9962849
     #@expectedFailureClang
+    @skipIfGcc # bugzilla 15036: When built with GCC, causes linux crash in RecordLayoutBuilder.cpp:2272: "Field does not have an external offset"
     @dwarf_test
     def test_with_dwarf_and_run_command(self):
         """Test that the appropriate member variables are available when stopped in C++ static, inline, and const methods"""

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=173394&r1=173393&r2=173394&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Thu Jan 24 17:52:09 2013
@@ -446,6 +446,22 @@
             func(*args, **kwargs)
     return wrapper
 
+def skipIfGcc(func):
+    """Decorate the item to skip tests that should be skipped if building with gcc ."""
+    if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+        raise Exception("@skipOnLinux can only be used to decorate a test method")
+    @wraps(func)
+    def wrapper(*args, **kwargs):
+        from unittest2 import case
+        self = args[0]
+        compiler = self.getCompiler()
+        if "gcc" in compiler:
+            self.skipTest("skipping because gcc is the test compiler")
+        else:
+            func(*args, **kwargs)
+    return wrapper
+
+
 class Base(unittest2.TestCase):
     """
     Abstract base for performing lldb (see TestBase) or other generic tests (see





More information about the lldb-commits mailing list