Author: Kazuki Sakamoto Date: 2023-07-14T10:36:57-07:00 New Revision: 43b9d62018fe53278dfcd2c46f4937a1664745bd
URL: https://github.com/llvm/llvm-project/commit/43b9d62018fe53278dfcd2c46f4937a1664745bd DIFF: https://github.com/llvm/llvm-project/commit/43b9d62018fe53278dfcd2c46f4937a1664745bd.diff LOG: [lldb][Windows] Fix TestLocateModuleCallback D153735 added the tests but it is failing due to POSIX path vs Windows path. https://lab.llvm.org/buildbot/#/builders/219/builds/4084 Fix it. - MODULE_PLATFORM_PATH is POSIX path. - Normalize self.input_dir, FileSpec and SymbolFileSpec fullpath. Differential Revision: https://reviews.llvm.org/D155124 Added: Modified: lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py Removed: ################################################################################ diff --git a/lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py b/lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py index 672795fd742c79..0e3bdf50124bbe 100644 --- a/lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py +++ b/lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py @@ -49,7 +49,9 @@ def check_module_spec(self, module_spec: lldb.SBModuleSpec): self.assertEqual(MODULE_TRIPLE, module_spec.GetTriple()) - self.assertEqual(MODULE_PLATFORM_PATH, module_spec.GetFileSpec().fullpath) + self.assertEqual( + MODULE_PLATFORM_PATH, Path(module_spec.GetFileSpec().fullpath).as_posix() + ) def check_module(self, module: lldb.SBModule, symbol_file: str, symbol_kind: str): self.assertTrue(module.IsValid()) @@ -61,16 +63,20 @@ def check_module(self, module: lldb.SBModule, symbol_file: str, symbol_kind: str self.assertEqual(MODULE_RESOLVED_TRIPLE, module.GetTriple()) - self.assertEqual(MODULE_PLATFORM_PATH, module.GetPlatformFileSpec().fullpath) - self.assertEqual( - str(self.input_dir / MODULE_FILE), - module.GetFileSpec().fullpath, + MODULE_PLATFORM_PATH, Path(module.GetPlatformFileSpec().fullpath).as_posix() ) - self.assertEqual( - str(self.input_dir / symbol_file), - module.GetSymbolFileSpec().fullpath, + self.assertTrue( + (self.input_dir / MODULE_FILE) + .resolve() + .samefile(Path(module.GetFileSpec().fullpath).resolve()) + ) + + self.assertTrue( + (self.input_dir / symbol_file) + .resolve() + .samefile(Path(module.GetSymbolFileSpec().fullpath).resolve()) ) sc_list = module.FindFunctions(MODULE_FUNCTION, lldb.eSymbolTypeCode) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits