| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/board.gni") |
| import("//build/testing/validated_test_types_group.gni") |
| |
| assert(is_fuchsia, "These can only be defined in the default toolchain") |
| |
| # For use with the 'hermetic_test_package_labels' GN build argument. |
| # WARNING: Known to infrastructure |
| validated_test_types_group("hermetic_tests") { |
| testonly = true |
| allowed_test_types = [ "hermetic" ] |
| deps = [ "//examples:hermetic_tests" ] |
| } |
| |
| # For use with the 'test_package_labels' GN build argument. |
| # WARNING: Known to infrastructure |
| group("non_hermetic_tests") { |
| testonly = true |
| deps = [] |
| } |
| |
| # For use with the 'e2e_test_labels' GN build argument. |
| # WARNING: Known to infrastructure |
| group("e2e_tests") { |
| testonly = true |
| deps = [] |
| } |
| |
| # WARNING: Known to infrastructure |
| group("core") { |
| testonly = true |
| |
| # The buildbot groups are not allowed to add platform features, only tests and |
| # tools. |
| assert_no_deps = [ "//bundles/platform/*" ] |
| |
| deps = [ |
| ":no_e2e", |
| |
| # Add in e2e tests excluded from `no_e2e`. |
| "//bundles/fidl:tests", |
| "//sdk:tests", |
| ] |
| |
| # The following tests, as e2e tests, require a board to be defined in order to |
| # be valid tests, so they are excluded from builds that don't configure a |
| # board. |
| if (has_board) { |
| deps += [ |
| "//src:e2e_tests", |
| # TODO(https://fxbug.dev/42066250) Re-instate these tests when they correctly |
| # select the environments that they can run on. |
| # |
| # "//tools:e2e_tests", |
| ] |
| } |
| |
| # Ensure paths to known e2e test libs are always up-to-date. |
| deps += e2e_test_libs |
| |
| metadata = { |
| # Disallow test bundles to add shell commands to the main image. |
| shell_commands_barrier = [] |
| } |
| } |
| |
| # WARNING: Known to infrastructure |
| # |
| # This group contains no e2e tests. Tests in this group: |
| # |
| # * Either doesn't transitively depend on any known e2e test libraries; |
| # * Or are unit tests for known e2e test libraries. |
| group("no_e2e") { |
| testonly = true |
| deps = [ ":no_e2e_dep" ] + e2e_lib_unit_tests |
| metadata = { |
| # Disallow test bundles to add shell commands to the main image. |
| shell_commands_barrier = [] |
| } |
| } |
| |
| # This group contains tests that don't depend on any known e2e test libraries. |
| # This happens to exclude unit tests for these e2e libraries, so this group is |
| # not meant to be used directly. It serves as an intermediate group for |
| # constructing `core_no_e2e` below. |
| group("no_e2e_dep") { |
| testonly = true |
| assert_no_deps = e2e_test_libs |
| |
| deps = [ |
| "//build:tests", |
| "//build/bazel/examples", |
| "//examples", |
| "//examples:tests", |
| "//scripts:tests", |
| "//scripts/sdk/gn:tests", |
| "//src/diagnostics:tests", |
| "//src/media/bundles:examples", |
| "//src/media/bundles:services", |
| "//src/media/bundles:tools", |
| "//third_party:tests", |
| |
| # Used by tests, which must not themselves add WebEngine to the product. |
| # See https://fxbug.dev/42070261. |
| "//src/chromium:web_engine", |
| |
| # Used by tests |
| "//src/diagnostics/archivist:archivist-for-embedding", |
| |
| # The following groups have known e2e tests explicitly excluded. |
| "//bundles/fidl:tests_no_e2e", |
| "//sdk:tests_no_e2e", |
| "//src:tests_no_e2e", |
| "//tools:tests_no_e2e", |
| ] |
| metadata = { |
| # Disallow test bundles to add shell commands to the main image. |
| shell_commands_barrier = [] |
| } |
| } |
| |
| # TODO(fxbug.dev/319132749): remove from coverage bot dependencies. |
| group("cuckoo_tests") { |
| testonly = true |
| } |