Bug 1369537 - preparing for talos on tc win vm; r?jmaher
MozReview-Commit-ID: KZbPBClEzHI
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/talos/windows_vm_config.py
@@ -0,0 +1,59 @@
+import os
+import socket
+import sys
+
+PYTHON = sys.executable
+PYTHON_DLL = 'c:/mozilla-build/python27/python27.dll'
+VENV_PATH = os.path.join(os.getcwd(), 'build/venv')
+
+config = {
+ "log_name": "talos",
+ "buildbot_json_path": "buildprops.json",
+ "installer_path": "installer.exe",
+ "virtualenv_path": VENV_PATH,
+ "virtualenv_python_dll": PYTHON_DLL,
+ "pip_index": False,
+ "find_links": [
+ "http://pypi.pvt.build.mozilla.org/pub",
+ "http://pypi.pub.build.mozilla.org/pub",
+ ],
+ "virtualenv_modules": ['pywin32', 'talos', 'mozinstall'],
+ "exes": {
+ 'python': PYTHON,
+ 'virtualenv': [PYTHON, os.path.join(os.path.dirname(sys.executable), 'Lib', 'site-packages', 'virtualenv.py')],
+ 'easy_install': ['%s/scripts/python' % VENV_PATH,
+ '%s/scripts/easy_install-2.7-script.py' % VENV_PATH],
+ 'mozinstall': ['%s/scripts/python' % VENV_PATH,
+ '%s/scripts/mozinstall-script.py' % VENV_PATH],
+ 'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg'),
+ 'tooltool.py': [PYTHON, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
+ },
+ "title": socket.gethostname().split('.')[0],
+ "default_actions": [
+ "clobber",
+ "read-buildbot-config",
+ "download-and-extract",
+ "populate-webroot",
+ "create-virtualenv",
+ "install",
+ "setup-mitmproxy",
+ "run-tests",
+ ],
+ "default_blob_upload_servers": [
+ "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",
+ },
+ "env": {
+ # python3 requires C runtime, found in firefox installation; see bug 1361732
+ "PATH": "%(PATH)s;c:\\slave\\test\\build\\application\\firefox;"
+ }
+}
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -137,16 +137,22 @@ class Talos(TestingMixin, MercurialScrip
"help": "Whether or not to profile the test run and save the profile results"
}],
[["--geckoProfileInterval"], {
"dest": "gecko_profile_interval",
"type": "int",
"default": 0,
"help": "The interval between samples taken by the profiler (milliseconds)"
}],
+ [["--e10s"], {
+ "dest": "e10s",
+ "action": "store_true",
+ "default": False,
+ "help": "we should have --disable-e10s, but instead we assume non-e10s and use --e10s to help"
+ }],
[["--enable-stylo"], {
"action": "store_true",
"dest": "enable_stylo",
"default": False,
"help": "Run tests with Stylo enabled"
}],
[["--disable-stylo"], {
"action": "store_true",
@@ -324,16 +330,18 @@ class Talos(TestingMixin, MercurialScrip
options = []
# talos can't gather data if the process name ends with '.exe'
if binary_path.endswith('.exe'):
binary_path = binary_path[:-4]
# options overwritten from **kw
kw_options = {'executablePath': binary_path}
if 'suite' in self.config:
kw_options['suite'] = self.config['suite']
+ if self.config.get('e10s', False):
+ kw_options['suite'] = "%s-e10s" % self.config['suite']
if self.config.get('title'):
kw_options['title'] = self.config['title']
if self.config.get('branch'):
kw_options['branchName'] = self.config['branch']
if self.symbols_path:
kw_options['symbolsPath'] = self.symbols_path
# if using mitmproxy, we've already created a py3 venv just
# for it; need to add the path to that env/mitdump tool
@@ -366,17 +374,17 @@ class Talos(TestingMixin, MercurialScrip
def populate_webroot(self):
"""Populate the production test slaves' webroots"""
self.talos_path = os.path.join(
self.query_abs_dirs()['abs_work_dir'], 'tests', 'talos'
)
# need to determine if talos pageset is required to be downloaded
- if self.config.get('run_local'):
+ if self.config.get('run_local') and 'talos_extra_options' in self.config:
# talos initiated locally, get and verify test/suite from cmd line
self.talos_path = os.path.dirname(self.talos_json)
if '-a' in self.config['talos_extra_options'] or '--activeTests' in self.config['talos_extra_options']:
# test name (-a or --activeTests) specified, find out what suite it is a part of
self.suite = self.get_suite_from_test()
elif '--suite' in self.config['talos_extra_options']:
# --suite specified, get suite from cmd line and ensure is valid
suite_name_index = self.config['talos_extra_options'].index('--suite') + 1
@@ -387,17 +395,17 @@ class Talos(TestingMixin, MercurialScrip
self.fatal("Suite name not provided")
else:
# talos initiated in production via mozharness
self.suite = self.config['suite']
# now that have the suite name, check if pageset is required, if so download it
# the --no-download option will override this
if self.query_pagesets_name():
- if '--no-download' not in self.config['talos_extra_options']:
+ if '--no-download' not in self.config.get('talos_extra_options', []):
self.info("Downloading pageset with tooltool...")
self.src_talos_webdir = os.path.join(self.talos_path, 'talos')
src_talos_pageset = os.path.join(self.src_talos_webdir, 'tests')
manifest_file = os.path.join(self.talos_path, 'tp5n-pageset.manifest')
self.tooltool_fetch(
manifest_file,
output_dir=src_talos_pageset,
cache=self.config.get('tooltool_cache')
@@ -444,18 +452,18 @@ class Talos(TestingMixin, MercurialScrip
self.py3_create_venv()
requirements = [os.path.join(self.talos_path, 'talos', 'mitmproxy', 'mitmproxy_requirements.txt')]
self.py3_install_requirement_files(requirements)
# add py3 executables path to system path
sys.path.insert(1, self.py3_path_to_executables())
def install_mitmproxy(self):
"""Install the mitmproxy tool into the Python 3.x env"""
+ self.info("Installing mitmproxy")
if 'win' in self.platform_name():
- self.info("Installing mitmproxy")
self.py3_install_modules(modules=['mitmproxy'])
self.mitmdump = os.path.join(self.py3_path_to_executables(), 'mitmdump')
else:
# on macosx and linux64 we use a prebuilt mitmproxy release binary
mitmproxy_path = os.path.join(self.talos_path, 'talos', 'mitmproxy')
self.mitmdump = os.path.join(mitmproxy_path, 'mitmdump')
if not os.path.exists(self.mitmdump):
# download the mitmproxy release binary; will be overridden by the --no-download