xiaobai created this revision.
xiaobai added reviewers: zturner, clayborg.
Herald added subscribers: jdoerfert, kadircet, ioeric, ilya-biryukov.
Herald added a reviewer: serge-sans-paille.

I'm doing this because I plan on implementing `ComputeClangDirectory` on windows
so that `GetClangResourceDir` will work.  Additionally, I made
test_paths make sure that the directory member of the returned FileSpec is not
none. This will fail on windows since `ComputeClangDirectory` isn't implemented
yet.


https://reviews.llvm.org/D58748

Files:
  packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py


Index: packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
+++ packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
@@ -16,6 +16,8 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
+    # GetClangResourceDir doesn't work on windows yet
+    @expectedFailureAll(oslist=["windows"])
     @no_debug_info_test
     def test_paths(self):
         '''Test to make sure no file names are set in the lldb.SBFileSpec 
objects returned by lldb.SBHostOS.GetLLDBPath() for paths that are 
directories'''
@@ -25,12 +27,15 @@
                           lldb.ePathTypePythonDir,
                           lldb.ePathTypeLLDBSystemPlugins,
                           lldb.ePathTypeLLDBUserPlugins,
-                          lldb.ePathTypeLLDBTempSystemDir]
+                          lldb.ePathTypeLLDBTempSystemDir,
+                          lldb.ePathTypeClangDir]
 
         for path_type in dir_path_types:
             f = lldb.SBHostOS.GetLLDBPath(path_type)
             # No directory path types should have the filename set
             self.assertTrue(f.GetFilename() is None)
+            # All directory path types should have the directory set
+            self.assertFalse(f.GetDirectory() is None)
 
     @no_debug_info_test
     def test_directory_doesnt_end_with_slash(self):


Index: packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
+++ packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
@@ -16,6 +16,8 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
+    # GetClangResourceDir doesn't work on windows yet
+    @expectedFailureAll(oslist=["windows"])
     @no_debug_info_test
     def test_paths(self):
         '''Test to make sure no file names are set in the lldb.SBFileSpec objects returned by lldb.SBHostOS.GetLLDBPath() for paths that are directories'''
@@ -25,12 +27,15 @@
                           lldb.ePathTypePythonDir,
                           lldb.ePathTypeLLDBSystemPlugins,
                           lldb.ePathTypeLLDBUserPlugins,
-                          lldb.ePathTypeLLDBTempSystemDir]
+                          lldb.ePathTypeLLDBTempSystemDir,
+                          lldb.ePathTypeClangDir]
 
         for path_type in dir_path_types:
             f = lldb.SBHostOS.GetLLDBPath(path_type)
             # No directory path types should have the filename set
             self.assertTrue(f.GetFilename() is None)
+            # All directory path types should have the directory set
+            self.assertFalse(f.GetDirectory() is None)
 
     @no_debug_info_test
     def test_directory_doesnt_end_with_slash(self):
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to