[debuginfo-tests] bf1cdc2 - [Dexter] Add os.path.normcase(...) transform to test path early.

Tom Weaver via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 08:12:25 PDT 2020


Author: Tom Weaver
Date: 2020-06-02T16:09:17+01:00
New Revision: bf1cdc2c6c0460b7121ac653c796ef4995b1dfa9

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

LOG: [Dexter] Add os.path.normcase(...) transform to test path early.

  When passing a test path, if the path points directly at a file, then
  normcase would not be called on path.

  This would change the expected lower case drive path, on windows, to be
  uppercase. This patch simply calls normcase on the test path at the earliest
  point possible to avoid this issue.

  Reviewers: djtodoro, jmorse

  Differential Revision: https://reviews.llvm.org/D78633

Added: 
    

Modified: 
    debuginfo-tests/dexter/dex/tools/TestToolBase.py

Removed: 
    


################################################################################
diff  --git a/debuginfo-tests/dexter/dex/tools/TestToolBase.py b/debuginfo-tests/dexter/dex/tools/TestToolBase.py
index 7e00fc54b197..a2d8a90c005e 100644
--- a/debuginfo-tests/dexter/dex/tools/TestToolBase.py
+++ b/debuginfo-tests/dexter/dex/tools/TestToolBase.py
@@ -79,6 +79,7 @@ def handle_options(self, defaults):
             raise Error(e)
 
         options.test_path = os.path.abspath(options.test_path)
+        options.test_path = os.path.normcase(options.test_path)
         if not os.path.isfile(options.test_path) and not os.path.isdir(options.test_path):
             raise Error(
                 '<d>could not find test path</> <r>"{}"</>'.format(


        


More information about the llvm-commits mailing list