Bug 1361462 - Python3 support for Mozharness
This adds support for fetching Python3 zip files
for Talos for Windows 32-bit and 64-bit.
MozReview-Commit-ID: KpYXQrfwRBY
--- a/testing/mozharness/configs/talos/windows_config.py
+++ b/testing/mozharness/configs/talos/windows_config.py
@@ -41,9 +41,13 @@ config = {
"https://blobupload.elasticbeanstalk.com",
],
"blob_uploader_auth_file": os.path.join(os.getcwd(), "oauth.txt"),
"metro_harness_path_frmt": "%(metro_base_path)s/metro/metrotestharness.exe",
"download_minidump_stackwalk": True,
"tooltool_cache": os.path.join('c:\\', 'build', 'tooltool_cache'),
"minidump_stackwalk_path": "win32-minidump_stackwalk.exe",
"minidump_tooltool_manifest_path": "config/tooltool-manifests/win32/releng.manifest",
+ "python3_manifest": {
+ "win32": "python3.manifest",
+ "win64": "python3_x64.manifest",
+ }
}
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -489,8 +489,25 @@ class Talos(TestingMixin, MercurialScrip
self._validate_treeherder_data(parser)
if not self.run_local:
# copy results to upload dir so they are included as an artifact
dest = os.path.join(env['MOZ_UPLOAD_DIR'], 'perfherder-data.json')
self._artifact_perf_data(dest)
self.buildbot_status(parser.worst_tbpl_status,
level=parser.worst_log_level)
+
+ def fetch_python3(self):
+ manifest_file = os.path.join(
+ self.query_abs_dirs()['base_work_dir'],
+ '..',
+ 'talos',
+ self.config['python3_manifest'][self.platform_name()])
+ output_dir = self.query_abs_dirs()['abs_work_dir']
+ # Slowdown: The unzipped Python3 installation gets deleted every time
+ self.tooltool_fetch(
+ manifest_file,
+ output_dir=output_dir,
+ cache=self.config['tooltool_cache']
+ )
+ python3_path = os.path.join(output_dir, 'python3.6', 'python')
+ self.run_command([python3_path, '--version'])
+ return python3_path
new file mode 100644
--- /dev/null
+++ b/testing/talos/python3.manifest
@@ -0,0 +1,10 @@
+[
+ {
+ "size": 15380470,
+ "visibility": "public",
+ "digest": "cd78b88d95b69bef99d7192b71dd34118700f44db0a0069a13bfd4943b131e8d7fdac83859f8ac15d873d4b329eef69d8d75d0a6746d06fdcfc5d06da0c9784c",
+ "algorithm": "sha512",
+ "unpack": true,
+ "filename": "python3.6.zip"
+ }
+]
new file mode 100644
--- /dev/null
+++ b/testing/talos/python3_x64.manifest
@@ -0,0 +1,10 @@
+[
+ {
+ "size": 16026760,
+ "visibility": "public",
+ "digest": "379428e3955671213a245ccd9ccf6f9d17d368db68c02da8baed7be629f2691127cd3e3f86807b25e2098d9840083fdc07946ab1bed0c14db4a5b628a47ed9ef",
+ "algorithm": "sha512",
+ "unpack": true,
+ "filename": "python3.6.amd64.zip"
+ }
+]