Bug 1334093 - Test jobs should always extract the mach script and mozinfo.json from common.tests.zip.
Because the mach script can be used to trigger a couple of different test jobs, it would be great
to extract it by default. The same applies to mozinfo.json, which contains build information to be
used in eg. the manifestparser to conditionally skip builds.
MozReview-Commit-ID: ESwi0EtRnO2
--- a/testing/mozharness/mozharness/mozilla/testing/testbase.py
+++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py
@@ -460,20 +460,33 @@ 2. running via buildbot and running the
# has everything we need to run tests for this suite.
target_packages = package_requirements['common']
self.info("Downloading packages: %s for test suite category: %s" %
(target_packages, category))
for file_name in target_packages:
target_dir = test_install_dir
unpack_dirs = extract_dirs
+
+ if "common.tests" in file_name and isinstance(unpack_dirs, list):
+ # Ensure that the following files are always getting extracted
+ required_files = ["mach",
+ "mozinfo.json",
+ ]
+ for req_file in required_files:
+ if req_file not in unpack_dirs:
+ self.info("Adding '{}' for extraction from common.tests zip file"
+ .format(req_file))
+ unpack_dirs.append(req_file)
+
if "jsshell-" in file_name or file_name == "target.jsshell.zip":
self.info("Special-casing the jsshell zip file")
unpack_dirs = None
target_dir = dirs['abs_test_bin_dir']
+
url = self.query_build_dir_url(file_name)
self.download_unpack(url, target_dir,
extract_dirs=unpack_dirs)
def _download_test_zip(self, extract_dirs=None):
dirs = self.query_abs_dirs()
test_install_dir = dirs.get('abs_test_install_dir',
os.path.join(dirs['abs_work_dir'], 'tests'))