Author: xiaobai Date: Thu Mar 7 14:37:23 2019 New Revision: 355648 URL: http://llvm.org/viewvc/llvm-project?rev=355648&view=rev Log: 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. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py?rev=355648&r1=355647&r2=355648&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py Thu Mar 7 14:37:23 2019 @@ -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) Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp?rev=355648&r1=355647&r2=355648&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Thu Mar 7 14:37:23 2019 @@ -54,7 +54,6 @@ static bool DefaultComputeClangResourceD 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; } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits