Bug 1428718 - [moztest] Support python 3; r=egao
authorGeoff Brown <gbrown@mozilla.com>
Fri, 22 May 2020 16:12:05 +0000
changeset 531690 2e5f3c99e509579d1c2a70b9a2c378570882e878
parent 531689 41f104e3eeb168f1383ea0aac276004f6788f2e6
child 531691 266fbe02da32661d5f6e1ac33fd4d41c2d21d109
push id37442
push userncsoregi@mozilla.com
push dateSat, 23 May 2020 09:21:24 +0000
treeherdermozilla-central@bbcc193fe0f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersegao
bugs1428718, 1638993
milestone78.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 1428718 - [moztest] Support python 3; r=egao I noticed one more moztest issue in bug 1638993: sorting an array of dict is poorly defined on py2 and not tolerated on py3; adding the lambda clarifies the behavior. With this resolved, I think we can bump the moztest version and close this bug. Differential Revision: https://phabricator.services.mozilla.com/D76486
testing/mozbase/moztest/moztest/resolve.py
testing/mozbase/moztest/setup.py
--- a/testing/mozbase/moztest/moztest/resolve.py
+++ b/testing/mozbase/moztest/moztest/resolve.py
@@ -445,17 +445,17 @@ class TestManifestLoader(TestLoader):
                           finder=self.finder, handle_defaults=True)
         return (test for test in mp.tests)
 
     def _load_reftest_manifest(self, mpath):
         import reftest
         manifest = reftest.ReftestManifest(finder=self.finder)
         manifest.load(mpath)
 
-        for test in sorted(manifest.tests):
+        for test in sorted(manifest.tests, key=lambda x: x.get('path')):
             test['manifest_relpath'] = test['manifest'][len(self.topsrcdir)+1:]
             yield test
 
     def __call__(self):
         for path, name, key, value in self.reader.find_variables_from_ast(self.variables):
             mpath = os.path.join(self.topsrcdir, os.path.dirname(path), value)
             flavor = self.variables[name]
 
--- a/testing/mozbase/moztest/setup.py
+++ b/testing/mozbase/moztest/setup.py
@@ -1,17 +1,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import
 
 from setuptools import setup, find_packages
 
-PACKAGE_VERSION = '1.0.0'
+PACKAGE_VERSION = '1.1.0'
 
 # dependencies
 deps = ['mozinfo']
 
 setup(name='moztest',
       version=PACKAGE_VERSION,
       description="Package for storing and outputting Mozilla test results",
       long_description="see https://firefox-source-docs.mozilla.org/mozbase/index.html",