# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This BUILD.gn file groups together filter files for particular test suites -
# for example filters applicable to content_browsertests are exposed as
# the //testing/buildbot/filters:content_browsertests target.

# Note that all filter files (for a given test suite) are unconditionally listed
# together, even if some filter files are applicable only to some platforms.
# This should help avoid unpleasant surprises when a bot config is switched in
# testing/buildbot/chromium.fyi.json without corresponding dependency changes
# here - see https://crbug.com/661447.

# To refresh, a command similar to the one below might be run in bash:
# $ for i in $(ls -1 testing/buildbot/filters/*.browser_tests.*filter ); \
#   do echo "    \"//$i\","; done | sort

source_set("android_browsertests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.desktop.android_browsertests.filter",
    "//testing/buildbot/filters/android.desktop.emulator_15.android_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_10.android_browsertests.filter",
  ]
}

source_set("cc_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.emulator.cc_unittests.filter",
    "//testing/buildbot/filters/android.emulator_11_12.cc_unittests.filter",
    "//testing/buildbot/filters/android.device.cc_unittests.filter",
    "//testing/buildbot/filters/fuchsia.debug.cc_unittests.filter",
    "//testing/buildbot/filters/gpu.skiarenderer_dawn_cc_unittests.filter",
    "//testing/buildbot/filters/layer_list_mode.cc_unittests.filter",
    "//testing/buildbot/filters/trees_in_viz.cc_unittests.filter",
  ]
}

source_set("base_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.emulator.base_unittests.filter",
    "//testing/buildbot/filters/android.emulator_14_15_16.base_unittests.filter",
    "//testing/buildbot/filters/android.device_10.tot.base_unittests.filter",
    "//testing/buildbot/filters/android.mte.base_unittests.filter",
    "//testing/buildbot/filters/android.tangorpro.base_unittests.filter",
    "//testing/buildbot/filters/fuchsia.lsan.base_unittests.filter",
  ]
}

source_set("blink_platform_unittests") {
  testonly = true

  data = [
    "//testing/buildbot/filters/trees_in_viz.blink_platform_unittests.filter",
  ]
}

bundle_data("blink_platform_unittests_filters_bundle_data") {
  testonly = true
  sources = [ "//testing/buildbot/filters/ios.blink_platform_unittests.filter" ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

source_set("blink_unittests_filters") {
  testonly = true

  data = [ "//testing/buildbot/filters/trees_in_viz.blink_unittests.filter" ]
}

source_set("blink_web_tests_filter") {
  testonly = true

  data = [ "//testing/buildbot/filters/cft.blink_web_tests.filter" ]
}

source_set("browser_tests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/accessibility-linux.browser_tests.filter",
    "//testing/buildbot/filters/cft.official.browser_tests.filter",
    "//testing/buildbot/filters/chromeos.msan.browser_tests.oobe_negative.filter",
    "//testing/buildbot/filters/chromeos.msan.browser_tests.oobe_positive.filter",
    "//testing/buildbot/filters/code_coverage.browser_tests.filter",
    "//testing/buildbot/filters/linux.asan.browser_tests.filter",
    "//testing/buildbot/filters/linux.linux-rel-cft.browser_tests.filter",
    "//testing/buildbot/filters/linux-arm64-rel-fyi.browser_tests.filter",
    "//testing/buildbot/filters/linux-arm64-wayland-rel-fyi.browser_tests.filter",
    "//testing/buildbot/filters/mac.mac-rel-cft.browser_tests.filter",
    "//testing/buildbot/filters/mac.mac-rel.browser_tests.filter",
    "//testing/buildbot/filters/mac.mac11-arm64-rel.browser_tests.filter",
    "//testing/buildbot/filters/ozone-linux.browser_tests_mutter.filter",
    "//testing/buildbot/filters/ozone-linux.browser_tests_weston.filter",
    "//testing/buildbot/filters/pixel_tests.filter",
    "//testing/buildbot/filters/trees_in_viz.browser_tests.filter",
    "//testing/buildbot/filters/views_ax_chromeos.browser_tests.filter",
    "//testing/buildbot/filters/webrtc_functional.browser_tests.filter",
    "//testing/buildbot/filters/win.win-rel-cft.browser_tests.filter",
  ]
}

source_set("chrome_public_test_apk_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.device_14.chrome_public_test_apk.filter",
    "//testing/buildbot/filters/android.device_14_tablet.chrome_public_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_11.chrome_public_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_12l_landscape.chrome_public_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_14_automotive_landscape.chrome_public_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_15_tablet_landscape.chrome_public_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_15_tablet.chrome_public_test_apk.filter",
  ]
}

