зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 6ad8793921f4 (bug 1238648) for a bad rebase/merge, breaking media tests
--HG-- extra : commitid : 5aMHn3NafLR extra : rebase_source : b566d4c1a64e76e1a191fd08705f7f5627993cc5
This commit is contained in:
Родитель
dc2dfbe79f
Коммит
ecd307aa40
|
@ -1,3 +0,0 @@
|
||||||
-r marionette_requirements.txt
|
|
||||||
../external-media-tests/
|
|
||||||
../puppeteer/firefox/
|
|
|
@ -12,6 +12,7 @@ config = {
|
||||||
'python': '/tools/buildbot/bin/python',
|
'python': '/tools/buildbot/bin/python',
|
||||||
'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
|
'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
|
||||||
'tooltool.py': "/tools/tooltool.py",
|
'tooltool.py': "/tools/tooltool.py",
|
||||||
|
'gittool.py': os.path.join(external_tools_path, 'gittool.py'),
|
||||||
},
|
},
|
||||||
|
|
||||||
"find_links": [
|
"find_links": [
|
||||||
|
@ -25,6 +26,7 @@ config = {
|
||||||
"default_actions": [
|
"default_actions": [
|
||||||
'clobber',
|
'clobber',
|
||||||
'read-buildbot-config',
|
'read-buildbot-config',
|
||||||
|
'checkout',
|
||||||
'download-and-extract',
|
'download-and-extract',
|
||||||
'create-virtualenv',
|
'create-virtualenv',
|
||||||
'install',
|
'install',
|
||||||
|
@ -37,6 +39,10 @@ config = {
|
||||||
"download_minidump_stackwalk": True,
|
"download_minidump_stackwalk": True,
|
||||||
"download_symbols": "ondemand",
|
"download_symbols": "ondemand",
|
||||||
|
|
||||||
|
"firefox_media_repo": 'https://github.com/mjzffr/firefox-media-tests.git',
|
||||||
|
"firefox_media_branch": 'master',
|
||||||
|
"firefox_media_rev": '0830e972e4b95fef3507207fc6bce028da27f2d3',
|
||||||
|
|
||||||
"suite_definitions": {
|
"suite_definitions": {
|
||||||
"media-tests": {
|
"media-tests": {
|
||||||
"options": [],
|
"options": [],
|
||||||
|
|
|
@ -17,6 +17,8 @@ config = {
|
||||||
'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
|
'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
|
||||||
'%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
|
'%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
|
||||||
'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
|
'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
|
||||||
|
'gittool.py': [sys.executable,
|
||||||
|
os.path.join(external_tools_path, 'gittool.py')],
|
||||||
'hgtool.py': [sys.executable,
|
'hgtool.py': [sys.executable,
|
||||||
os.path.join(external_tools_path, 'hgtool.py')],
|
os.path.join(external_tools_path, 'hgtool.py')],
|
||||||
|
|
||||||
|
@ -34,6 +36,7 @@ config = {
|
||||||
"default_actions": [
|
"default_actions": [
|
||||||
'clobber',
|
'clobber',
|
||||||
'read-buildbot-config',
|
'read-buildbot-config',
|
||||||
|
'checkout',
|
||||||
'download-and-extract',
|
'download-and-extract',
|
||||||
'create-virtualenv',
|
'create-virtualenv',
|
||||||
'install',
|
'install',
|
||||||
|
@ -47,6 +50,10 @@ config = {
|
||||||
"download_minidump_stackwalk": True,
|
"download_minidump_stackwalk": True,
|
||||||
"download_symbols": "ondemand",
|
"download_symbols": "ondemand",
|
||||||
|
|
||||||
|
"firefox_media_repo": 'https://github.com/mjzffr/firefox-media-tests.git',
|
||||||
|
"firefox_media_branch": 'master',
|
||||||
|
"firefox_media_rev": '0830e972e4b95fef3507207fc6bce028da27f2d3',
|
||||||
|
|
||||||
"suite_definitions": {
|
"suite_definitions": {
|
||||||
"media-tests": {
|
"media-tests": {
|
||||||
"options": [],
|
"options": [],
|
||||||
|
|
|
@ -26,6 +26,10 @@ config = {
|
||||||
'download_symbols': 'ondemand',
|
'download_symbols': 'ondemand',
|
||||||
'download_tooltool': True,
|
'download_tooltool': True,
|
||||||
|
|
||||||
|
# Version control information
|
||||||
|
'firefox_media_repo': 'https://github.com/mjzffr/firefox-media-tests.git',
|
||||||
|
'firefox_media_branch': 'master',
|
||||||
|
|
||||||
# Default test suite
|
# Default test suite
|
||||||
'test_suite': 'media-tests',
|
'test_suite': 'media-tests',
|
||||||
|
|
||||||
|
@ -42,6 +46,7 @@ config = {
|
||||||
|
|
||||||
'default_actions': [
|
'default_actions': [
|
||||||
'clobber',
|
'clobber',
|
||||||
|
'checkout',
|
||||||
'download-and-extract',
|
'download-and-extract',
|
||||||
'create-virtualenv',
|
'create-virtualenv',
|
||||||
'install',
|
'install',
|
||||||
|
@ -50,3 +55,18 @@ config = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# General local variable overwrite
|
||||||
|
# Bug 1227079 - Python executable eeded to get it executed on Windows
|
||||||
|
if platform.system() == 'windows':
|
||||||
|
gittool = [
|
||||||
|
sys.executable,
|
||||||
|
os.path.join(external_tools_path, 'gittool.py')
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
gittool = os.path.join(external_tools_path, 'gittool.py')
|
||||||
|
|
||||||
|
exes = {
|
||||||
|
'gittool.py' : gittool,
|
||||||
|
}
|
||||||
|
|
||||||
|
config['exes'] = exes
|
||||||
|
|
|
@ -57,6 +57,20 @@ media_test_config_options = [
|
||||||
"default": False,
|
"default": False,
|
||||||
"help": "Enable e10s when running marionette tests."
|
"help": "Enable e10s when running marionette tests."
|
||||||
}],
|
}],
|
||||||
|
[['--firefox-media-repo'], {
|
||||||
|
'dest': 'firefox_media_repo',
|
||||||
|
'default': 'https://github.com/mjzffr/firefox-media-tests.git',
|
||||||
|
'help': 'which firefox_media_tests repo to use',
|
||||||
|
}],
|
||||||
|
[['--firefox-media-branch'], {
|
||||||
|
'dest': 'firefox_media_branch',
|
||||||
|
'default': 'master',
|
||||||
|
'help': 'which branch to use for firefox_media_tests',
|
||||||
|
}],
|
||||||
|
[['--firefox-media-rev'], {
|
||||||
|
'dest': 'firefox_media_rev',
|
||||||
|
'help': 'which firefox_media_tests revision to use',
|
||||||
|
}],
|
||||||
[["--suite"],
|
[["--suite"],
|
||||||
{"action": "store",
|
{"action": "store",
|
||||||
"dest": "test_suite",
|
"dest": "test_suite",
|
||||||
|
@ -113,6 +127,7 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript):
|
||||||
self.config_options = media_test_config_options + (config_options or [])
|
self.config_options = media_test_config_options + (config_options or [])
|
||||||
actions = [
|
actions = [
|
||||||
'clobber',
|
'clobber',
|
||||||
|
'checkout',
|
||||||
'download-and-extract',
|
'download-and-extract',
|
||||||
'create-virtualenv',
|
'create-virtualenv',
|
||||||
'install',
|
'install',
|
||||||
|
@ -140,60 +155,72 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript):
|
||||||
@PreScriptAction('create-virtualenv')
|
@PreScriptAction('create-virtualenv')
|
||||||
def _pre_create_virtualenv(self, action):
|
def _pre_create_virtualenv(self, action):
|
||||||
dirs = self.query_abs_dirs()
|
dirs = self.query_abs_dirs()
|
||||||
|
marionette_requirements = os.path.join(dirs['abs_test_install_dir'],
|
||||||
|
'config',
|
||||||
|
'marionette_requirements.txt')
|
||||||
|
if os.access(marionette_requirements, os.F_OK):
|
||||||
|
self.register_virtualenv_module(requirements=[marionette_requirements],
|
||||||
|
two_pass=True)
|
||||||
|
|
||||||
media_tests_requirements = os.path.join(dirs['abs_test_install_dir'],
|
media_tests_requirements = os.path.join(dirs['firefox_media_dir'],
|
||||||
'config',
|
'requirements.txt')
|
||||||
'external-media-tests-requirements.txt')
|
|
||||||
|
|
||||||
if os.access(media_tests_requirements, os.F_OK):
|
if os.access(media_tests_requirements, os.F_OK):
|
||||||
self.register_virtualenv_module(requirements=[media_tests_requirements],
|
self.register_virtualenv_module(requirements=[media_tests_requirements],
|
||||||
two_pass=True)
|
two_pass=True)
|
||||||
|
|
||||||
def download_and_extract(self):
|
def download_and_extract(self):
|
||||||
"""Overriding method from TestingMixin for more specific behavior.
|
"""Overriding method from TestingMixin until firefox-media-tests are in tree.
|
||||||
|
|
||||||
We use the test_packages_url command line argument to check where to get the
|
Right now we only care about the installer and symbolds.
|
||||||
harness, puppeteer, and tests from and how to set them up.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
target_unzip_dirs = ['config/*',
|
self._download_installer()
|
||||||
'external-media-tests/*',
|
|
||||||
'marionette/*',
|
if self.config.get('download_symbols'):
|
||||||
'mozbase/*',
|
self._download_and_extract_symbols()
|
||||||
'puppeteer/*',
|
|
||||||
'tools/wptserve/*',
|
|
||||||
]
|
|
||||||
super(FirefoxMediaTestsBase, self).download_and_extract(
|
|
||||||
target_unzip_dirs=target_unzip_dirs)
|
|
||||||
|
|
||||||
def query_abs_dirs(self):
|
def query_abs_dirs(self):
|
||||||
if self.abs_dirs:
|
if self.abs_dirs:
|
||||||
return self.abs_dirs
|
return self.abs_dirs
|
||||||
abs_dirs = super(FirefoxMediaTestsBase, self).query_abs_dirs()
|
abs_dirs = super(FirefoxMediaTestsBase, self).query_abs_dirs()
|
||||||
dirs = {
|
dirs = {
|
||||||
'abs_test_install_dir' : os.path.join(abs_dirs['abs_work_dir'],
|
'firefox_media_dir': os.path.join(abs_dirs['abs_work_dir'],
|
||||||
'tests')
|
'firefox-media-tests')
|
||||||
}
|
}
|
||||||
dirs['external-media-tests'] = os.path.join(dirs['abs_test_install_dir'],
|
dirs['abs_test_install_dir'] = os.path.join(abs_dirs['abs_work_dir'],
|
||||||
'external-media-tests')
|
'tests')
|
||||||
abs_dirs.update(dirs)
|
abs_dirs.update(dirs)
|
||||||
self.abs_dirs = abs_dirs
|
self.abs_dirs = abs_dirs
|
||||||
return self.abs_dirs
|
return self.abs_dirs
|
||||||
|
|
||||||
|
@PreScriptAction('checkout')
|
||||||
|
def _pre_checkout(self, action):
|
||||||
|
super(FirefoxMediaTestsBase, self)._pre_checkout(action)
|
||||||
|
c = self.config
|
||||||
|
dirs = self.query_abs_dirs()
|
||||||
|
self.firefox_media_vc = {
|
||||||
|
'branch': c['firefox_media_branch'],
|
||||||
|
'repo': c['firefox_media_repo'],
|
||||||
|
'dest': dirs['firefox_media_dir'],
|
||||||
|
}
|
||||||
|
if 'firefox-media-rev' in c:
|
||||||
|
self.firefox_media_vc['revision'] = c['firefox_media_rev']
|
||||||
|
|
||||||
|
def checkout(self):
|
||||||
|
self.vcs_checkout(vcs='gittool', **self.firefox_media_vc)
|
||||||
|
|
||||||
def _query_cmd(self):
|
def _query_cmd(self):
|
||||||
""" Determine how to call firefox-media-tests """
|
""" Determine how to call firefox-media-tests """
|
||||||
if not self.binary_path:
|
if not self.binary_path:
|
||||||
self.fatal("Binary path could not be determined. "
|
self.fatal("Binary path could not be determined. "
|
||||||
"Should be set by default during 'install' action.")
|
"Should be set by default during 'install' action.")
|
||||||
dirs = self.query_abs_dirs()
|
dirs = self.query_abs_dirs()
|
||||||
|
venv_python_path = self.query_python_path()
|
||||||
import external_media_harness.runtests
|
runner_script = os.path.join(dirs['firefox_media_dir'],
|
||||||
|
'media_test_harness',
|
||||||
cmd = [
|
'runtests.py')
|
||||||
self.query_python_path(),
|
cmd = [venv_python_path, runner_script]
|
||||||
external_media_harness.runtests.__file__
|
|
||||||
]
|
|
||||||
|
|
||||||
cmd += ['--binary', self.binary_path]
|
cmd += ['--binary', self.binary_path]
|
||||||
if self.symbols_path:
|
if self.symbols_path:
|
||||||
cmd += ['--symbols-path', self.symbols_path]
|
cmd += ['--symbols-path', self.symbols_path]
|
||||||
|
@ -211,8 +238,8 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript):
|
||||||
self.fatal("%s is not defined in the config!" % test_suite)
|
self.fatal("%s is not defined in the config!" % test_suite)
|
||||||
|
|
||||||
test_manifest = None if test_suite != 'media-youtube-tests' else \
|
test_manifest = None if test_suite != 'media-youtube-tests' else \
|
||||||
os.path.join(dirs['external-media-tests'],
|
os.path.join(dirs['firefox_media_dir'],
|
||||||
'external-media-tests',
|
'firefox_media_tests',
|
||||||
'playback', 'youtube', 'manifest.ini')
|
'playback', 'youtube', 'manifest.ini')
|
||||||
config_fmt_args = {
|
config_fmt_args = {
|
||||||
'test_manifest': test_manifest,
|
'test_manifest': test_manifest,
|
||||||
|
|
|
@ -37,6 +37,7 @@ class FirefoxMediaTestsBuildbot(FirefoxMediaTestsBase, BlobUploadMixin):
|
||||||
config_options=config_options,
|
config_options=config_options,
|
||||||
all_actions=['clobber',
|
all_actions=['clobber',
|
||||||
'read-buildbot-config',
|
'read-buildbot-config',
|
||||||
|
'checkout',
|
||||||
'download-and-extract',
|
'download-and-extract',
|
||||||
'create-virtualenv',
|
'create-virtualenv',
|
||||||
'install',
|
'install',
|
||||||
|
|
|
@ -26,6 +26,7 @@ class FirefoxMediaTestsJenkins(FirefoxMediaTestsBase):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(FirefoxMediaTestsJenkins, self).__init__(
|
super(FirefoxMediaTestsJenkins, self).__init__(
|
||||||
all_actions=['clobber',
|
all_actions=['clobber',
|
||||||
|
'checkout',
|
||||||
'download-and-extract',
|
'download-and-extract',
|
||||||
'create-virtualenv',
|
'create-virtualenv',
|
||||||
'install',
|
'install',
|
||||||
|
|
Загрузка…
Ссылка в новой задаче