☠☠ backed out by cda7c3e91ad7 ☠ ☠ | |
author | Gregory Szorc <gps@mozilla.com> |
Wed, 21 Sep 2016 10:57:08 -0700 | |
changeset 316398 | 43df1e962f8e833babb0bf1d71fc33d77be9f0a9 |
parent 316397 | 6ed46e8ac86c2347c7f78d53cc04595b35f40752 |
child 316399 | 2de97e3cfcb3aad58312dc4e27be960025a312a6 |
push id | 30770 |
push user | kwierso@gmail.com |
push date | Wed, 05 Oct 2016 00:00:48 +0000 |
treeherder | mozilla-central@3470e326025c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | ted |
bugs | 1286900 |
milestone | 52.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
|
--- a/testing/mozharness/mozharness/mozilla/testing/testbase.py +++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py @@ -4,28 +4,30 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # ***** END LICENSE BLOCK ***** import copy import os import platform import pprint -import re import urllib2 import json import socket from mozharness.base.errors import BaseErrorList from mozharness.base.log import FATAL, WARNING from mozharness.base.python import ( ResourceMonitoringMixin, VirtualenvMixin, virtualenv_config_options, ) +from mozharness.base.vcs.vcsbase import ( + VCSMixin, +) from mozharness.mozilla.buildbot import BuildbotMixin, TBPL_WARNING from mozharness.mozilla.proxxy import Proxxy from mozharness.mozilla.structuredlog import StructuredOutputParser from mozharness.mozilla.taskcluster_helper import TaskClusterArtifactFinderMixin from mozharness.mozilla.testing.unittest import DesktopUnittestOutputParser from mozharness.mozilla.testing.try_tools import TryToolsMixin, try_config_options from mozharness.mozilla.tooltool import TooltoolMixin @@ -97,17 +99,18 @@ testing_config_options = [ "choices": ['ondemand', 'true'], "help": "Download and extract crash reporter symbols.", }], ] + copy.deepcopy(virtualenv_config_options) + copy.deepcopy(try_config_options) # TestingMixin {{{1 class TestingMixin(VirtualenvMixin, BuildbotMixin, ResourceMonitoringMixin, - TaskClusterArtifactFinderMixin, TooltoolMixin, TryToolsMixin): + TaskClusterArtifactFinderMixin, TooltoolMixin, TryToolsMixin, + VCSMixin): """ The steps to identify + download the proper bits for [browser] unit tests and Talos. """ installer_url = None installer_path = None binary_path = None @@ -115,16 +118,65 @@ class TestingMixin(VirtualenvMixin, Buil test_packages_url = None symbols_url = None symbols_path = None jsshell_url = None minidump_stackwalk_path = None default_tools_repo = 'https://hg.mozilla.org/build/tools' proxxy = None + def query_abs_dirs(self): + dirs = super(TestingMixin, self).query_abs_dirs() + + if self.topsrcdir: + dirs['checkout'] = self.topsrcdir + else: + dirs['checkout'] = os.path.join(dirs['base_work_dir'], 'checkout') + + if 'HG_SHARE_BASE_DIR' in os.environ: + dirs['hg_shared'] = os.environ['HG_SHARE_BASE_DIR'] + else: + dirs['hg_shared'] = os.path.join(dirs['base_work_dir'], 'hg-shared') + + return dirs + + def ensure_firefox_checkout(self): + """Action that ensures we have a source checkout available. + + If a source checkout is not available, we create one. + """ + if self.topsrcdir: + self.info('already running from a source checkout; nothing to do') + return + + self.info('not running from source checkout') + + bb_config = getattr(self, 'buildbot_config', None) + if not bb_config: + self.fatal('buildbot config not loaded; unable to proceed ' + '(a buildbot config must be loaded to obtain VCS info)') + + bb_props = bb_config['properties'] + + dirs = self.query_abs_dirs() + + args = { + 'repo': 'https://hg.mozilla.org/%s' % bb_props['repo_path'], + 'dest': dirs['checkout'], + 'vcs_share_base': dirs['hg_shared'], + 'revision': bb_props['revision'], + 'clone_with_purge': True, + # Always use the unified repo as the upstream because it is + # stored more efficiently. + 'clone_upstream_url': 'https://hg.mozilla.org/mozilla-unified', + } + + self.vcs_checkout(vcs='hg', **args) + self.topsrcdir = dirs['checkout'] + def _query_proxxy(self): """manages the proxxy""" if not self.proxxy: self.proxxy = Proxxy(self.config, self.log_obj) return self.proxxy def download_proxied_file(self, url, file_name=None, parent_dir=None, create_parent_dir=True, error_level=FATAL,
--- a/testing/mozharness/scripts/web_platform_tests.py +++ b/testing/mozharness/scripts/web_platform_tests.py @@ -53,16 +53,17 @@ class WebPlatformTest(TestingMixin, Merc copy.deepcopy(blobupload_config_options) def __init__(self, require_config_file=True): super(WebPlatformTest, self).__init__( config_options=self.config_options, all_actions=[ 'clobber', 'read-buildbot-config', + 'ensure-firefox-checkout', 'download-and-extract', 'fetch-geckodriver', 'create-virtualenv', 'pull', 'install', 'run-tests', ], require_config_file=require_config_file,