[Lldb-commits] [lldb] r226042 - Fix a number of tests on Windows.

Zachary Turner zturner at google.com
Wed Jan 14 13:42:54 PST 2015


Author: zturner
Date: Wed Jan 14 15:42:53 2015
New Revision: 226042

URL: http://llvm.org/viewvc/llvm-project?rev=226042&view=rev
Log:
Fix a number of tests on Windows.

These fix various issues with path handling and disable a few tests
which use features of LLVM which are not yet supported on Windows.

Modified:
    lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp
    lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
    lldb/trunk/test/lang/c/bitfields/TestBitfields.py
    lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py
    lldb/trunk/test/python_api/target/TestTargetAPI.py

Modified: lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp?rev=226042&r1=226041&r2=226042&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp Wed Jan 14 15:42:53 2015
@@ -332,7 +332,7 @@ ProcessWindows::RefreshStateAfterStop()
             break_id = site->GetID();
         }
 
-        stop_info = StopInfo::CreateStopReasonWithBreakpointSiteID(*stop_thread, break_id, should_stop);
+        stop_info = StopInfo::CreateStopReasonWithBreakpointSiteID(*stop_thread, break_id);
         stop_thread->SetStopInfo(stop_info);
     }
     else

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py?rev=226042&r1=226041&r2=226042&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py Wed Jan 14 15:42:53 2015
@@ -35,12 +35,14 @@ class BreakpointConditionsTestCase(TestB
         self.breakpoint_conditions_python()
 
     @dwarf_test
+    @unittest2.skipIf(sys.platform.startswith("win32"), "Requires EE to support COFF on Windows (http://llvm.org/pr22232)")
     def test_breakpoint_condition_with_dwarf_and_run_command(self):
         """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'."""
         self.buildDwarf()
         self.breakpoint_conditions()
 
     @dwarf_test
+    @unittest2.skipIf(sys.platform.startswith("win32"), "Requires EE to support COFF on Windows (http://llvm.org/pr22232)")
     def test_breakpoint_condition_inline_with_dwarf_and_run_command(self):
         """Exercise breakpoint condition inline with 'breakpoint set'."""
         self.buildDwarf()
@@ -48,6 +50,7 @@ class BreakpointConditionsTestCase(TestB
 
     @python_api_test
     @dwarf_test
+    @unittest2.skipIf(sys.platform.startswith("win32"), "Requires EE to support COFF on Windows (http://llvm.org/pr22232)")
     def test_breakpoint_condition_with_dwarf_and_python_api(self):
         """Use Python APIs to set breakpoint conditions."""
         self.buildDwarf()

Modified: lldb/trunk/test/lang/c/bitfields/TestBitfields.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/bitfields/TestBitfields.py?rev=226042&r1=226041&r2=226042&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/lang/c/bitfields/TestBitfields.py Wed Jan 14 15:42:53 2015
@@ -26,6 +26,7 @@ class BitfieldsTestCase(TestBase):
         self.bitfields_variable_python()
 
     @dwarf_test
+    @unittest2.skipIf(sys.platform.startswith("win32"), "BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)")
     def test_with_dwarf_and_run_command(self):
         """Test 'frame variable ...' on a variable with bitfields."""
         self.buildDwarf()
@@ -33,6 +34,7 @@ class BitfieldsTestCase(TestBase):
 
     @python_api_test
     @dwarf_test
+    @unittest2.skipIf(sys.platform.startswith("win32"), "BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)")
     @expectedFailureGcc # GCC (4.6/4.7) generates incorrect code with unnamed bitfields.
     def test_with_dwarf_and_python_api(self):
         """Use Python APIs to inspect a bitfields variable."""

Modified: lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py?rev=226042&r1=226041&r2=226042&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py (original)
+++ lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py Wed Jan 14 15:42:53 2015
@@ -128,7 +128,7 @@ class ClassTypesTestCase(TestBase):
         filespec = target.GetExecutable()
         self.assertTrue(filespec, VALID_FILESPEC)
 
-        fsDir = filespec.GetDirectory()
+        fsDir = os.path.normpath(filespec.GetDirectory())
         fsFile = filespec.GetFilename()
 
         self.assertTrue(fsDir == os.getcwd() and fsFile == "a.out",
@@ -238,7 +238,7 @@ class ClassTypesTestCase(TestBase):
         filespec = target.GetExecutable()
         self.assertTrue(filespec, VALID_FILESPEC)
 
-        fsDir = filespec.GetDirectory()
+        fsDir = os.path.normpath(filespec.GetDirectory())
         fsFile = filespec.GetFilename()
 
         self.assertTrue(fsDir == os.getcwd() and fsFile == "a.out",

Modified: lldb/trunk/test/python_api/target/TestTargetAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/target/TestTargetAPI.py?rev=226042&r1=226041&r2=226042&view=diff
==============================================================================
--- lldb/trunk/test/python_api/target/TestTargetAPI.py (original)
+++ lldb/trunk/test/python_api/target/TestTargetAPI.py Wed Jan 14 15:42:53 2015
@@ -310,7 +310,7 @@ class TargetAPITestCase(TestBase):
 
         # While we are at it, let's also exercise the similar SBModule.FindGlobalVariables() API.
         for m in target.module_iter():
-            if m.GetFileSpec().GetDirectory() == os.getcwd() and m.GetFileSpec().GetFilename() == exe_name:
+            if os.path.normpath(m.GetFileSpec().GetDirectory()) == os.getcwd() and m.GetFileSpec().GetFilename() == exe_name:
                 value_list = m.FindGlobalVariables(target, 'my_global_var_of_char_type', 3)
                 self.assertTrue(value_list.GetSize() == 1)
                 self.assertTrue(value_list.GetValueAtIndex(0).GetValue() == "'X'")





More information about the lldb-commits mailing list