mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1581632 - Remove Fennec-specific support from mozharness scripts and configs; r=bc
We no longer run robocop, marionette, or mochitest-chrome on Android and can remove the associated support. Incidentally, removal of mochitest-chrome support fixes bug 1578256. Differential Revision: https://phabricator.services.mozilla.com/D46073 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
6c5244b7a9
commit
7c83713d7e
@ -1,7 +1,7 @@
|
||||
# Shared/common mozharness configuration for Android unit tests.
|
||||
#
|
||||
# This configuration should be combined with platform-specific mozharness
|
||||
# configuration such as androidarm_4_3.py, or similar.
|
||||
# configuration such as androidx86_7_0.py, android_hw, or similar.
|
||||
|
||||
import os
|
||||
|
||||
@ -50,8 +50,6 @@ config = {
|
||||
"log_tbpl_level": "info",
|
||||
"log_raw_level": "info",
|
||||
"minidump_stackwalk_path": "linux64-minidump_stackwalk",
|
||||
"marionette_address": "localhost:2828",
|
||||
"marionette_test_manifest": "unit-tests.ini",
|
||||
# To take device screenshots at timed intervals (each time in seconds, relative
|
||||
# to the start of the run-tests step) specify screenshot_times. For example, to
|
||||
# take 4 screenshots at one minute intervals you could specify:
|
||||
@ -86,30 +84,6 @@ config = {
|
||||
"mochitest-webgl1-ext": WebglSuite("webgl1-ext"),
|
||||
"mochitest-webgl2-ext": WebglSuite("webgl2-ext"),
|
||||
"mochitest-webgl2-deqp": WebglSuite("webgl2-deqp"),
|
||||
"mochitest-chrome": {
|
||||
"run_filename": "runtestsremote.py",
|
||||
"testsdir": "mochitest",
|
||||
"options": [
|
||||
"--app=%(app)s",
|
||||
"--remote-webserver=%(remote_webserver)s",
|
||||
"--xre-path=%(xre_path)s",
|
||||
"--utility-path=%(utility_path)s",
|
||||
"--http-port=%(http_port)s",
|
||||
"--ssl-port=%(ssl_port)s",
|
||||
"--certificate-path=%(certs_path)s",
|
||||
"--symbols-path=%(symbols_path)s",
|
||||
"--quiet",
|
||||
"--log-raw=%(raw_log_file)s",
|
||||
"--log-raw-level=%(log_raw_level)s",
|
||||
"--log-errorsummary=%(error_summary_file)s",
|
||||
"--log-tbpl-level=%(log_tbpl_level)s",
|
||||
"--extra-profile-file=fonts",
|
||||
"--extra-profile-file=hyphenation",
|
||||
"--screenshot-on-fail",
|
||||
"--flavor=chrome",
|
||||
"--deviceSerial=%(device_serial)s",
|
||||
],
|
||||
},
|
||||
"mochitest-plain-gpu": {
|
||||
"run_filename": "runtestsremote.py",
|
||||
"testsdir": "mochitest",
|
||||
@ -155,25 +129,6 @@ config = {
|
||||
"--deviceSerial=%(device_serial)s",
|
||||
],
|
||||
},
|
||||
"robocop": {
|
||||
"run_filename": "runrobocop.py",
|
||||
"testsdir": "mochitest",
|
||||
"options": [
|
||||
"--app=%(app)s",
|
||||
"--remote-webserver=%(remote_webserver)s",
|
||||
"--xre-path=%(xre_path)s",
|
||||
"--utility-path=%(utility_path)s",
|
||||
"--certificate-path=%(certs_path)s",
|
||||
"--symbols-path=%(symbols_path)s",
|
||||
"--quiet",
|
||||
"--log-raw=%(raw_log_file)s",
|
||||
"--log-raw-level=%(log_raw_level)s",
|
||||
"--log-errorsummary=%(error_summary_file)s",
|
||||
"--log-tbpl-level=%(log_tbpl_level)s",
|
||||
"--robocop-apk=../../robocop.apk",
|
||||
"--deviceSerial=%(device_serial)s",
|
||||
],
|
||||
},
|
||||
"reftest": {
|
||||
"run_filename": "remotereftest.py",
|
||||
"testsdir": "reftest",
|
||||
@ -293,27 +248,6 @@ config = {
|
||||
"--log-errorsummary=%(error_summary_file)s",
|
||||
],
|
||||
},
|
||||
"marionette": {
|
||||
"run_filename": os.path.join("harness", "marionette_harness", "runtests.py"),
|
||||
"testsdir": "marionette",
|
||||
"options": [
|
||||
"--app=fennec",
|
||||
"--package=%(app)s",
|
||||
"--address=%(address)s",
|
||||
"%(test_manifest)s",
|
||||
"--disable-e10s",
|
||||
"--gecko-log=%(gecko_log)s",
|
||||
"-vv",
|
||||
"--log-raw=%(raw_log_file)s",
|
||||
"--log-raw-level=%(log_raw_level)s",
|
||||
"--log-errorsummary=%(error_summary_file)s",
|
||||
"--log-tbpl-level=%(log_tbpl_level)s",
|
||||
"--symbols-path=%(symbols_path)s",
|
||||
"--startup-timeout=300",
|
||||
"--device=%(device_serial)s",
|
||||
"%(marionette_extra)s",
|
||||
],
|
||||
},
|
||||
"geckoview-junit": {
|
||||
"run_filename": "runjunit.py",
|
||||
"testsdir": "mochitest",
|
||||
|
@ -4,8 +4,6 @@
|
||||
# mozharness configuration from android_common.py, or similar.
|
||||
|
||||
config = {
|
||||
"robocop_package_name": "org.mozilla.roboexample.test",
|
||||
"marionette_address": "%(device_ip)s:2828",
|
||||
"exes": {},
|
||||
"env": {
|
||||
"DISPLAY": ":0.0",
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
config = {
|
||||
"deprecated_sdk_path": True,
|
||||
"robocop_package_name": "org.mozilla.roboexample.test",
|
||||
"tooltool_manifest_path": "testing/config/tooltool-manifests/androidarm_4_3/releng.manifest",
|
||||
"emulator_manifest": """
|
||||
[
|
||||
@ -29,7 +28,6 @@ config = {
|
||||
"PATH": "%(PATH)s:%(abs_work_dir)s/android-sdk-linux/tools:%(abs_work_dir)s/android-sdk-linux/platform-tools",
|
||||
"MINIDUMP_SAVEPATH": "%(abs_work_dir)s/../minidumps"
|
||||
},
|
||||
"marionette_extra": "--emulator",
|
||||
"bogomips_minimum": 250,
|
||||
# in support of test-verify
|
||||
"android_version": 18,
|
||||
|
@ -31,7 +31,6 @@ config = {
|
||||
"MINIDUMP_SAVEPATH": "%(abs_work_dir)s/../minidumps",
|
||||
# "LIBGL_DEBUG": "verbose"
|
||||
},
|
||||
"marionette_extra": "--emulator",
|
||||
"bogomips_minimum": 3000,
|
||||
# in support of test-verify
|
||||
"android_version": 24,
|
||||
|
@ -28,7 +28,6 @@ config = {
|
||||
"MINIDUMP_SAVEPATH": "%(abs_work_dir)s/../minidumps",
|
||||
# "LIBGL_DEBUG": "verbose"
|
||||
},
|
||||
"marionette_extra": "--emulator",
|
||||
"bogomips_minimum": 3000,
|
||||
# in support of test-verify
|
||||
"android_version": 24,
|
||||
|
@ -15,7 +15,7 @@ import subprocess
|
||||
# load modules from parent dir
|
||||
sys.path.insert(1, os.path.dirname(sys.path[0]))
|
||||
|
||||
from mozharness.base.log import WARNING, FATAL
|
||||
from mozharness.base.log import WARNING
|
||||
from mozharness.base.script import BaseScript, PreScriptAction
|
||||
from mozharness.mozilla.automation import TBPL_RETRY
|
||||
from mozharness.mozilla.mozbase import MozbaseMixin
|
||||
@ -26,7 +26,7 @@ from mozharness.mozilla.testing.codecoverage import (
|
||||
code_coverage_config_options
|
||||
)
|
||||
|
||||
SUITE_DEFAULT_E10S = ['geckoview-junit', 'mochitest', 'reftest', 'robocop']
|
||||
SUITE_DEFAULT_E10S = ['geckoview-junit', 'mochitest', 'reftest']
|
||||
SUITE_NO_E10S = ['cppunittest', 'geckoview-junit', 'xpcshell']
|
||||
SUITE_REPEATABLE = ['mochitest', 'reftest']
|
||||
|
||||
@ -136,13 +136,11 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
||||
|
||||
# these are necessary since self.config is read only
|
||||
c = self.config
|
||||
abs_dirs = self.query_abs_dirs()
|
||||
self.installer_url = c.get('installer_url')
|
||||
self.installer_path = c.get('installer_path')
|
||||
self.test_url = c.get('test_url')
|
||||
self.test_packages_url = c.get('test_packages_url')
|
||||
self.test_manifest = c.get('test_manifest')
|
||||
self.robocop_path = os.path.join(abs_dirs['abs_work_dir'], "robocop.apk")
|
||||
suite = c.get('test_suite')
|
||||
if suite and '-chunked' in suite:
|
||||
suite = suite[:suite.index('-chunked')]
|
||||
@ -182,11 +180,6 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
||||
dirs['abs_test_install_dir'], 'reftest')
|
||||
dirs['abs_xpcshell_dir'] = os.path.join(
|
||||
dirs['abs_test_install_dir'], 'xpcshell')
|
||||
dirs['abs_marionette_dir'] = os.path.join(
|
||||
dirs['abs_test_install_dir'], 'marionette', 'harness', 'marionette_harness')
|
||||
dirs['abs_marionette_tests_dir'] = os.path.join(
|
||||
dirs['abs_test_install_dir'], 'marionette', 'tests', 'testing',
|
||||
'marionette', 'harness', 'marionette_harness', 'tests')
|
||||
dirs['abs_avds_dir'] = self.config.get("avds_dir", "/home/cltbld/.android")
|
||||
|
||||
for key in dirs.keys():
|
||||
@ -249,15 +242,7 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
||||
'log_tbpl_level': self.log_tbpl_level,
|
||||
'log_raw_level': self.log_raw_level,
|
||||
'error_summary_file': error_summary_file,
|
||||
'gecko_log': '-',
|
||||
# marionette options
|
||||
'address': c.get('marionette_address'),
|
||||
'marionette_extra': c.get('marionette_extra', ''),
|
||||
'xpcshell_extra': c.get('xpcshell_extra', ''),
|
||||
'test_manifest': os.path.join(
|
||||
dirs['abs_marionette_tests_dir'],
|
||||
self.config.get('marionette_test_manifest', '')
|
||||
),
|
||||
'gtest_dir': os.path.join(dirs['abs_test_install_dir'], 'gtest'),
|
||||
}
|
||||
|
||||
@ -336,7 +321,6 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
||||
# For each test category, provide a list of supported sub-suites and a mapping
|
||||
# between the per_test_base suite name and the android suite name.
|
||||
all = [('mochitest', {'mochitest-plain': 'mochitest-plain',
|
||||
'mochitest-chrome': 'mochitest-chrome',
|
||||
'mochitest-media': 'mochitest-media',
|
||||
'mochitest-plain-gpu': 'mochitest-plain-gpu'}),
|
||||
('reftest', {'reftest': 'reftest',
|
||||
@ -376,24 +360,17 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
||||
requirements = os.path.join(dirs['abs_mochitest_dir'],
|
||||
'websocketprocessbridge',
|
||||
'websocketprocessbridge_requirements.txt')
|
||||
elif ('marionette', 'marionette') in suites:
|
||||
requirements = os.path.join(dirs['abs_test_install_dir'],
|
||||
'config', 'marionette_requirements.txt')
|
||||
if requirements:
|
||||
self.register_virtualenv_module(requirements=[requirements],
|
||||
two_pass=True)
|
||||
|
||||
def download_and_extract(self):
|
||||
"""
|
||||
Download and extract fennec APK, tests.zip, host utils, and robocop (if required).
|
||||
Download and extract product APK, tests.zip, and host utils.
|
||||
"""
|
||||
super(AndroidEmulatorTest, self).download_and_extract(
|
||||
suite_categories=self._query_suite_categories())
|
||||
dirs = self.query_abs_dirs()
|
||||
if self.test_suite and self.test_suite.startswith('robocop'):
|
||||
robocop_url = self.installer_url[:self.installer_url.rfind('/')] + '/robocop.apk'
|
||||
self.info("Downloading robocop...")
|
||||
self.download_file(robocop_url, 'robocop.apk', dirs['abs_work_dir'], error_level=FATAL)
|
||||
self.xre_path = self.download_hostutils(dirs['abs_xre_dir'])
|
||||
|
||||
def install(self):
|
||||
@ -408,9 +385,6 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
||||
assert self.installer_path is not None, \
|
||||
"Either add installer_path to the config or use --installer-path."
|
||||
self.install_apk(self.installer_path)
|
||||
# Install Robocop if required
|
||||
if self.test_suite and self.test_suite.startswith('robocop'):
|
||||
self.install_apk(self.robocop_path)
|
||||
self.info("Finished installing apps for %s" % self.device_serial)
|
||||
|
||||
def run_tests(self):
|
||||
|
@ -15,7 +15,7 @@ import subprocess
|
||||
# load modules from parent dir
|
||||
sys.path.insert(1, os.path.dirname(sys.path[0]))
|
||||
|
||||
from mozharness.base.log import WARNING, FATAL
|
||||
from mozharness.base.log import WARNING
|
||||
from mozharness.base.script import BaseScript, PreScriptAction
|
||||
from mozharness.mozilla.automation import TBPL_RETRY
|
||||
from mozharness.mozilla.mozbase import MozbaseMixin
|
||||
@ -125,13 +125,11 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
||||
|
||||
# these are necessary since self.config is read only
|
||||
c = self.config
|
||||
abs_dirs = self.query_abs_dirs()
|
||||
self.installer_url = c.get('installer_url')
|
||||
self.installer_path = c.get('installer_path')
|
||||
self.test_url = c.get('test_url')
|
||||
self.test_packages_url = c.get('test_packages_url')
|
||||
self.test_manifest = c.get('test_manifest')
|
||||
self.robocop_path = os.path.join(abs_dirs['abs_work_dir'], "robocop.apk")
|
||||
suite = c.get('test_suite')
|
||||
if suite and '-chunked' in suite:
|
||||
suite = suite[:suite.index('-chunked')]
|
||||
@ -166,11 +164,6 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
||||
dirs['abs_test_install_dir'], 'reftest')
|
||||
dirs['abs_xpcshell_dir'] = os.path.join(
|
||||
dirs['abs_test_install_dir'], 'xpcshell')
|
||||
dirs['abs_marionette_dir'] = os.path.join(
|
||||
dirs['abs_test_install_dir'], 'marionette', 'harness', 'marionette_harness')
|
||||
dirs['abs_marionette_tests_dir'] = os.path.join(
|
||||
dirs['abs_test_install_dir'], 'marionette', 'tests', 'testing',
|
||||
'marionette', 'harness', 'marionette_harness', 'tests')
|
||||
|
||||
for key in dirs.keys():
|
||||
if key not in abs_dirs:
|
||||
@ -224,15 +217,7 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
||||
'log_tbpl_level': self.log_tbpl_level,
|
||||
'log_raw_level': self.log_raw_level,
|
||||
'error_summary_file': error_summary_file,
|
||||
# marionette options
|
||||
'address': c.get('marionette_address') % {'device_ip': self.device_ip},
|
||||
'gecko_log': os.path.join(dirs["abs_blob_upload_dir"], 'gecko.log'),
|
||||
'marionette_extra': c.get('marionette_extra', ''),
|
||||
'xpcshell_extra': c.get('xpcshell_extra', ''),
|
||||
'test_manifest': os.path.join(
|
||||
dirs['abs_marionette_tests_dir'],
|
||||
self.config.get('marionette_test_manifest', '')
|
||||
),
|
||||
}
|
||||
|
||||
user_paths = json.loads(os.environ.get('MOZHARNESS_TEST_PATHS', '""'))
|
||||
@ -303,7 +288,6 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
||||
return [(self.test_suite, self.test_suite)]
|
||||
# per-test mode: determine test suites to run
|
||||
all = [('mochitest', {'mochitest-plain': 'mochitest-plain',
|
||||
'mochitest-chrome': 'mochitest-chrome',
|
||||
'mochitest-plain-gpu': 'mochitest-plain-gpu'}),
|
||||
('reftest', {'reftest': 'reftest', 'crashtest': 'crashtest'}),
|
||||
('xpcshell', {'xpcshell': 'xpcshell'})]
|
||||
@ -340,24 +324,17 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
||||
requirements = os.path.join(dirs['abs_mochitest_dir'],
|
||||
'websocketprocessbridge',
|
||||
'websocketprocessbridge_requirements.txt')
|
||||
elif ('marionette', 'marionette') in suites:
|
||||
requirements = os.path.join(dirs['abs_test_install_dir'],
|
||||
'config', 'marionette_requirements.txt')
|
||||
if requirements:
|
||||
self.register_virtualenv_module(requirements=[requirements],
|
||||
two_pass=True)
|
||||
|
||||
def download_and_extract(self):
|
||||
"""
|
||||
Download and extract fennec APK, tests.zip, host utils, and robocop (if required).
|
||||
Download and extract product APK, tests.zip, and host utils.
|
||||
"""
|
||||
super(AndroidHardwareTest, self).download_and_extract(
|
||||
suite_categories=self._query_suite_categories())
|
||||
dirs = self.query_abs_dirs()
|
||||
if self.test_suite and self.test_suite.startswith('robocop'):
|
||||
robocop_url = self.installer_url[:self.installer_url.rfind('/')] + '/robocop.apk'
|
||||
self.info("Downloading robocop...")
|
||||
self.download_file(robocop_url, 'robocop.apk', dirs['abs_work_dir'], error_level=FATAL)
|
||||
self.xre_path = self.download_hostutils(dirs['abs_xre_dir'])
|
||||
|
||||
def install(self):
|
||||
@ -372,9 +349,6 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
||||
assert self.installer_path is not None, \
|
||||
"Either add installer_path to the config or use --installer-path."
|
||||
self.install_apk(self.installer_path)
|
||||
# Install Robocop if required
|
||||
if self.test_suite and self.test_suite.startswith('robocop'):
|
||||
self.install_apk(self.robocop_path)
|
||||
self.info("Finished installing apps for %s" % self.device_name)
|
||||
|
||||
def run_tests(self):
|
||||
|
Loading…
Reference in New Issue
Block a user