[llvm-branch-commits] [lldb] 98fa273 - [lldb] Normalize paths in new test

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 11 14:35:55 PST 2020


Author: Joseph Tremoulet
Date: 2020-12-11T17:17:24-05:00
New Revision: 98fa273339a474ae9dcc3295ef10e75e38589dda

URL: https://github.com/llvm/llvm-project/commit/98fa273339a474ae9dcc3295ef10e75e38589dda
DIFF: https://github.com/llvm/llvm-project/commit/98fa273339a474ae9dcc3295ef10e75e38589dda.diff

LOG: [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)

Added: 
    

Modified: 
    lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py

Removed: 
    


################################################################################
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 @@ def test_minidump_sysroot(self):
         # 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)


        


More information about the llvm-branch-commits mailing list