mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 1372324 - Enable talos tests on linux64-ccov. r=jmaher
This patch enables talos test suites to run on VM (taskcluster) and also enables these test suites to run with GCOV code coverage instrumentation on the linux64-ccov build. MozReview-Commit-ID: 7p59zvra1ge --HG-- extra : rebase_source : 990ebecb9daaee7c5030e08b0d763493103f0fe8
This commit is contained in:
parent
fdc5236783
commit
ad503dd5d3
@ -8,6 +8,7 @@ ac_add_options --disable-crashreporter
|
||||
ac_add_options --disable-elf-hack
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --disable-sandbox
|
||||
ac_add_options --disable-profiling
|
||||
|
||||
MOZ_CODE_COVERAGE=1
|
||||
export CFLAGS="--coverage"
|
||||
|
@ -123,6 +123,7 @@ linux64-ccov/opt:
|
||||
- common-tests
|
||||
- web-platform-tests
|
||||
- awsy
|
||||
- talos
|
||||
- headless
|
||||
linux64-jsdcov/opt:
|
||||
build-platform: linux64-jsdcov/opt
|
||||
|
@ -509,6 +509,16 @@ def enable_code_coverage(config, tests):
|
||||
test['when'] = {}
|
||||
test['instance-size'] = 'xlarge'
|
||||
test['run-on-projects'] = ['mozilla-central']
|
||||
|
||||
if test['test-name'].startswith('talos'):
|
||||
test['max-run-time'] = 7200
|
||||
test['mozharness']['config'] = ['talos/linux64_config_taskcluster.py']
|
||||
test['mozharness']['extra-options'].append('--add-option')
|
||||
test['mozharness']['extra-options'].append('--cycles,1')
|
||||
test['mozharness']['extra-options'].append('--add-option')
|
||||
test['mozharness']['extra-options'].append('--tppagecycles,1')
|
||||
test['mozharness']['extra-options'].append('--add-option')
|
||||
test['mozharness']['extra-options'].append('--no-upload-results')
|
||||
elif test['build-platform'] == 'linux64-jsdcov/opt':
|
||||
test['run-on-projects'] = ['mozilla-central']
|
||||
yield test
|
||||
@ -704,7 +714,7 @@ def set_worker_type(config, tests):
|
||||
else:
|
||||
test['worker-type'] = WINDOWS_WORKER_TYPES[test_platform.split('/')[0]]
|
||||
elif test_platform.startswith('linux') or test_platform.startswith('android'):
|
||||
if test.get('suite', '') == 'talos':
|
||||
if test.get('suite', '') == 'talos' and test['build-platform'] != 'linux64-ccov/opt':
|
||||
if config.config['args'].taskcluster_worker:
|
||||
test['worker-type'] = 'releng-hardware/gecko-t-linux-talos'
|
||||
else:
|
||||
|
@ -0,0 +1,54 @@
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
|
||||
PYTHON = sys.executable
|
||||
VENV_PATH = '%s/build/venv' % os.getcwd()
|
||||
|
||||
if platform.architecture()[0] == '64bit':
|
||||
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux64/releng.manifest"
|
||||
MINIDUMP_STACKWALK_PATH = "linux64-minidump_stackwalk"
|
||||
else:
|
||||
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux32/releng.manifest"
|
||||
MINIDUMP_STACKWALK_PATH = "linux32-minidump_stackwalk"
|
||||
|
||||
exes = {
|
||||
'tooltool.py': ["/builds/tooltool.py"],
|
||||
'python': PYTHON,
|
||||
'virtualenv': [PYTHON, '/usr/local/lib/python2.7/dist-packages/virtualenv.py'],
|
||||
}
|
||||
ABS_WORK_DIR = os.path.join(os.getcwd(), "build")
|
||||
INSTALLER_PATH = os.path.join(ABS_WORK_DIR, "installer.tar.bz2")
|
||||
|
||||
config = {
|
||||
"log_name": "talos",
|
||||
"buildbot_json_path": "buildprops.json",
|
||||
"download_tooltool": True,
|
||||
"installer_path": INSTALLER_PATH,
|
||||
"virtualenv_path": VENV_PATH,
|
||||
"find_links": [
|
||||
"http://pypi.pvt.build.mozilla.org/pub",
|
||||
"http://pypi.pub.build.mozilla.org/pub",
|
||||
],
|
||||
"pip_index": False,
|
||||
"exes": exes,
|
||||
"title": os.uname()[1].lower().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"),
|
||||
"download_minidump_stackwalk": True,
|
||||
"minidump_stackwalk_path": MINIDUMP_STACKWALK_PATH,
|
||||
"minidump_tooltool_manifest_path": TOOLTOOL_MANIFEST_PATH,
|
||||
"tooltool_cache": "/home/worker/tooltool-cache",
|
||||
}
|
@ -29,6 +29,11 @@ from mozharness.mozilla.testing.errors import TinderBoxPrintRe
|
||||
from mozharness.mozilla.buildbot import TBPL_SUCCESS, TBPL_WORST_LEVEL_TUPLE
|
||||
from mozharness.mozilla.buildbot import TBPL_RETRY, TBPL_FAILURE, TBPL_WARNING
|
||||
from mozharness.mozilla.tooltool import TooltoolMixin
|
||||
from mozharness.mozilla.testing.codecoverage import (
|
||||
CodeCoverageMixin,
|
||||
code_coverage_config_options
|
||||
)
|
||||
|
||||
|
||||
scripts_path = os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__)))
|
||||
external_tools_path = os.path.join(scripts_path, 'external_tools')
|
||||
@ -89,7 +94,7 @@ class TalosOutputParser(OutputParser):
|
||||
|
||||
|
||||
class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
|
||||
Python3Virtualenv):
|
||||
Python3Virtualenv, CodeCoverageMixin):
|
||||
"""
|
||||
install and run Talos tests:
|
||||
https://wiki.mozilla.org/Buildbot/Talos
|
||||
@ -137,7 +142,8 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
|
||||
"default": 0,
|
||||
"help": "The interval between samples taken by the profiler (milliseconds)"
|
||||
}],
|
||||
] + testing_config_options + copy.deepcopy(blobupload_config_options)
|
||||
] + testing_config_options + copy.deepcopy(blobupload_config_options) \
|
||||
+ copy.deepcopy(code_coverage_config_options)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
kwargs.setdefault('config_options', self.config_options)
|
||||
@ -581,7 +587,7 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
|
||||
tbpl_level = TBPL_RETRY
|
||||
|
||||
parser.update_worst_log_and_tbpl_levels(log_level, tbpl_level)
|
||||
else:
|
||||
elif '--no-upload-results' not in options:
|
||||
if not self.gecko_profile:
|
||||
self._validate_treeherder_data(parser)
|
||||
if not self.run_local:
|
||||
|
@ -165,6 +165,9 @@ def create_parser(mach_interface=False):
|
||||
help="print available tests")
|
||||
add_arg('--print-suites', action=_ListSuite,
|
||||
help="list available suites")
|
||||
add_arg('--no-upload-results', action="store_true",
|
||||
dest='no_upload_results',
|
||||
help="If given, it disables uploading of talos results.")
|
||||
|
||||
add_logging_group(parser)
|
||||
return parser
|
||||
|
@ -431,6 +431,7 @@ def get_browser_config(config):
|
||||
'test_timeout': 1200,
|
||||
'xperf_path': None,
|
||||
'error_filename': None,
|
||||
'no_upload_results': False,
|
||||
}
|
||||
browser_config = dict(title=config['title'])
|
||||
browser_config.update(dict([(i, config[i]) for i in required]))
|
||||
|
@ -287,7 +287,7 @@ def run_tests(config, browser_config):
|
||||
mitmproxy.stop_mitmproxy_playback(mitmproxy_proc)
|
||||
|
||||
# output results
|
||||
if results_urls:
|
||||
if results_urls and not browser_config['no_upload_results']:
|
||||
talos_results.output(results_urls)
|
||||
if browser_config['develop'] or config['gecko_profile']:
|
||||
print("Thanks for running Talos locally. Results are in %s"
|
||||
|
Loading…
x
Reference in New Issue
Block a user