# Copyright 2023 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Mixin declarations Mixins are used to define common properties that can be applied to multiple tests. """ load("@chromium-luci//targets.star", "targets") def android_emulator_mixin( mixin_name, config_filename, config_dir = "tools/android/avd/proto", **kwargs): """Generates an Android emulator mixin. Args: mixin_name: The name of the mixin. config_filename: The base name of the AVD config file, e.g., "android_36_google_apis_x64.textpb". config_dir: The directory containing the AVD config file, relative to chromium src directory. **kwargs: Additional keyword arguments to pass to targets.mixin. Returns: A targets.mixin """ if not config_filename.endswith(".textpb"): fail("config_filename must end with '.textpb', got %s" % config_filename) config_name = config_filename.removesuffix(".textpb") avd_config_path = "../../{}/{}".format(config_dir.strip("/"), config_filename) return targets.mixin( name = mixin_name, description = "Run with {}".format(config_name), args = [ "--avd-config=" + avd_config_path, ], swarming = targets.swarming( # soft affinity so that bots with caches will be picked first optional_dimensions = { 60: { "caches": config_name, }, }, named_caches = [ swarming.cache( name = config_name, path = ".android_emulator/" + config_name, ), ], ), **kwargs ) android_emulator_mixin("10-x86-emulator", "android_29_google_apis_x86.textpb") android_emulator_mixin( "11-x86-emulator", "android_30_google_apis_x86.textpb", resultdb = targets.resultdb( base_variant = { # LINT.IfChange(avd-11-x86-emulator) "device_os": "RSR1.210722.013.A2", # LINT.ThenChange(//tools/android/avd/proto/android_30_google_apis_x86.textpb:avd-11-x86-emulator) }, ), ) android_emulator_mixin("12-x64-emulator", "android_31_google_apis_x64.textpb") android_emulator_mixin("12l-x64-emulator", "android_32_google_apis_x64_foldable.textpb") android_emulator_mixin("12l-landscape-x64-emulator", "android_32_google_apis_x64_foldable_landscape.textpb") android_emulator_mixin("13-x64-emulator", "android_33_google_apis_x64.textpb") android_emulator_mixin("14-automotive-landscape-x64-emulator", "android_34_automotive_x64.textpb") android_emulator_mixin("14-x64-emulator", "android_34_google_apis_x64.textpb") android_emulator_mixin("15-desktop-x64-emulator", "android_35_google_apis_tablet_x64_tablet_landscape.textpb") android_emulator_mixin("15-tablet-x64-emulator", "android_35_google_apis_x64_tablet.textpb") android_emulator_mixin("15-tablet-landscape-x64-emulator", "android_35_google_apis_x64_tablet_landscape.textpb") android_emulator_mixin("15-x64-emulator", "android_35_google_apis_x64.textpb") android_emulator_mixin("16-x64-emulator", "android_36_google_apis_x64.textpb") android_emulator_mixin("17-beta-x64-emulator", "android_37_google_apis_ps16k_x64.textpb") android_emulator_mixin("canary-x64-emulator", "android_canary_google_apis_x64.textpb") # The following emulator mixins are deprecated on the chromium side. But they # are still used by other projects, e.g. cronet android_emulator_mixin("marshmallow-x86-emulator", "generic_android23.textpb") android_emulator_mixin("nougat-x86-emulator", "generic_android24.textpb") android_emulator_mixin("oreo-x86-emulator", "generic_android26.textpb") android_emulator_mixin("pie-x86-emulator", "android_28_google_apis_x86.textpb") targets.mixin( name = "10_fleet", swarming = targets.swarming( dimensions = { "device_os": "QQ1A.191205.008", "device_os_flavor": "google", }, ), ) targets.mixin( name = "amd_radeon_rx_5500_xt", swarming = targets.swarming( dimensions = { "gpu": "1002:7340", }, ), ) targets.mixin( name = "android", swarming = targets.swarming( dimensions = { "os": "Android", "cpu": None, }, ), ) targets.mixin( name = "android_desktop_wpt_args", args = [ "--additional-driver-flag=--force-desktop-android", ], ) targets.mixin( name = "arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", }, ), ) targets.mixin( name = "blink_tests_write_run_histories", args = [ "--write-run-histories-to=${ISOLATED_OUTDIR}/run_histories.json", ], ) targets.mixin( name = "bullhead", swarming = targets.swarming( dimensions = { "device_type": "bullhead", "os": "Android", }, ), ) targets.mixin( name = "chrome-finch-swarming-pool", swarming = targets.swarming( dimensions = { "pool": "chrome.tests.finch", }, ), ) targets.mixin( name = "chrome-flame-fleet-pool", swarming = targets.swarming( dimensions = { "device_type": "flame", "device_os": "R", "pool": "chrome.tests", "os": "Android", }, ), ) targets.mixin( name = "chrome-intelligence-swarming-pool", swarming = targets.swarming( dimensions = { "pool": "chrome.tests.intelligence", }, ), ) targets.mixin( name = "chrome-swarming-pool", swarming = targets.swarming( dimensions = { "pool": "chrome.tests", }, ), ) targets.mixin( name = "chrome-tester-service-account", swarming = targets.swarming( service_account = "chrome-tester@chops-service-accounts.iam.gserviceaccount.com", ), ) targets.mixin( name = "crosier-no-arc", args = [ # All is_chrome_branded Chrome has components/arc, but reven board # don't have ChromeOS daemons and resources necessary for ARC. # Disable ARC crosier tests on reven. "--test-launcher-filter-file=../../testing/buildbot/filters/chromeos.reven.chromeos_integration_tests.filter", ], ) targets.mixin( name = "skylab-tauto-chromium-graphics", skylab = targets.skylab( autotest_name = "chromium_Graphics", ), ) targets.mixin( name = "skylab-50-tests-per-shard", skylab = targets.skylab( cros_test_max_in_shard = 50, ), ) targets.mixin( name = "skylab-40-tests-per-shard", skylab = targets.skylab( cros_test_max_in_shard = 40, ), ) targets.mixin( name = "skylab-20-tests-per-shard", skylab = targets.skylab( cros_test_max_in_shard = 20, ), ) targets.mixin( name = "skylab-rdb-tast", resultdb = targets.resultdb( result_format = "tast", ), ) targets.mixin( name = "skylab-rdb-gtest", resultdb = targets.resultdb( result_format = "gtest", ), ) targets.mixin( name = "skylab-rdb-native", resultdb = targets.resultdb( result_format = "native", ), ) targets.mixin( name = "tfc-cq-tast", skylab = targets.skylab( timeout_sec = 5400, # All tests in tast_control_cq_tests.txt must have dep:chrome, # !dep:chrome tests will be filtered out. !group:mainline tests will be # kept and run if they are in tast_control_cq_tests.txt cros_test_tags = ["dep:chrome"], # cros_test_tags_exclude will honor the suite's settings. for # chrome_all_tast_tests suite, all informational or # dep:no_chrome_dcheck tests will be filtered out. cros_test_names_from_file = [ "chromeos/tast_control_cq_tests.txt", ], cros_test_names_exclude_from_file = [ "chromeos/tast_control_disabled_tests.txt", "chromeos/tast_control_flaky_tests.txt", ], cros_test_max_in_shard = 20, ), ) targets.mixin( name = "chromeos-generic-vm", args = [ "--magic-vm-cache=magic_cros_vm_cache", ], swarming = targets.swarming( dimensions = { "cpu": "x86-64", "kvm": "1", "os": "Ubuntu-22.04", "pool": "chromium.tests", }, optional_dimensions = { 60: { "caches": "cros_vm", }, }, # This cache dir doesn't actually contain anything. Rather, its presence # merely signals to the fleet that the a CrOS VM test recently ran on # the bot and that its large VM image is likely still present in the # bot's isolated cache. So by optionally targeting bots with that magic # dir, CrOS VM tests can naturally have higher cache hit rates. named_caches = [ swarming.cache( name = "cros_vm", path = "magic_cros_vm_cache", ), ], ), ) targets.mixin( name = "chromeos-betty-finch", args = [ "--board=betty", "--magic-vm-cache=magic_cros_vm_cache", ], swarming = targets.swarming( dimensions = { "cpu": "x86-64", "kvm": "1", "gce": "1", "os": "Ubuntu-22.04", "pool": "chrome.tests.finch", }, optional_dimensions = { 60: { "caches": "cros_vm", }, }, # See the 'chromeos-generic-vm' mixin above for the purpose of this # cache. named_caches = [ swarming.cache( name = "cros_vm", path = "magic_cros_vm_cache", ), ], ), ) targets.mixin( name = "chromium_nexus_5x_oreo", swarming = targets.swarming( dimensions = { "device_os": "OPR4.170623.020", "device_os_flavor": "google", "device_type": "bullhead", "os": "Android", "pool": "chromium.tests", }, ), ) targets.mixin( name = "chromium_pixel_2_pie", swarming = targets.swarming( dimensions = { "device_os": "PQ3A.190801.002", "device_os_flavor": "google", "device_type": "walleye", "os": "Android", "pool": "chromium.tests", }, ), ) targets.mixin( name = "chromium_pixel_2_q", swarming = targets.swarming( dimensions = { "device_os": "QQ1A.191205.008", "device_os_flavor": "google", "device_type": "walleye", "os": "Android", "pool": "chromium.tests", }, ), ) targets.mixin( name = "chromium_tests_pool", swarming = targets.swarming( dimensions = { "pool": "chromium.tests", }, ), ) targets.mixin( name = "chromium-tester-dev-service-account", swarming = targets.swarming( service_account = "chromium-tester-dev@chops-service-accounts.iam.gserviceaccount.com", ), ) targets.mixin( name = "chromium-tester-service-account", swarming = targets.swarming( service_account = "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", ), ) # Used for invert CQ tests selection. Adding ci_only: False to # test_suite_exceptions.pyl to select tests that are allowed on CQ builders. targets.mixin( name = "ci_only", ci_only = True, ) targets.mixin( name = "experiments", experiment_percentage = 100, ) targets.mixin( name = "chromium-tests-oslogin", swarming = targets.swarming( dimensions = { "pool": "chromium.tests.oslogin", }, ), ) targets.mixin( name = "dawn_end2end_gpu_test", args = [ "--use-gpu-in-tests", "--exclusive-device-type-preference=discrete,integrated", # Dawn test retries deliberately disabled to prevent flakiness. "--test-launcher-retry-limit=0", # Reduces size of stdout of a batch crbug.com/1456415 "--test-launcher-batch-limit=512", ], ) targets.mixin( name = "disable_field_trial_config_for_earl_grey", args = [ "--extra-app-args=--disable-field-trial-config", ], ) targets.mixin( name = "docker", swarming = targets.swarming( dimensions = { "inside_docker": "1", }, ), ) targets.mixin( name = "emulator-4-cores", swarming = targets.swarming( dimensions = { "device_os": None, "device_type": None, "pool": "chromium.tests.avd", "cores": "4", }, ), ) targets.mixin( name = "emulator-8-cores", swarming = targets.swarming( dimensions = { "device_os": None, "device_type": None, "pool": "chromium.tests.avd", "cores": "8", }, ), ) targets.mixin( name = "emulator-enable-network", args = [ "--emulator-enable-network", ], swarming = targets.swarming( idempotent = False, # Set to False because network is enabled. ), ) # In //testing/buildbot, what test type a test is expanded as depends on the # test_suites key that the builder puts it under, so gtests included under the # isolated_scripts suite type would get expanded as isolated scripts. In # starlark, tests know what type they are and their type determines how they are # expanded, which allows tests of different types to in the same bundle. This # mixin enables using gtests as isolated script tests. targets.mixin( name = "expand-as-isolated-script", expand_as_isolated_script = True, ) targets.mixin( name = "finch-chromium-swarming-pool", swarming = targets.swarming( dimensions = { "pool": "chromium.tests.finch", }, ), ) targets.mixin( name = "force-desktop-android", args = [ "--force-desktop-android", ], ) targets.mixin( name = "fuchsia-code-coverage", args = [ "--code-coverage-dir=${ISOLATED_OUTDIR}", ], ) # TODO(fxbug.dev/370067428): Remove once Netstack2 no longer exists. targets.mixin( name = "fuchsia-netstack2-x64", args = [ "--product=terminal_with_netstack2.x64", ], ) # TODO(b/300509814): Large device spec should be the default choice. # Choose virtual_device_large spec for more ram. This mixin works on emulators # only. targets.mixin( name = "fuchsia-large-device-spec", args = [ "--device-spec=x64-emu-large", ], ) targets.mixin( name = "fuchsia-persistent-emulator", args = [ "--everlasting", ], swarming = targets.swarming( # The persistent emulator will only be used on dedicated fuchsia pool so # that there isn't a need of cache affinity. named_caches = [ swarming.cache( name = "fuchsia_emulator_cache", path = ".fuchsia_emulator/fuchsia-everlasting-emulator", ), ], ), ) targets.mixin( name = "fuchsia-orchestrate", args = [ "--orchestrate", ], ) targets.mixin( name = "upload_inv_extended_properties", resultdb = targets.resultdb( enable = True, inv_extended_properties_dir = "${ISOLATED_OUTDIR}/invocations", ), ) targets.mixin( name = "gce", swarming = targets.swarming( dimensions = { "gce": "1", }, ), ) targets.mixin( name = "non-gce", swarming = targets.swarming( dimensions = { "gce": "0", }, ), ) targets.mixin( name = "gpu_gtest_common_args", android_args = [ targets.magic_args.ANDROID_DESKTOP_FORCE_MAIN_USER, ], ) targets.mixin( name = "gpu_integration_test_common_args", args = [ targets.magic_args.GPU_PARALLEL_JOBS, ], android_args = [ targets.magic_args.GPU_TELEMETRY_NO_ROOT_FOR_UNROOTED_DEVICES, targets.magic_args.ANDROID_DESKTOP_TELEMETRY_REMOTE, # See crbug.com/333414298 for context on why this is necessary. "--initial-find-device-attempts=3", ], chromeos_args = [ targets.magic_args.CROS_TELEMETRY_REMOTE, ], # TODO(crbug.com/40862371): having --xvfb and --no-xvfb is confusing. lacros_args = [ "--extra-browser-args=--enable-features=UseOzonePlatform --ozone-platform=wayland", "--xvfb", "--no-xvfb", "--use-weston", "--weston-use-gl", ], ) targets.mixin( name = "gpu_integration_test_expected_color_args", args = [ "--dont-restore-color-profile-after-test", "--test-machine-name", "${buildername}", ], android_args = [ # TODO(crbug.com/40134877): Remove this once we fix the tests. "--extra-browser-args=--force-online-connection-state-for-indicator", ], ) targets.mixin( name = "gpu_integration_test_pixel_args", args = [ "--dont-restore-color-profile-after-test", "--test-machine-name", "${buildername}", ], android_args = [ # TODO(crbug.com/40134877): Remove this once we fix the tests. "--extra-browser-args=--force-online-connection-state-for-indicator", ], ) targets.mixin( name = "gpu_integration_test_screenshot_sync_args", args = [ "--dont-restore-color-profile-after-test", ], android_args = [ # TODO(crbug.com/40134877): Remove this once we fix the tests. "--extra-browser-args=--force-online-connection-state-for-indicator", ], ) targets.mixin( name = "gpu_integration_test_webgl1_args", args = [ targets.magic_args.GPU_WEBGL_RUNTIME_FILE, ], ) targets.mixin( name = "gpu_integration_test_webgl2_args", args = [ "--webgl-conformance-version=2.0.1", targets.magic_args.GPU_WEBGL_RUNTIME_FILE, ], ) targets.mixin( name = "gpu_linux_gce_stable", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "none", "os": "Ubuntu-22.04", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_pixel_4_stable", swarming = targets.swarming( dimensions = { "os": "Android", "device_type": "flame", "device_os": "RP1A.201105.002", "device_os_type": "userdebug", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_pixel_6_experimental", swarming = targets.swarming( dimensions = { "os": "Android", "device_type": "oriole", "device_os": "AP1A.240405.002", "device_os_type": "userdebug", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_pixel_6_stable", swarming = targets.swarming( dimensions = { "os": "Android", "device_type": "oriole", "device_os": "TP1A.220624.021", "device_os_type": "userdebug", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_pixel_10_stable", swarming = targets.swarming( dimensions = { "os": "Android", "device_type": "frankel", "device_os": "CP1A.260405.005", "device_os_type": "userdebug", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_samsung_a13_stable", swarming = targets.swarming( dimensions = { "os": "Android", "device_type": "a13ve", "device_os": "TP1A.220624.014", "device_os_type": "user", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_samsung_a23_stable", swarming = targets.swarming( dimensions = { "os": "Android", "device_type": "a23xq", "device_os": "TP1A.220624.014", "device_os_type": "user", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_samsung_s23_stable", swarming = targets.swarming( dimensions = { # Unfortunately, "s23" is not exposed as a dimension. "dm1q" appears # to refer to the S23 specifically, while "kalama" is for the entire # S23 family. "device_type": "dm1q", "device_os": "AP3A.240905.015.A2", "device_os_type": "user", "os": "Android", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_samsung_s24_stable", swarming = targets.swarming( dimensions = { "device_type": "s5e9945", "device_os": "AP3A.240905.015.A2", "device_os_type": "user", "os": "Android", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_win_gce_stable", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "none", "os": "Windows-10-19045", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_amd_rx_5500_xt_linux_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "display_server": "x11", "gpu": "1002:7340-25.2.8", "os": "Ubuntu-24.04", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_amd_rx_9070_xt_linux_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "display_server": "x11", "gpu": "1002:7550-25.2.8", "os": "Ubuntu-24.04", "pool": "chromium.tests.gpu.experimental", }, ), ) targets.mixin( name = "gpu_amd_rx_9070_xt_win_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "1002:7550-32.0.31007.5012", "os": "Windows-11", "pool": "chromium.tests.gpu.experimental", }, ), ) targets.mixin( name = "gpu_nvidia_rtx_5080_linux_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "display_server": "x11", "gpu": "10de:2c02-595.58.03", "os": "Ubuntu-24.04", "pool": "chromium.tests.gpu.experimental", }, ), ) targets.mixin( name = "gpu_nvidia_rtx_5080_win_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "10de:2c02-32.0.15.9597", "os": "Windows-11", "pool": "chromium.tests.gpu.experimental", }, ), ) targets.mixin( name = "gpu-swarming-pool", swarming = targets.swarming( dimensions = { "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "gpu_enable_metal_debug_layers", args = [ "--enable-metal-debug-layers", ], ) targets.mixin( name = "gpu_force_angle_d3d11", args = [ "--extra-browser-args=--use-angle=d3d11", ], ) targets.mixin( name = "gpu_force_angle_gles", args = [ "--extra-browser-args=--use-angle=gles", ], ) targets.mixin( name = "gpu_force_angle_gl", args = [ "--extra-browser-args=--use-angle=gl", ], ) targets.mixin( name = "gpu_force_angle_metal", args = [ "--extra-browser-args=--use-angle=metal", ], ) targets.mixin( name = "gpu_force_angle_swiftshader", args = [ "--extra-browser-args=--use-angle=swiftshader", ], ) targets.mixin( name = "gpu_force_angle_vulkan", args = [ "--extra-browser-args=--use-angle=vulkan", ], ) targets.mixin( name = "gpu_force_command_decoder_validating", args = [ "--extra-browser-args=--use-cmd-decoder=validating", ], ) targets.mixin( name = "gpu_force_command_decoder_passthrough", args = [ "--extra-browser-args=--use-cmd-decoder=passthrough --use-gl=angle", ], ) # On dual-GPU devices this forces high performance GPU to be used. targets.mixin( name = "gpu_force_high_performance_gpu", args = [ "--extra-browser-args=--force_high_performance_gpu", ], ) # On dual-GPU devices this forces high performance GPU to be used by WebGL # while everything else uses the low performance GPU. ANGLE/Metal only. targets.mixin( name = "gpu_force_high_performance_gpu_for_webgl_metal", args = [ "--extra-browser-args=--enable-features=EGLDualGPURendering,ForceHighPerformanceGPUForWebGL", ], ) targets.mixin( name = "gpu_force_skia_ganesh", args = [ "--extra-browser-args=--disable-skia-graphite", ], ) targets.mixin( name = "gpu_force_skia_graphite", args = [ "--extra-browser-args=--enable-skia-graphite", ], ) # Use of this mixin signals to the recipe that the test uploads its results # to result-sink and doesn't need to be wrapped by result_adapter. targets.mixin( name = "has_native_resultdb_integration", resultdb = targets.resultdb( enable = True, # TODO(crbug.com/40740370): Remove the 'enable' field in favor of # 'has_native_resultdb_integration'. has_native_resultdb_integration = True, ), ) targets.mixin( name = "integrity_high", swarming = targets.swarming( dimensions = { "integrity": "high", }, ), ) targets.mixin( name = "intel_uhd_630_or_770", swarming = targets.swarming( dimensions = { "gpu": "8086:9bc5|8086:4680", }, ), ) targets.mixin( name = "ios_beta_test_pool", swarming = targets.swarming( dimensions = { "pool": "chromium.tests.iosbeta", }, ), ) targets.mixin( name = "ios_output_disabled_tests", args = [ "--output-disabled-tests", ], ) targets.mixin( name = "ios_parallel_simulators", args = [ "--clones", "2", ], ) targets.mixin( name = "ios_restart_device", args = [ "--restart", ], ) targets.mixin( name = "ios_runtime_cache_18_4", swarming = targets.swarming( named_caches = [ swarming.cache( name = "runtime_ios_18_4", path = "Runtime-ios-18.4", ), ], ), ) targets.mixin( name = "ios_runtime_cache_18_5", swarming = targets.swarming( named_caches = [ swarming.cache( name = "runtime_ios_18_5", path = "Runtime-ios-18.5", ), ], ), ) targets.mixin( name = "ios_runtime_cache_26_5", swarming = targets.swarming( named_caches = [ swarming.cache( name = "runtime_ios_26_5", path = "Runtime-ios-26.5", ), ], ), ) targets.mixin( name = "ios_runtime_cache_27_0", swarming = targets.swarming( named_caches = [ swarming.cache( name = "runtime_ios_27_0", path = "Runtime-ios-27.0", ), ], ), ) targets.mixin( name = "tvos_runtime_cache_26_0", swarming = targets.swarming( named_caches = [ swarming.cache( name = "runtime_tvos_26_0", path = "Runtime-tvos-26.0", ), ], ), ) targets.mixin( name = "ioswpt-chromium-swarming-pool", swarming = targets.swarming( dimensions = { "pool": "chromium.tests.ioswpt", }, ), ) targets.mixin( name = "isolate_profile_data", isolate_profile_data = True, ) targets.mixin( name = "junit-swarming-emulator", swarming = targets.swarming( dimensions = { "cores": "8", "pool": "chromium.tests", }, ), ) targets.mixin( name = "limited_capacity_bot", # Some FYI bot configurations have a limited number of bots in the swarming # pool. Increase the default expiration_sec time from 1 hour to 6 hours to # prevent shards from timing out. swarming = targets.swarming( expiration_sec = 21600, ), ) targets.mixin( name = "very_limited_capacity_bot", # Some FYI bot configurations have a very limited number of bots in the # swarming pool. Increase the default expiration_sec time from 1 hour to # 12 hours to prevent shards from timing out. swarming = targets.swarming( expiration_sec = 43200, ), ) targets.mixin( name = "linux-focal", swarming = targets.swarming( dimensions = { "os": "Ubuntu-20.04", }, ), ) targets.mixin( name = "linux-jammy", swarming = targets.swarming( dimensions = { "os": "Ubuntu-22.04", }, ), ) targets.mixin( name = "linux-noble", swarming = targets.swarming( dimensions = { "os": "Ubuntu-24.04", }, ), ) targets.mixin( name = "linux-ubuntu", swarming = targets.swarming( dimensions = { "os": "Ubuntu", }, ), ) # Restricts Linux GPU High Tier AI WPT tasks to NVIDIA, AMD, or modern Intel GPUs # (Intel UHD 770 / Iris Xe) to avoid execution stalls on low-end Intel UHD 630 # integrated graphics (lin-90-g582 and lin-91-g582). targets.mixin( name = "linux_gpu_high_tier_ai_wpt_dimensions", swarming = targets.swarming( dimensions = { "gpu": "10de|1002|8086:4680|8086:a780|8086:a7a0", }, ), ) # Restricts Linux GPU High Tier Gemma 4 AI WPT tasks to NVIDIA and AMD discrete # GPUs to prevent VK_ERROR_DEVICE_LOST failures on Intel integrated graphics # (see https://crbug.com/547936735). targets.mixin( name = "linux_gpu_high_tier_gemma4_ai_wpt_dimensions", swarming = targets.swarming( dimensions = { "gpu": "10de|1002", }, ), ) # Restricts Windows GPU Gemma 4 AI WPT tasks to NVIDIA discrete GPUs # to prevent D3D12 vision compilation crashes on AMD integrated graphics # (see https://crbug.com/547946848). targets.mixin( name = "win_gpu_gemma4_ai_wpt_dimensions", swarming = targets.swarming( dimensions = { "gpu": "10de", }, ), ) targets.mixin( name = "linux_amd_780m_experimental", swarming = targets.swarming( dimensions = { "gpu": "1002:1900-25.2.2", "os": "Ubuntu-24.04", "display_attached": "1", "display_server": "x11", "pool": "chromium.tests.gpu.experimental", }, ), ) targets.mixin( name = "linux_amd_890m_experimental", swarming = targets.swarming( dimensions = { "gpu": "1002:150e-25.0.7", "os": "Ubuntu-24.04", "display_attached": "1", "display_server": "x11", "pool": "chromium.tests.gpu.experimental", }, ), ) targets.mixin( name = "linux_amd_rx_5500_xt", swarming = targets.swarming( dimensions = { "gpu": "1002:7340-25.2.8", "os": "Ubuntu-24.04", "display_attached": "1", "display_server": "x11", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_amd_rx_5500_xt_wayland_stable", swarming = targets.swarming( dimensions = { "gpu": "1002:7340-25.2.8", "os": "Ubuntu-24.04", "display_attached": "1", "display_server": "wayland", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_amd_rx_7600_stable", swarming = targets.swarming( dimensions = { "gpu": "1002:7480-25.0.7", "os": "Ubuntu-24.04", "display_attached": "1", "display_server": "x11", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_intel_uhd_630_experimental", swarming = targets.swarming( dimensions = { "gpu": "8086:9bc5-23.2.1", "os": "Ubuntu-22.04.5", "display_attached": "1", "display_server": "x11", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_intel_uhd_630_stable", swarming = targets.swarming( dimensions = { "gpu": "8086:9bc5-23.2.1", "os": "Ubuntu-22.04", "display_server": "x11", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_intel_uhd_770_stable", swarming = targets.swarming( dimensions = { "gpu": "8086:4680-23.2.1", "os": "Ubuntu-22.04", "display_attached": "1", "display_server": "x11", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_nvidia_gtx_1660_experimental", swarming = targets.swarming( dimensions = { "display_server": "x11", "gpu": "10de:2184-535.183.01", "os": "Ubuntu-22.04", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_nvidia_gtx_1660_stable", swarming = targets.swarming( dimensions = { "display_server": "x11", "gpu": "10de:2184-535.183.01", "os": "Ubuntu-22.04", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_nvidia_rtx_4070_super_stable", swarming = targets.swarming( dimensions = { "display_server": "x11", "gpu": "10de:2783-580.95.05", "os": "Ubuntu-24.04", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "linux_vulkan", linux_args = [ "--extra-browser-args=--enable-features=Vulkan", ], ) targets.mixin( name = "long_skylab_timeout", skylab = targets.skylab( timeout_sec = 10800, ), ) targets.mixin( name = "mac_vm", swarming = targets.swarming( dimensions = { "cpu": "Apple_(Virtual)", "os": "Mac", "pool": "chromium.tests.macvm", }, ), ) targets.mixin( name = "mac_26_vm_optional", swarming = targets.swarming( dimensions = { "cpu": "arm64", # fallback on bare metal if no VMs are available "os": "Mac-26", }, optional_dimensions = { 30: { "cpu": "Apple_(Virtual)", }, }, ), ) targets.mixin( name = "mac_10.15", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "os": "Mac-10.15", }, ), ) targets.mixin( name = "mac_11_arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", "os": "Mac-11", }, ), ) targets.mixin( name = "mac_11_x64", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "os": "Mac-11", }, ), ) targets.mixin( name = "mac_12_arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", "os": "Mac-12", }, ), ) targets.mixin( name = "mac_12_x64", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "os": "Mac-12", }, ), ) targets.mixin( name = "mac_13_arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", "os": "Mac-13", }, ), ) targets.mixin( name = "mac_13_x64", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "os": "Mac-13", }, ), ) targets.mixin( name = "mac_14_arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", "os": "Mac-14", }, ), ) targets.mixin( name = "mac_14_x64", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "os": "Mac-14", }, ), ) targets.mixin( name = "mac_15_arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", "os": "Mac-15", }, ), ) targets.mixin( name = "mac_27_arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", "os": "Mac-27", }, ), ) targets.mixin( name = "mac_26_arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", "os": "Mac-26", }, ), ) targets.mixin( name = "mac_26_x64", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "os": "Mac-26", }, ), ) targets.mixin( name = "mac_15_x64", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "os": "Mac-15", }, ), ) targets.mixin( name = "mac_arm64_apple_m1_gpu_experimental", swarming = targets.swarming( dimensions = { "cpu": "arm64", "gpu": "apple:m1", "mac_model": "Macmini9,1", "os": "Mac-15.7", "pool": "chromium.tests", "display_attached": "1", }, ), ) targets.mixin( name = "mac_arm64_apple_m1_gpu_stable", swarming = targets.swarming( dimensions = { "cpu": "arm64", "gpu": "apple:m1", "mac_model": "Macmini9,1", "os": "Mac-15.7", "pool": "chromium.tests", "display_attached": "1", }, ), ) targets.mixin( name = "mac_arm64_apple_m2_retina_gpu_experimental", swarming = targets.swarming( dimensions = { "cpu": "arm64", "gpu": "apple:m2", "mac_model": "Mac14,7", "os": "Mac-26.5.1", "pool": "chromium.tests.gpu", "display_attached": "1", "hidpi": "1", }, ), ) targets.mixin( name = "mac_arm64_apple_m2_retina_gpu_stable", swarming = targets.swarming( dimensions = { "cpu": "arm64", "gpu": "apple:m2", "mac_model": "Mac14,7", "os": "Mac-26.5.1", "pool": "chromium.tests.gpu", "display_attached": "1", "hidpi": "1", }, ), ) targets.mixin( name = "mac_arm64_apple_m3_retina_gpu_stable", swarming = targets.swarming( dimensions = { "cpu": "arm64", "gpu": "apple:m3", "mac_model": "Mac15,3", "os": "Mac-15.4.1", "pool": "chromium.tests.gpu", "display_attached": "1", "hidpi": "1", }, ), ) targets.mixin( name = "mac_beta_x64", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "os": "Mac-26", }, ), ) # mac_default_arm64 is used as a prefered OS dimension for mac platform # instead of any mac OS version. It selects the most representative # dimension on Swarming. targets.mixin( name = "mac_default_arm64", swarming = targets.swarming( dimensions = { "cpu": "arm64", "os": "Mac-26", }, ), ) targets.mixin( name = "mac_mini_intel_gpu_experimental", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "8086:3e9b", "os": "Mac-15.5", "display_attached": "1", }, ), ) targets.mixin( name = "mac_mini_intel_gpu_stable", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "8086:3e9b", "os": "Mac-15.5", "display_attached": "1", }, ), ) targets.mixin( name = "mac_pro_amd_gpu", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "1002:679e", "os": "Mac-12.7", "pool": "chromium.tests.gpu", "display_attached": "1", }, ), ) targets.mixin( name = "mac_retina_amd_555x_gpu_stable", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "1002:67ef", "hidpi": "1", "os": "Mac-14.4.1", "pool": "chromium.tests.gpu", "display_attached": "1", }, ), ) targets.mixin( name = "mac_retina_amd_gpu_experimental", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "1002:7340", "hidpi": "1", "os": "Mac-14.4.1", "pool": "chromium.tests.gpu", "display_attached": "1", }, ), ) targets.mixin( name = "mac_retina_amd_gpu_stable", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "1002:7340", "hidpi": "1", "os": "Mac-14.4.1", "pool": "chromium.tests.gpu", "display_attached": "1", }, ), ) targets.mixin( name = "mac_toolchain", swarming = targets.swarming( cipd_packages = [ targets.cipd_package( package = "infra/tools/mac_toolchain/${platform}", location = ".", revision = "git_revision:07e67ff89ff11ed0e3071867ed6bb49319a91b05", ), ], ), ) targets.mixin( name = "marshmallow", swarming = targets.swarming( dimensions = { "device_os": "MMB29Q", }, ), ) targets.mixin( name = "no_gpu", swarming = targets.swarming( dimensions = { "gpu": "none", }, ), ) # Work around failure to clear tombstones on non-rooted devices. This mixin is # only valid for builders that only run GTest- and telemetry-based suites. targets.mixin( name = "no_tombstones", args = [ "--do-not-store-tombstones", ], ) targets.mixin( name = "nougat", swarming = targets.swarming( dimensions = { "device_os": "N2G48C", }, ), ) targets.mixin( name = "nvidia_geforce_gtx_1660", swarming = targets.swarming( dimensions = { "gpu": "10de:2184", }, ), ) targets.mixin( name = "oreo_mr1_fleet", swarming = targets.swarming( dimensions = { "device_os": "OPM4.171019.021.P2", "device_os_flavor": "google", }, ), ) # Pixel 8 targets.mixin( name = "shiba", swarming = targets.swarming( dimensions = { "device_type": "shiba", "os": "Android", }, ), ) targets.mixin( name = "out_dir_arg", args = [ "--out-dir", "${ISOLATED_OUTDIR}", ], ) # Pixel 7 on Android 14 targets.mixin( name = "panther_on_14", swarming = targets.swarming( dimensions = { "device_type": "panther", "device_os": "AP2A.240705.004", # Android 14 "os": "Android", }, ), ) targets.mixin( name = "puppet_production", swarming = targets.swarming( dimensions = { "puppet_env": "production", }, ), ) targets.mixin( name = "record_failed_tests", args = [ "--record-video", "failed_only", ], ) targets.mixin( name = "skia_gold_test", args = [ "--git-revision=${got_revision}", # BREAK GLASS IN CASE OF EMERGENCY # Uncommenting this argument will bypass all interactions with Skia # Gold in any tests that use it. This is meant as a temporary # emergency stop in case of a Gold outage that's affecting the bots. # "--bypass-skia-gold-functionality", ], precommit_args = [ "--gerrit-issue=${patch_issue}", "--gerrit-patchset=${patch_set}", "--buildbucket-id=${buildbucket_build_id}", ], ) targets.mixin( # Tests that reach out to Skia's gold instance slowdown substantially when # ran on GCE bots without external IPs. By explicitly targeting bots with # external IPs in such tests, we can roll out internal IPs more broadly # without affecting these Skia gold tests. name = "skia_gold_test_on_linux_gce", swarming = targets.swarming( dimensions = { "gce_has_external_ip": "1", }, ), ) targets.mixin( name = "swarming_containment_auto", swarming = targets.swarming( containment_type = "AUTO", ), ) # Pixel Tablet targets.mixin( name = "tangorpro", swarming = targets.swarming( dimensions = { "device_type": "tangorpro", "device_os": "AP1A.240505.005", # Android 14 "os": "Android", }, ), ) targets.mixin( name = "timeout_15m", swarming = targets.swarming( hard_timeout_sec = 900, io_timeout_sec = 900, ), ) targets.mixin( name = "timeout_30m", swarming = targets.swarming( hard_timeout_sec = 1800, io_timeout_sec = 1800, ), ) targets.mixin( name = "updater-default-pool", swarming = targets.swarming( dimensions = { "pool": "chromium.tests", }, ), ) targets.mixin( name = "updater-tests-pool", swarming = targets.swarming( dimensions = { "pool": "chromium.tests.updater", }, ), ) targets.mixin( name = "updater-win-uac-pool", swarming = targets.swarming( dimensions = { "pool": "chromium.win.uac", }, ), ) targets.mixin( name = "use-ios-simulator-cache", args = [ "--use-simulator-cache", ], ) targets.mixin( name = "vaapi_unittest_args", args = [ "--stop-ui", "--gtest_filter=\"VaapiTest.*\"", ], ) targets.mixin( name = "vaapi_unittest_libfake_args", args = [ # Tell libva to do dummy encoding/decoding. For more info, see: # https://github.com/intel/libva/blob/v2.14-branch/va/va_fool.c#L52 "--env-var", "LIBVA_DRIVERS_PATH", "./", "--env-var", "LIBVA_DRIVER_NAME", "libfake", ], ) # Pixel 2 targets.mixin( name = "walleye", swarming = targets.swarming( dimensions = { "device_type": "walleye", "os": "Android", }, ), ) # Common options for gathering code coverage or other FYI data. Run all tests # exactly once, and don't fail the suite for unexpected results. targets.mixin( name = "web-test-coverage", args = [ "--skipped=ignore", "--no-retry-failures", "--no-expectations", ], ) targets.mixin( name = "web-test-leak", args = [ "--additional-expectations", "../../third_party/blink/web_tests/LeakExpectations", "--enable-leak-detection", ], ) targets.mixin( name = "webgpu_cts", args = [ # crbug.com/953991 Ensure WebGPU is ready before running tests "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", ], linux_args = [ "--no-xvfb", "--additional-driver-flag=--enable-features=Vulkan", ], merge = targets.merge( script = "//third_party/blink/tools/merge_web_test_results.py", args = [ "--verbose", ], ), resultdb = targets.resultdb( enable = True, ), ) targets.mixin( name = "webgpu_telemetry_cts", args = [ "--extra-browser-args=--force_high_performance_gpu", "--use-webgpu-power-preference=default-high-performance", ], ) targets.mixin( name = "webview_cts_archive", swarming = targets.swarming( cipd_packages = [ targets.cipd_package( package = "chromium/android_webview/tools/cts_archive", location = "android_webview/tools/cts_archive/cipd", revision = "oW6-jyOPGwPJeLlaldYwrxZoYqzXpjO1OZUdyF3Qq7sC", ), ], ), ) targets.mixin( name = "win10", swarming = targets.swarming( dimensions = { "os": "Windows-10-19045", }, ), ) targets.mixin( name = "win10-any", swarming = targets.swarming( dimensions = { "os": "Windows-10", }, ), ) targets.mixin( name = "win11_amd_780m_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "1002:1900-32.0.21025.10016", "os": "Windows-11-26100", "pool": "chromium.tests.gpu.experimental", }, ), ) targets.mixin( name = "win11_amd_890m_experimental", swarming = targets.swarming( dimensions = { "gpu": "1002:150e-32.0.21025.10016", "os": "Windows-11-26100", "display_attached": "1", "pool": "chromium.tests.gpu.experimental", }, ), ) targets.mixin( name = "win11_amd_rx_5500_xt_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "1002:7340-32.0.21037.1004", "os": "Windows-11-26100", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win11_amd_rx_5500_xt_stable", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "1002:7340-32.0.21037.1004", "os": "Windows-11-26100", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win11_amd_rx_7600_stable", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "1002:7480-32.0.12033.1030", "os": "Windows-11-26100", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win11_qualcomm_snapdragon_x_elite_stable", swarming = targets.swarming( dimensions = { "display_attached": "1", "screen_scaling_percent": "100", "cpu": "arm64", "gpu": "qcom:0c36-31.0.121.1", "os": "Windows-11-26100", "pool": "chromium.tests.gpu", }, ), ) # TODO(crbug.com/479147014): Remove this mixin once all uses have switched to # gpu_win_gce_stable. targets.mixin( name = "win10_gce_gpu_pool", swarming = targets.swarming( dimensions = { "cpu": "x86-64", "gpu": "none", "os": "Windows-10", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win10_intel_uhd_630_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "8086:9bc5-31.0.101.2127", "os": "Windows-10", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win10_intel_uhd_630_stable", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "8086:9bc5-31.0.101.2127", "os": "Windows-10", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win10_intel_uhd_770_stable", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "8086:4680-31.0.101.5333", "os": "Windows-10-19045", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win10_nvidia_gtx_1660_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "10de:2184-32.0.16.1074", "os": "Windows-11-26200", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win10_nvidia_gtx_1660_stable", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "10de:2184-31.0.15.4601", "os": "Windows-10-19045", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win11_nvidia_rtx_4070_super_experimental", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "10de:2783-32.0.15.8129", "os": "Windows-11", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win11_nvidia_rtx_4070_super_stable", swarming = targets.swarming( dimensions = { "display_attached": "1", "gpu": "10de:2783-32.0.15.8129", "os": "Windows-11", "pool": "chromium.tests.gpu", }, ), ) targets.mixin( name = "win11", swarming = targets.swarming( dimensions = { "os": "Windows-11-22631", }, ), ) targets.mixin( name = "win11-any", swarming = targets.swarming( dimensions = { "os": "Windows-11", }, ), ) targets.mixin( name = "win-arm64", swarming = targets.swarming( dimensions = { # Certain tests require 100 percent screen scaling, and all devices # should be configured for this. "screen_scaling_percent": "100", "cpu": "arm64", "os": "Windows-11", }, # win-arm64 is a limited pool with ~100 bots that can be easily # overloaded by few builds. Increase the expiration_sec to 2h to prevent # shards from timing out. expiration_sec = 7200, ), ) # Shards the slower x64 bot to 8 shards (overriding the default of 4 shards). # Since these bots run sequentially to avoid resource starvation, they # take longer to complete the test suite, requiring more shards to keep # the total run time within the builder's limit. targets.mixin( name = "x64_ai_wpt_shards", swarming = targets.swarming( shards = 8, ), ) targets.mixin( name = "x86-64", swarming = targets.swarming( dimensions = { "cpu": "x86-64", }, ), ) targets.mixin( name = "xcode_16_main", args = [ "--xcode-build-version", "16c5032a", ], swarming = targets.swarming( named_caches = [ swarming.cache( name = "xcode_ios_16c5032a", path = "Xcode.app", ), ], ), ) targets.mixin( name = "xcode_27_beta", args = [ "--xcode-build-version", "27a5252f", ], swarming = targets.swarming( named_caches = [ swarming.cache( name = "xcode_ios_27a5252f", path = "Xcode.app", ), ], ), ) targets.mixin( name = "xcode_26_main", args = [ "--xcode-build-version", "17f42", ], swarming = targets.swarming( named_caches = [ swarming.cache( name = "xcode_ios_17f42", path = "Xcode.app", ), ], ), ) targets.mixin( name = "xcodebuild_sim_runner", args = [ "--xcodebuild-sim-runner", ], ) targets.mixin( name = "xctest", args = [ "--xctest", ], ) targets.mixin( name = "force-main-user", args = [ "--force-main-user", ], )