Bug 1343718 - Avoid requiring an objdir when simply importing mozbuild.artifacts. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 01 Mar 2017 11:15:15 +0900
changeset 353078 56cb728c5f74f50a164e18f30aa95f16eec3ac8b
parent 353077 edbc280464588c955d0b184e37b661cc5985ccc7
child 353079 b5a3e4cb50908c4893bc9252cc19d9bf019ff04c
push id31656
push userihsiao@mozilla.com
push dateFri, 14 Apr 2017 09:10:41 +0000
treeherdermozilla-central@cda24082bff8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1343718
milestone55.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 1343718 - Avoid requiring an objdir when simply importing mozbuild.artifacts. r=chmanchester
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -62,17 +62,16 @@ import zipfile
 
 import pylru
 from taskgraph.util.taskcluster import (
     find_task_id,
     get_artifact_url,
     list_artifacts,
 )
 
-from mozbuild.action.test_archive import OBJDIR_TEST_FILES
 from mozbuild.util import (
     ensureParentDir,
     FileAvoidWrite,
 )
 import mozinstall
 from mozpack.files import (
     JarFinder,
     TarFinder,
@@ -180,16 +179,17 @@ class ArtifactJob(object):
         if self._symbols_archive_suffix and filename.endswith(self._symbols_archive_suffix):
             return self.process_symbols_archive(filename, processed_filename)
         return self.process_package_artifact(filename, processed_filename)
 
     def process_package_artifact(self, filename, processed_filename):
         raise NotImplementedError("Subclasses must specialize process_package_artifact!")
 
     def process_tests_artifact(self, filename, processed_filename):
+        from mozbuild.action.test_archive import OBJDIR_TEST_FILES
         added_entry = False
 
         with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
             reader = JarReader(filename)
             for filename, entry in reader.entries.iteritems():
                 for pattern, (src_prefix, dest_prefix) in self.test_artifact_patterns:
                     if not mozpath.match(filename, pattern):
                         continue