| # Copyright 2021 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/components.gni") |
| import("//build/testing/environments.gni") |
| import("//src/starnix/tests/build/starnix_host_test_component.gni") |
| import("//src/starnix/tests/build/starnix_linux_test_component.gni") |
| import("//src/starnix/tests/starnix_test_subpackages.gni") |
| import("//tools/cmc/build/expect_includes.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| "alpine:tests", |
| "android:tests", |
| "diagnostics:tests", |
| "gvisor:tests", |
| "memory_attribution:tests", |
| "power:tests", |
| "reboot:tests", |
| "scheduler:tests", |
| "syscalls:tests", |
| "sysrq:tests", |
| "vdso:tests", |
| ] |
| |
| if (target_cpu == "riscv64") { |
| # TODO(b/297312145): Enable all tests on RISC-V. |
| deps -= [ "gvisor:tests" ] |
| } |
| |
| # TODO(https://fxbug.dev/42067974): Remove !is_asan check when Starnix can run binaries built for |
| # ASAN. |
| if (!is_asan) { |
| if (target_cpu == "x64" && host_os == "linux" && host_cpu == "x64") { |
| deps += [ ":starnix_user_tests" ] |
| } |
| |
| deps += [ ":starnix_magma_tests" ] |
| } |
| } |
| |
| group("benchmarks") { |
| testonly = true |
| deps = [ "gvisor:benchmarks" ] |
| } |
| |
| # Tests that use starnix_test_runner should depend on one of these. |
| expect_includes("starnix_test") { |
| includes = [ "starnix_test.shard.cml" ] |
| } |
| |
| expect_includes("starnix_test_with_expectations") { |
| includes = [ "starnix_test_with_expectations.shard.cml" ] |
| } |
| |
| if (host_os == "linux" && host_cpu == "x64") { |
| starnix_host_test_component("fdio-test") { |
| test_label = "//sdk/lib/fdio/tests:fdio-test" |
| test_type = "starnix" |
| } |
| |
| fuchsia_test_package("starnix_user_tests") { |
| test_components = [ ":fdio-test" ] |
| |
| subpackages = starnix_test_subpackages + |
| [ "//src/starnix/containers/debian:debian_package" ] |
| } |
| } |
| |
| starnix_linux_test_component("virtmagma_conformance_tests") { |
| test_label = |
| "//src/graphics/magma/tests/integration:virtmagma_conformance_tests" |
| test_type = "starnix" |
| } |
| |
| starnix_linux_test_component("virtmagma_sync_file_tests") { |
| test_label = |
| "//src/graphics/magma/tests/integration:virtmagma_sync_file_tests" |
| test_type = "starnix" |
| } |
| |
| starnix_linux_test_component("virtmagma_image_tests") { |
| test_label = |
| "//src/graphics/magma/tests_linux/unit_tests:virtmagma_image_tests" |
| test_type = "starnix" |
| } |
| |
| starnix_linux_test_component("virtmagma_unit_tests") { |
| test_label = |
| "//src/graphics/magma/tests_linux/unit_tests:virtmagma_unit_tests" |
| test_type = "starnix" |
| } |
| |
| fuchsia_test_package("starnix_magma_tests") { |
| test_components = [ |
| ":virtmagma_conformance_tests", |
| ":virtmagma_image_tests", |
| ":virtmagma_unit_tests", |
| ":virtmagma_sync_file_tests", |
| ] |
| |
| subpackages = starnix_test_subpackages + [ |
| "//src/starnix/containers/debian:debian_package", |
| "//src/ui/testing/test_ui_stack:test-ui-stack", |
| ] |
| |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| environments = [ |
| atlas_env, |
| nuc7_env, |
| |
| # TODO(b/341369599): Disable this test in NUC11 until bug is fixed. |
| # nuc11_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| # Used in hermetic Starnix tests to subpackage a netstack component. |
| # TODO(vickiecheng): Update starnix_test_common.shard.cml to launch netstack as a subpackaged |
| # child once every test includes this package. |
| fuchsia_package("netstack_package") { |
| package_name = "netstack" |
| testonly = true |
| deps = [ "//src/connectivity/network/netstack3:component-dropin" ] |
| } |