From d672e533d5cbd37c7a5f623565ece47167dec411 Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Thu, 7 Mar 2019 22:37:23 +0000 Subject: [PATCH] Fix TestPaths.py on windows I committed an implementation of GetClangResourceDir on windows but forgot to update this test. I merged the tests like I intended to, but I realized that the test was actually failing. After looking into it, it appears that FileSystem::Resolve was taking the path and setting the FileSpec's Directory to "/path/to/lldb/lib/clang/" and the File to "9.0.0" which isn't what we want. So I removed the resolve line from DefaultComputeClangResourceDir. llvm-svn: 355648 --- .../test/functionalities/paths/TestPaths.py | 12 ++---------- .../Plugins/ExpressionParser/Clang/ClangHost.cpp | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py b/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py index 96e1446c2787..816751cd8795 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py @@ -25,22 +25,14 @@ class TestPaths(TestBase): 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) - # TODO: Merge into test_path when GetClangResourceDir is implemented on - # windows - @expectedFailureAll(oslist=["windows"]) - @no_debug_info_test - def test_clang_dir_path(self): - '''Test to make sure clang dir is set correctly''' - clang_dir = lldb.SBHostOS.GetLLDBPath(lldb.ePathTypeClangDir) - self.assertFalse(clang_dir.GetDirectory() is None) - @no_debug_info_test def test_directory_doesnt_end_with_slash(self): current_directory_spec = lldb.SBFileSpec(os.path.curdir) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp index ce0b630225fb..392baecb3054 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp @@ -54,7 +54,6 @@ static bool DefaultComputeClangResourceDirectory(FileSpec &lldb_shlib_spec, llvm::sys::path::append(clang_dir, relative_path); if (!verify || VerifyClangPath(clang_dir)) { file_spec.GetDirectory().SetString(clang_dir); - FileSystem::Instance().Resolve(file_spec); return true; }