Bug 1371833 - In 'mach test-info', use posix paths for queries; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Wed, 21 Jun 2017 13:59:28 -0600
changeset 365425 8d01b03df8f8030fbae3a830b98cee8ce51b17d1
parent 365372 4bc36447fcf42277b0e13b42f9ec710536c3f051
child 365426 1fb9b344f56d15211d996900d806ef70d7eb40d2
push id32072
push usercbook@mozilla.com
push dateThu, 22 Jun 2017 10:47:53 +0000
treeherdermozilla-central@13e37d5702f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1371833
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1371833 - In 'mach test-info', use posix paths for queries; r=jmaher
testing/mach_commands.py
--- a/testing/mach_commands.py
+++ b/testing/mach_commands.py
@@ -998,16 +998,17 @@ class TestInfoCommand(MachCommandBase):
         #   - Bugs may be filed in bugzilla against a simple, short test
         #     name or the full path to the test;
         #   - In ActiveData, the full path is usually used, but sometimes
         #     also includes additional path components outside of the
         #     mercurial repo (common for reftests).
         # This function attempts to find appropriate names for different
         # queries based on the specified test name.
 
+        import posixpath
         import re
 
         # full_test_name is full path to file in hg (or git)
         self.full_test_name = None
         out = self.find_in_hg_or_git(self.test_name)
         if out and len(out) == 1:
             self.full_test_name = out[0]
         elif out and len(out) > 1:
@@ -1018,16 +1019,17 @@ class TestInfoCommand(MachCommandBase):
             out = self.find_in_hg_or_git('**/%s*' % self.test_name)
             if out and len(out) == 1:
                 self.full_test_name = out[0]
             elif out and len(out) > 1:
                 print("Ambiguous test name. Found:")
                 for line in out:
                     print(line)
         if self.full_test_name:
+            self.full_test_name.replace(os.sep, posixpath.sep)
             print("Found %s in source control." % self.full_test_name)
         else:
             print("Unable to validate test name '%s'!" % self.test_name)
             self.full_test_name = self.test_name
 
         # search for full_test_name in test manifests
         from mozbuild.testing import TestResolver
         resolver = self._spawn(TestResolver)