[Lldb-commits] [PATCH] D155124: [lldb][Windows] Fix TestLocateModuleCallback
Kazuki Sakamoto via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 12 14:54:05 PDT 2023
splhack created this revision.
splhack added reviewers: clayborg, jingham, bulbazord, jasonmolenda, JDevlieghere, mib.
Herald added a project: All.
splhack requested review of this revision.
Herald added subscribers: lldb-commits, wangpc.
Herald added a project: LLDB.
D153735 <https://reviews.llvm.org/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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155124
Files:
lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py
Index: lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py
===================================================================
--- lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py
+++ lldb/test/API/python_api/sbplatform/TestLocateModuleCallback.py
@@ -49,7 +49,9 @@
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 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155124.539746.patch
Type: text/x-patch
Size: 1674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230712/011ce633/attachment-0001.bin>
More information about the lldb-commits
mailing list