From ca27308a267472f2eb19a05092d65fdf1948ff01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tudor-Gabriel=20V=C3=AEjial=C4=83?= Date: Thu, 12 Jul 2018 15:18:27 +0100 Subject: [PATCH] Bug 1474575 - Use the fetch-content script to download grcov for A(test-ccov) builds. r=marco MozReview-Commit-ID: 5AJ2R72eDjN --HG-- extra : rebase_source : 57aacc2d1eee39fdbf927602da67fbd0baa62e87 --- mobile/android/mach_commands.py | 15 +++++---------- taskcluster/ci/build/android-stuff.yml | 2 ++ taskcluster/ci/build/kind.yml | 2 ++ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/mobile/android/mach_commands.py b/mobile/android/mach_commands.py index a14b9bf90bcc..40e3c7acf201 100755 --- a/mobile/android/mach_commands.py +++ b/mobile/android/mach_commands.py @@ -9,8 +9,6 @@ import logging import os import shutil import subprocess -import tarfile -import urllib import zipfile import mozpack.path as mozpath @@ -224,14 +222,11 @@ class MachCommands(MachCommandBase): def _process_jacoco_reports(self): def download_grcov(parent_dir): - # TODO: Bug 1472236 - Remove this and use fetch tasks to download grcov. - grcov_version = "v0.2.1" - tar_name = 'grcov.tar.bz2' - tar_path = os.path.join(parent_dir, tar_name) - url = 'https://github.com/mozilla/grcov/releases/download/%s/grcov-linux-x86_64.tar.bz2' % grcov_version # NOQA: E501 - urllib.urlretrieve(url, tar_path) - with tarfile.open(tar_path) as tar: - tar.extractall(parent_dir) + fetch_script_path = os.path.join(self.topsrcdir, 'taskcluster', 'scripts', 'misc', + 'fetch-content') + args = [fetch_script_path, 'task-artifacts', os.environ['MOZ_FETCHES'], + '-d', parent_dir] + self.run_process(args, ensure_exit_code=True) return os.path.join(parent_dir, 'grcov') def run_grcov(grcov_path, input_path): diff --git a/taskcluster/ci/build/android-stuff.yml b/taskcluster/ci/build/android-stuff.yml index cb3bb3cdbc3d..744bf2a1a8e0 100644 --- a/taskcluster/ci/build/android-stuff.yml +++ b/taskcluster/ci/build/android-stuff.yml @@ -79,6 +79,8 @@ android-test-ccov/opt: toolchains: - android-gradle-dependencies - android-sdk-linux + fetches: + - grcov-linux-x86_64 android-lint/opt: description: "Android lint" diff --git a/taskcluster/ci/build/kind.yml b/taskcluster/ci/build/kind.yml index 10c44b8eb056..cc00da66a183 100644 --- a/taskcluster/ci/build/kind.yml +++ b/taskcluster/ci/build/kind.yml @@ -6,12 +6,14 @@ loader: taskgraph.loader.transform:loader kind-dependencies: - toolchain + - fetch transforms: - taskgraph.transforms.build:transforms - taskgraph.transforms.build_attrs:transforms - taskgraph.transforms.build_lints:transforms - taskgraph.transforms.use_toolchains:transforms + - taskgraph.transforms.use_fetches:transforms - taskgraph.transforms.job:transforms - taskgraph.transforms.task:transforms