source_set("chrome_public_unit_test_apk_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.emulator_14_automotive_landscape.chrome_public_unit_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_15_tablet.chrome_public_unit_test_apk.filter",
  ]
}

source_set("chromeos_filters") {
  data = [
    "//testing/buildbot/filters/chromeos.browser_tests.filter",
    "//testing/buildbot/filters/chromeos.amd64-generic.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/chromeos.gl_unittests.filter",
    "//testing/buildbot/filters/chromeos.media_unittests.filter",
    "//testing/buildbot/filters/chromeos.betty.media_unittests.filter",
    "//testing/buildbot/filters/chromeos.betty.net_unittests.filter",
    "//testing/buildbot/filters/chromeos.reven.chromeos_integration_tests.filter",
    "//testing/buildbot/filters/chromeos.services_unittests.filter",
    "//testing/buildbot/filters/chromeos.unit_tests.filter",
    "//testing/buildbot/filters/chromeos.volteer.gl_tests_passthrough.filter",
  ]
}

source_set("components_unittests_filters") {
  testonly = true

  data =
      [ "//testing/buildbot/filters/android.mte.components_unittests.filter" ]
}

bundle_data("compositor_unittests_filters_bundle_data") {
  testonly = true
  sources = [ "//testing/buildbot/filters/ios.compositor_unittests.filter" ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

bundle_data("components_browsertests_use_blink_filters_bundle_data") {
  testonly = true
  sources = [
    "//testing/buildbot/filters/ios.use_blink.components_browsertests.filter",
    "//testing/buildbot/filters/tvos.components_browsertests.filter",
  ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

bundle_data("components_unittests_use_blink_filters_bundle_data") {
  testonly = true
  sources =
      [ "//testing/buildbot/filters/ios.use_blink.components_unittests.filter" ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

bundle_data("content_unittests_filters_bundle_data") {
  testonly = true
  sources = [
    "//testing/buildbot/filters/ios.content_unittests.filter",
    "//testing/buildbot/filters/tvos.content_unittests.filter",
  ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

bundle_data("gpu_unittests_filters_bundle_data") {
  testonly = true
  sources = [ "//testing/buildbot/filters/ios.gpu_unittests.filter" ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

bundle_data("media_unittests_filters_bundle_data") {
  testonly = true
  sources = [ "//testing/buildbot/filters/ios.media_unittests.filter" ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

bundle_data("midi_unittests_use_blink_filters_bundle_data") {
  testonly = true
  sources = [ "//testing/buildbot/filters/ios.use_blink.midi_unittests.filter" ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

source_set("content_browsertests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/accessibility-linux.content_browsertests.filter",
    "//testing/buildbot/filters/android.asan.content_browsertests.filter",
    "//testing/buildbot/filters/android.bf_cache_content_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_10.content_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_12.content_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_12l.content_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_13.content_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_14.content_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_15.content_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_15_tablet.content_browsertests.filter",
    "//testing/buildbot/filters/android.emulator_16.content_browsertests.filter",
    "//testing/buildbot/filters/android.device_14.content_browsertests.filter",
    "//testing/buildbot/filters/android.device_14_tablet.content_browsertests.filter",
    "//testing/buildbot/filters/android.mte.content_browsertests.filter",
    "//testing/buildbot/filters/chromium.webrtc.fyi.android.tests.dbg.content_browsertests.filter",
    "//testing/buildbot/filters/fuchsia.coverage.content_browsertests.filter",
    "//testing/buildbot/filters/linux-arm64-rel-fyi.content_browsertests.filter",
    "//testing/buildbot/filters/linux-arm64-wayland-rel-fyi.content_browsertests.filter",
    "//testing/buildbot/filters/site_isolation_android.content_browsertests.filter",
    "//testing/buildbot/filters/trees_in_viz.content_browsertests.filter",
    "//testing/buildbot/filters/vulkan.content_browsertests.filter",
  ]
}

bundle_data("content_browsertests_filter_bundle_data") {
  testonly = true
  sources = [ "//testing/buildbot/filters/ios.content_browsertests.filter" ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

source_set("content_junit_tests_filters") {
  testonly = true

  data = []
}

source_set("content_shell_test_apk_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.device.content_shell_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_11.content_shell_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_12.content_shell_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_12l.content_shell_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_13.content_shell_test_apk.filter",
    "//testing/buildbot/filters/android.emulator_14_15_16.content_shell_test_apk.filter",
  ]
}

source_set("content_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.emulator_14.content_unittests.filter",
    "//testing/buildbot/filters/android.emulator_15_16.content_unittests.filter",
    "//testing/buildbot/filters/android.device.content_unittests.filter",
    "//testing/buildbot/filters/fuchsia.lsan.content_unittests.filter",
    "//testing/buildbot/filters/ozone-linux.content_unittests_weston.filter",
    "//testing/buildbot/filters/webrtc.content_unittests.filter",
    "//testing/buildbot/filters/win.win-rel-cft.content_unittests.filter",
  ]
}

source_set("crashpad_tests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.arm64_proguard_rel.crashpad_tests.filter",
    "//testing/buildbot/filters/android.emulator.crashpad_tests.filter",
    "//testing/buildbot/filters/android.mte.crashpad_tests.filter",
  ]
}

source_set("device_unittests_filters") {
  testonly = true

  data = []
}

source_set("sync_integration_tests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/e2e.sync_integration_tests.filter",
    "//testing/buildbot/filters/linux-arm64-rel-fyi.sync_integration_tests.filter",
  ]
}

source_set("compositor_unittests_filters") {
  testonly = true

  data =
      [ "//testing/buildbot/filters/fuchsia.debug.compositor_unittests.filter" ]
}

source_set("snapshot_unittests_filters") {
  testonly = true

  data =
      [ "//testing/buildbot/filters/fuchsia.debug.snapshot_unittests.filter" ]
}

source_set("views_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/fuchsia.debug.views_unittests.filter",
    "//testing/buildbot/filters/fuchsia.views_unittests.filter",
  ]
}

source_set("services_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/fuchsia.services_unittests.filter",
    "//testing/buildbot/filters/fuchsia.lsan.services_unittests.filter",
    "//testing/buildbot/filters/win.qualcomm.snapdragon_x_elite.services_webnn_unittests.filter",
  ]
}

source_set("ui_base_unittests_filters") {
  testonly = true

  data = [ "//testing/buildbot/filters/fuchsia.ui_base_unittests.filter" ]
}

source_set("views_examples_unittests_filters") {
  testonly = true

  data =
      [ "//testing/buildbot/filters/fuchsia.views_examples_unittests.filter" ]
}

source_set("extensions_unittests_filters") {
  testonly = true

  data =
      [ "//testing/buildbot/filters/fuchsia.lsan.extensions_unittests.filter" ]
}

source_set("gin_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.device_10.proguard_rel.gin_unittests.filter",
    "//testing/buildbot/filters/fuchsia.lsan.gin_unittests.filter",
  ]
}

source_set("skia_unittests_filters") {
  testonly = true

  data = []
}

source_set("gl_tests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.arm64_proguard_rel.gl_tests.filter",
    "//testing/buildbot/filters/android.desktop.corsola.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/android.emulator_10.gl_tests.filter",
    "//testing/buildbot/filters/android.emulator_11.gl_tests.filter",
    "//testing/buildbot/filters/android.emulator_12_12l_13.gl_tests.filter",
    "//testing/buildbot/filters/android.moto_g_power_5g.gl_tests.filter",
    "//testing/buildbot/filters/android.pixel_10.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/android.samsung_a13.gl_tests.filter",
    "//testing/buildbot/filters/android.samsung_a23.gl_tests.filter",
    "//testing/buildbot/filters/linux.intel.arc_b570.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/linux.swiftshader.tsan.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/linux.uhd_630.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/linux.uhd_770.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/mac.m2.asan.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/win.amd.7600.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/win.intel.arc_b570.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/win.qualcomm.snapdragon_x_elite.gl_tests_passthrough.filter",
    "//testing/buildbot/filters/win.uhd_770.gl_tests_passthrough.filter",
  ]
}
source_set("gl_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.emulator_12.gl_unittests.filter",
    "//testing/buildbot/filters/win.amd.5500xt.gl_unittests.filter",
    "//testing/buildbot/filters/win.amd.7600.gl_unittests.filter",
    "//testing/buildbot/filters/win.amd.780m.gl_unittests.filter",
    "//testing/buildbot/filters/win.amd.890m.gl_unittests.filter",
    "//testing/buildbot/filters/win.nvidia.gtx.1660.gl_unittests.filter",
    "//testing/buildbot/filters/win.qualcomm.snapdragon_x_elite.gl_unittests.filter",
  ]
}

source_set("interactive_ui_tests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/accessibility-linux.interactive_ui_tests.filter",
    "//testing/buildbot/filters/linux.linux-rel-cft.interactive_ui_tests.filter",
    "//testing/buildbot/filters/linux-arm64-rel-fyi.interactive_ui_tests.filter",
    "//testing/buildbot/filters/linux-arm64-wayland-rel-fyi.interactive_ui_tests.filter",
    "//testing/buildbot/filters/mac.mac11-arm64-rel.interactive_ui_tests.filter",
    "//testing/buildbot/filters/mac.mac-rel-cft.interactive_ui_tests.filter",
    "//testing/buildbot/filters/ozone-linux.interactive_ui_tests.filter",
    "//testing/buildbot/filters/ozone-linux.interactive_ui_tests_mutter.filter",
    "//testing/buildbot/filters/ozone-linux.interactive_ui_tests_weston.filter",
    "//testing/buildbot/filters/pixel_tests.filter",
    "//testing/buildbot/filters/win.win-rel-cft.interactive_ui_tests.filter",
  ]
}

source_set("linux_ozone_views_unittests_filters") {
  data = [
    "//testing/buildbot/filters/ozone-linux.wayland_views_unittests.filter",
  ]
}

source_set("linux_trusty_rel_browser_tests_filters") {
  data = [ "//testing/buildbot/filters/linux_trusty_rel.browser_tests.filter" ]
}

source_set("media_unittests_filters") {
  data = [
    "//testing/buildbot/filters/android.emulator.media_unittests.filter",
    "//testing/buildbot/filters/android.emulator_10.media_unittests.filter",
    "//testing/buildbot/filters/android.emulator_11.media_unittests.filter",
    "//testing/buildbot/filters/android.emulator_14.media_unittests.filter",
    "//testing/buildbot/filters/fuchsia.debug.media_unittests.filter",
    "//testing/buildbot/filters/android.device.media_unittests.filter",
  ]
}

source_set("net_unittests_filters") {
  data = [
    "//testing/buildbot/filters/android.emulator.net_unittests.filter",
    "//testing/buildbot/filters/android.emulator_10.net_unittests.filter",
    "//testing/buildbot/filters/fuchsia.net_unittests.filter",
  ]
}

source_set("ozone_unittests_filters") {
  data = [ "//testing/buildbot/filters/chromeos.ozone_unittests.filter" ]
}

source_set("unit_tests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.asan.unit_tests.filter",
    "//testing/buildbot/filters/android.desktop.emulator_15.unit_tests.filter",
    "//testing/buildbot/filters/android.emulator_14_15_16.unit_tests.filter",
    "//testing/buildbot/filters/ozone-linux.unit_tests_wayland.filter",
    "//testing/buildbot/filters/android.device_14_tablet.unit_tests.filter",
    "//testing/buildbot/filters/linux-arm64-rel-fyi.unit_tests.filter",
  ]
}

source_set("viz_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.emulator_11.viz_unittests.filter",
    "//testing/buildbot/filters/android.emulator_15.viz_unittests.filter",
    "//testing/buildbot/filters/fuchsia.debug.viz_unittests.filter",
    "//testing/buildbot/filters/fuchsia.viz_unittests.filter",
  ]
}

source_set("webview_cts_tests_filters") {
  testonly = true

  data = []
}

source_set("webview_instrumentation_test_apk_filters") {
  testonly = true

  data = [ "//testing/buildbot/filters/android.webview_instrumentation_test_apk_bfcache_mutations.filter" ]
}

source_set("gwp_asan_unittests_filters") {
  testonly = true

  data = [
    "//testing/buildbot/filters/android.emulator_15_16.gwp_asan_unittests.filter",
    "//testing/buildbot/filters/android.device.gwp_asan_unittests.filter",
  ]
}
