Bug 1583353 - [moztest.resolve] Use MozbuildObject.mozbuild_reader to resolve outgoing files r=gbrown
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 21 Oct 2019 19:26:08 +0000
changeset 498634 588f0a9ac709a04228bd4c149b53ce757fa23971
parent 498633 aaeaea784276cfa9a866481df6ee37b6d7d8cf01
child 498635 391773a3c2e6f61091d075a3fdce180d48a0ac56
push id98571
push userahalberstadt@mozilla.com
push dateTue, 22 Oct 2019 20:14:04 +0000
treeherderautoland@74b431af3f3f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1583353
milestone72.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 1583353 - [moztest.resolve] Use MozbuildObject.mozbuild_reader to resolve outgoing files r=gbrown Similar to the vcs change, the MozbuildObject already has a reader attribute available. So we can re-use that instead of creating our own. Depends on D49765 Differential Revision: https://phabricator.services.mozilla.com/D49766
testing/mozbase/moztest/moztest/resolve.py
--- a/testing/mozbase/moztest/moztest/resolve.py
+++ b/testing/mozbase/moztest/moztest/resolve.py
@@ -8,17 +8,16 @@ import fnmatch
 import os
 import pickle
 import sys
 from collections import defaultdict
 
 import manifestparser
 import mozpack.path as mozpath
 from mozbuild.base import MozbuildObject
-from mozbuild.frontend.reader import BuildReader, EmptyConfig
 from mozbuild.util import OrderedDefaultDict
 
 here = os.path.abspath(os.path.dirname(__file__))
 
 MOCHITEST_CHUNK_BY_DIR = 4
 MOCHITEST_TOTAL_CHUNKS = 5
 
 
@@ -660,18 +659,17 @@ class TestResolver(MozbuildObject):
                                         honor_install_to_subdir=True)
             else:
                 yield test
 
     def get_outgoing_metadata(self):
         paths, tags, flavors = set(), set(), set()
         changed_files = self.repository.get_outgoing_files('AM')
         if changed_files:
-            config = EmptyConfig(self.topsrcdir)
-            reader = BuildReader(config)
+            reader = self.mozbuild_reader(config_mode='empty')
             files_info = reader.files_info(changed_files)
 
             for path, info in files_info.items():
                 paths |= info.test_files
                 tags |= info.test_tags
                 flavors |= info.test_flavors
 
         return {