Bug 1446471 - Remove unused find_tests_by_path function; r=nalexander
authorGregory Szorc <gps@mozilla.com>
Tue, 06 Mar 2018 19:02:01 -0800
changeset 408622 a31b00db0ca72375f2d64a4729031b0529f986fc
parent 408621 0cdb80b2c3f16f902bf88ce81f09952bce374a4f
child 408623 3ccd4874096388a7fb9fc461048949fa449dda21
push id100996
push userbtara@mozilla.com
push dateSat, 17 Mar 2018 10:37:43 +0000
treeherdermozilla-inbound@97160a734959 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1446471
milestone61.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 1446471 - Remove unused find_tests_by_path function; r=nalexander I was too lazy to find the commit that orphaned this. But it is most definitely not referenced in the code base. MozReview-Commit-ID: 8gYBJQxIWIR
python/mach_commands.py
--- a/python/mach_commands.py
+++ b/python/mach_commands.py
@@ -95,34 +95,16 @@ class MachCommands(MachCommandBase):
                          test_objects=None,
                          subsuite=None,
                          verbose=False,
                          stop=False,
                          jobs=1,
                          **kwargs):
         self._activate_virtualenv()
 
-        def find_tests_by_path():
-            import glob
-            files = []
-            for t in tests:
-                if t.endswith('.py') and os.path.isfile(t):
-                    files.append(t)
-                elif os.path.isdir(t):
-                    for root, _, _ in os.walk(t):
-                        files += glob.glob(mozpath.join(root, 'test*.py'))
-                        files += glob.glob(mozpath.join(root, 'unit*.py'))
-                else:
-                    self.log(logging.WARN, 'python-test',
-                             {'test': t},
-                             'TEST-UNEXPECTED-FAIL | Invalid test: {test}')
-                    if stop:
-                        break
-            return files
-
         # Python's unittest, and in particular discover, has problems with
         # clashing namespaces when importing multiple test modules. What follows
         # is a simple way to keep environments separate, at the price of
         # launching Python multiple times. Most tests are run via mozunit,
         # which produces output in the format Mozilla infrastructure expects.
         # Some tests are run via pytest.
         if test_objects is None:
             from moztest.resolve import TestResolver