Make headless shell a separate product
This is to make it clear headless shell is a different binary, and we can start to use "-p headless_shell" to run tests with it. For now headless_shell is an alias to "chrome --headless=old". We should eventually make this a product in Wptrunner also. Updated the old headless step in FYI builder to run all WPTs with virtual tests and wpt_internal excluded, such that developers can start to use it to fix bugs for headless shell. Bug: 41486180 Change-Id: I00f848a915c0b86b628cc9d979df567a95749775 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5459859 Commit-Queue: Weizhong Xia <weizhong@google.com> Reviewed-by: Jonathan Lee <jonathanjlee@google.com> Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com> Cr-Commit-Position: refs/heads/main@{#1288977}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
f76dde22e4
commit
258547b3a3
22
BUILD.gn
22
BUILD.gn
@ -1135,6 +1135,28 @@ if (use_blink && !is_cronet_build) {
|
||||
"//third_party/blink/tools:wpt_tests_isolate",
|
||||
]
|
||||
}
|
||||
script_test("headless_shell_wpt") {
|
||||
script = "//third_party/blink/tools/run_wpt_tests.py"
|
||||
args = [
|
||||
"--test-type",
|
||||
"testharness",
|
||||
"reftest",
|
||||
"crashtest",
|
||||
"print-reftest",
|
||||
"--product=headless_shell",
|
||||
"--no-virtual-tests",
|
||||
"--no-wpt-internal",
|
||||
"--no-show-results",
|
||||
"--zero-tests-executed-ok",
|
||||
]
|
||||
data_deps = [
|
||||
":blink_web_tests_expectations",
|
||||
":blink_web_tests_support_data",
|
||||
"//chrome:chrome",
|
||||
"//chrome/test/chromedriver:chromedriver_server",
|
||||
"//third_party/blink/tools:wpt_tests_isolate",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
group("blink_web_tests_support_data") {
|
||||
|
@ -905,6 +905,14 @@
|
||||
"label": "//headless:headless_browsertests",
|
||||
"type": "console_test_launcher",
|
||||
},
|
||||
"headless_shell_wpt": {
|
||||
"label": "//:headless_shell_wpt",
|
||||
"type": "generated_script",
|
||||
"args": [
|
||||
"--results-directory",
|
||||
"${ISOLATED_OUTDIR}",
|
||||
],
|
||||
},
|
||||
"headless_unittests": {
|
||||
"label": "//headless:headless_unittests",
|
||||
"type": "console_test_launcher",
|
||||
|
@ -1649,33 +1649,6 @@
|
||||
},
|
||||
},
|
||||
|
||||
'chromium_wpt_tests_old_headless_isolated_scripts': {
|
||||
'chrome_wpt_tests_old_headless': {
|
||||
'test': 'chrome_wpt_tests',
|
||||
'results_handler': 'layout tests',
|
||||
'mixins': [
|
||||
'has_native_resultdb_integration',
|
||||
],
|
||||
'args': [
|
||||
'--test-type',
|
||||
'testharness',
|
||||
'reftest',
|
||||
'crashtest',
|
||||
'print-reftest',
|
||||
'--additional-driver-flag=--headless=old',
|
||||
],
|
||||
'swarming': {
|
||||
'shards': 1,
|
||||
},
|
||||
'merge': {
|
||||
'script': '//third_party/blink/tools/merge_web_test_results.py',
|
||||
'args': [
|
||||
'--verbose',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
'clang_tot_gtests': {
|
||||
'base_unittests': {},
|
||||
},
|
||||
@ -4118,6 +4091,25 @@
|
||||
'headless_unittests': {},
|
||||
},
|
||||
|
||||
'headless_shell_wpt_tests_isolated_scripts': {
|
||||
'headless_shell_wpt_tests': {
|
||||
'test': 'headless_shell_wpt',
|
||||
'results_handler': 'layout tests',
|
||||
'mixins': [
|
||||
'has_native_resultdb_integration',
|
||||
],
|
||||
'swarming': {
|
||||
'shards': 10,
|
||||
},
|
||||
'merge': {
|
||||
'script': '//third_party/blink/tools/merge_web_test_results.py',
|
||||
'args': [
|
||||
'--verbose',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
'ios_blink_tests': {
|
||||
'absl_hardening_tests': {},
|
||||
'angle_unittests': {
|
||||
@ -6042,7 +6034,7 @@
|
||||
'chrome_wpt_tests_three_modes': [
|
||||
'chromium_wpt_tests_headful_isolated_scripts',
|
||||
'chromium_wpt_tests_isolated_scripts',
|
||||
'chromium_wpt_tests_old_headless_isolated_scripts',
|
||||
'headless_shell_wpt_tests_isolated_scripts',
|
||||
],
|
||||
|
||||
'chromeos_device_no_gtests': [
|
||||
|
@ -1591,19 +1591,11 @@ targets.legacy_basic_suite(
|
||||
)
|
||||
|
||||
targets.legacy_basic_suite(
|
||||
name = "chromium_wpt_tests_old_headless_isolated_scripts",
|
||||
name = "headless_shell_wpt_tests_isolated_scripts",
|
||||
tests = {
|
||||
"chrome_wpt_tests_old_headless": targets.legacy_test_config(
|
||||
args = [
|
||||
"--test-type",
|
||||
"testharness",
|
||||
"reftest",
|
||||
"crashtest",
|
||||
"print-reftest",
|
||||
"--additional-driver-flag=--headless=old",
|
||||
],
|
||||
"headless_shell_wpt_tests": targets.legacy_test_config(
|
||||
swarming = targets.swarming(
|
||||
shards = 1,
|
||||
shards = 10,
|
||||
),
|
||||
),
|
||||
},
|
||||
|
@ -832,6 +832,22 @@ targets.binaries.console_test_launcher(
|
||||
label = "//media/gpu/vaapi/test/fake_libva_driver:fake_libva_driver_unittest",
|
||||
)
|
||||
|
||||
targets.binaries.generated_script(
|
||||
name = "headless_shell_wpt",
|
||||
label = "//:headless_shell_wpt",
|
||||
results_handler = "layout tests",
|
||||
args = [
|
||||
"--results-directory",
|
||||
"${ISOLATED_OUTDIR}",
|
||||
],
|
||||
merge = targets.merge(
|
||||
script = "//third_party/blink/tools/merge_web_test_results.py",
|
||||
args = [
|
||||
"--verbose",
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
targets.binaries.console_test_launcher(
|
||||
name = "video_decode_accelerator_tests",
|
||||
label = "//media/gpu/test:video_decode_accelerator_tests",
|
||||
|
@ -171,7 +171,7 @@ targets.legacy_compound_suite(
|
||||
basic_suites = [
|
||||
"chromium_wpt_tests_isolated_scripts",
|
||||
"chromium_wpt_tests_headful_isolated_scripts",
|
||||
"chromium_wpt_tests_old_headless_isolated_scripts",
|
||||
"headless_shell_wpt_tests_isolated_scripts",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -568,11 +568,11 @@ targets.tests.isolated_script_test(
|
||||
)
|
||||
|
||||
targets.tests.isolated_script_test(
|
||||
name = "chrome_wpt_tests_old_headless",
|
||||
name = "headless_shell_wpt_tests",
|
||||
mixins = [
|
||||
"has_native_resultdb_integration",
|
||||
],
|
||||
binary = "chrome_wpt_tests",
|
||||
binary = "headless_shell_wpt",
|
||||
)
|
||||
|
||||
targets.tests.gtest_test(
|
||||
|
@ -47891,21 +47891,13 @@
|
||||
"test_id_prefix": "ninja://:chrome_wpt_tests/"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"--test-type",
|
||||
"testharness",
|
||||
"reftest",
|
||||
"crashtest",
|
||||
"print-reftest",
|
||||
"--additional-driver-flag=--headless=old"
|
||||
],
|
||||
"merge": {
|
||||
"args": [
|
||||
"--verbose"
|
||||
],
|
||||
"script": "//third_party/blink/tools/merge_web_test_results.py"
|
||||
},
|
||||
"name": "chrome_wpt_tests_old_headless",
|
||||
"name": "headless_shell_wpt_tests",
|
||||
"resultdb": {
|
||||
"enable": true,
|
||||
"has_native_resultdb_integration": true
|
||||
@ -47915,10 +47907,11 @@
|
||||
"dimensions": {
|
||||
"os": "Ubuntu-22.04"
|
||||
},
|
||||
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
|
||||
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
|
||||
"shards": 10
|
||||
},
|
||||
"test": "chrome_wpt_tests",
|
||||
"test_id_prefix": "ninja://:chrome_wpt_tests/"
|
||||
"test": "headless_shell_wpt",
|
||||
"test_id_prefix": "ninja://:headless_shell_wpt/"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -905,6 +905,14 @@
|
||||
"label": "//headless:headless_browsertests",
|
||||
"type": "console_test_launcher",
|
||||
},
|
||||
"headless_shell_wpt": {
|
||||
"label": "//:headless_shell_wpt",
|
||||
"type": "generated_script",
|
||||
"args": [
|
||||
"--results-directory",
|
||||
"${ISOLATED_OUTDIR}",
|
||||
],
|
||||
},
|
||||
"headless_unittests": {
|
||||
"label": "//headless:headless_unittests",
|
||||
"type": "console_test_launcher",
|
||||
|
@ -1649,33 +1649,6 @@
|
||||
},
|
||||
},
|
||||
|
||||
'chromium_wpt_tests_old_headless_isolated_scripts': {
|
||||
'chrome_wpt_tests_old_headless': {
|
||||
'test': 'chrome_wpt_tests',
|
||||
'results_handler': 'layout tests',
|
||||
'mixins': [
|
||||
'has_native_resultdb_integration',
|
||||
],
|
||||
'args': [
|
||||
'--test-type',
|
||||
'testharness',
|
||||
'reftest',
|
||||
'crashtest',
|
||||
'print-reftest',
|
||||
'--additional-driver-flag=--headless=old',
|
||||
],
|
||||
'swarming': {
|
||||
'shards': 1,
|
||||
},
|
||||
'merge': {
|
||||
'script': '//third_party/blink/tools/merge_web_test_results.py',
|
||||
'args': [
|
||||
'--verbose',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
'clang_tot_gtests': {
|
||||
'base_unittests': {},
|
||||
},
|
||||
@ -4118,6 +4091,25 @@
|
||||
'headless_unittests': {},
|
||||
},
|
||||
|
||||
'headless_shell_wpt_tests_isolated_scripts': {
|
||||
'headless_shell_wpt_tests': {
|
||||
'test': 'headless_shell_wpt',
|
||||
'results_handler': 'layout tests',
|
||||
'mixins': [
|
||||
'has_native_resultdb_integration',
|
||||
],
|
||||
'swarming': {
|
||||
'shards': 10,
|
||||
},
|
||||
'merge': {
|
||||
'script': '//third_party/blink/tools/merge_web_test_results.py',
|
||||
'args': [
|
||||
'--verbose',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
'ios_blink_tests': {
|
||||
'absl_hardening_tests': {},
|
||||
'angle_unittests': {
|
||||
@ -6042,7 +6034,7 @@
|
||||
'chrome_wpt_tests_three_modes': [
|
||||
'chromium_wpt_tests_headful_isolated_scripts',
|
||||
'chromium_wpt_tests_isolated_scripts',
|
||||
'chromium_wpt_tests_old_headless_isolated_scripts',
|
||||
'headless_shell_wpt_tests_isolated_scripts',
|
||||
],
|
||||
|
||||
'chromeos_device_no_gtests': [
|
||||
|
@ -37,7 +37,9 @@ def make_product_registry():
|
||||
respective classes.
|
||||
"""
|
||||
product_registry = {}
|
||||
product_classes = [Chrome, ContentShell, ChromeiOS, ChromeAndroid, WebView]
|
||||
product_classes = [
|
||||
Chrome, HeadlessShell, ContentShell, ChromeiOS, ChromeAndroid, WebView
|
||||
]
|
||||
for product_cls in product_classes:
|
||||
names = [product_cls.name] + product_cls.aliases
|
||||
product_registry.update((name, product_cls) for name in names)
|
||||
@ -112,6 +114,10 @@ class Chrome(Product):
|
||||
}
|
||||
|
||||
|
||||
class HeadlessShell(Chrome):
|
||||
name = 'headless_shell'
|
||||
|
||||
|
||||
class ContentShell(Product):
|
||||
name = 'content_shell'
|
||||
|
||||
|
@ -170,7 +170,7 @@ class WPTAdapter:
|
||||
else:
|
||||
port = host.port_factory.get(port_name, options)
|
||||
|
||||
if options.product == 'chrome':
|
||||
if options.product in ['chrome', 'headless_shell']:
|
||||
port.set_option_default('driver_name', port.CHROME_NAME)
|
||||
product = make_product(port, options)
|
||||
return WPTAdapter(product, port, options, tests)
|
||||
@ -233,7 +233,8 @@ class WPTAdapter:
|
||||
mozlog.commandline.log_formatters[name][1],
|
||||
)
|
||||
|
||||
runner_options = parser.parse_args(['--product', self.product.name])
|
||||
product_name = 'chrome' if self.product.name == 'headless_shell' else self.product.name
|
||||
runner_options = parser.parse_args(['--product', product_name])
|
||||
runner_options.include = []
|
||||
runner_options.exclude = []
|
||||
|
||||
@ -326,6 +327,8 @@ class WPTAdapter:
|
||||
'MAP *.test 127.0.0.1, MAP *.test. 127.0.0.1',
|
||||
*self.port.additional_driver_flags(),
|
||||
])
|
||||
if self.options.product == 'headless_shell':
|
||||
runner_options.binary_args.append('--headless=old')
|
||||
# Implicitly pass `--enable-blink-features=MojoJS,MojoJSTest` to Chrome.
|
||||
runner_options.mojojs_path = self.port.generated_sources_directory()
|
||||
|
||||
|
Reference in New Issue
Block a user