summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Tremoulet <jotrem@microsoft.com>2020-09-23 09:20:10 -0700
committerTom Stellard <tstellar@redhat.com>2020-12-11 17:17:24 -0500
commit98fa273339a474ae9dcc3295ef10e75e38589dda (patch)
tree9905f16bd83cec0fed44ba0f09bcbeb4e9d74677
parent561e1ce1a82e98df60074cef6b63f640f4ef712c (diff)
downloadllvm-98fa273339a474ae9dcc3295ef10e75e38589dda.tar.gz
[lldb] Normalize paths in new test
The minidump-sysroot test I added in commit 20f84257 compares two paths using a string comparison. This causes the Windows buildbot to fail because of mismatched forward slashes and backslashes. Use os.path.normcase to normalize before comparing. (cherry picked from commit 4a55c98fa7bee1e5ab1504db20ca4d7c8a083111)
-rw-r--r--lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
index 9d2daec67698..103e86efc54d 100644
--- a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
+++ b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
@@ -479,5 +479,6 @@ class MiniDumpNewTestCase(TestBase):
# Check that we loaded the module from the sysroot
self.assertEqual(self.target.GetNumModules(), 1)
module = self.target.GetModuleAtIndex(0)
- spec = module.GetFileSpec()
- self.assertEqual(spec.GetDirectory(), exe_dir)
+ spec_dir_norm = os.path.normcase(module.GetFileSpec().GetDirectory())
+ exe_dir_norm = os.path.normcase(exe_dir)
+ self.assertEqual(spec_dir_norm, exe_dir_norm)