| # Copyright 2018 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/cc_test_executable.gni") | |
| import("//src/virtualization/buildtools/linux_paths.gni") | |
| import("//src/virtualization/buildtools/romfs_image.gni") | |
| cc_test_executable("hypervisor_integration_tests") { | |
| testonly = true | |
| sources = [ | |
| # Common code. | |
| "common_tests.cc", | |
| "constants.h", | |
| "main.cc", | |
| ] | |
| # TODO(https://fxbug.dev/42074367): Implement riscv64 support. | |
| if (target_cpu != "riscv64") { | |
| sources += [ | |
| # Arch-specific code. | |
| "arch/${target_cpu}/arch.cc", | |
| "arch/${target_cpu}/arch_tests.cc", | |
| "arch/${target_cpu}/guest_code.S", | |
| ] | |
| } | |
| deps = [ | |
| "//sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp", | |
| "//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_cpp", | |
| "//sdk/lib/component/incoming/cpp", | |
| "//sdk/lib/syslog/cpp", | |
| "//src/lib/fxl/test:test_settings", | |
| "//src/virtualization/bin/vmm:bits", | |
| "//third_party/googletest:gtest", | |
| "//zircon/kernel/lib/arch", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/page_tables", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| } | |
| fuchsia_unittest_package("hypervisor_tests") { | |
| deps = [ ":hypervisor_integration_tests" ] | |
| manifest = "meta/hypervisor_tests.cml" | |
| test_specs = { | |
| environments = guest_envs | |
| log_settings = { | |
| max_severity = "ERROR" | |
| } | |
| } | |
| test_type = "system" | |
| } | |
| group("hypervisor") { | |
| testonly = true | |
| deps = [ ":hypervisor_tests" ] | |
| } |