OSDN Git Service

[Dexter] Add os.path.normcase(...) transform to test path early.
authorTom Weaver <Tom.Weaver@Sony.com>
Tue, 2 Jun 2020 15:09:17 +0000 (16:09 +0100)
committerTom Weaver <Tom.Weaver@Sony.com>
Tue, 2 Jun 2020 15:09:17 +0000 (16:09 +0100)
  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

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

index 7e00fc5..a2d8a90 100644 (file)
@@ -79,6 +79,7 @@ class TestToolBase(ToolBase):
             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(