blob: 31b01e85816d6c42ee49cc62d36f6bbeaadd267b [file] [log] [blame]
# Copyright 2023 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/graphics/lib/magma/gnbuild/magma.gni")
source_set("magma_system_tests") {
testonly = true
sources = [
"test_magma_driver.cc",
"test_magma_power_manager.cc",
"test_magma_system_buffer.cc",
"test_magma_system_connection.cc",
"test_magma_system_context.cc",
"test_magma_system_device.cc",
"test_notification_handler.cc",
"test_primary_fidl_server.cc",
]
deps = [
"//sdk/lib/driver/fake-platform-device/cpp",
"//sdk/lib/driver/power/cpp/testing",
"//sdk/lib/driver/testing/cpp",
"//sdk/lib/fit",
"//src/graphics/magma/lib/magma/platform:connection_client",
"//src/graphics/magma/lib/magma/platform:event",
"//src/graphics/magma/lib/magma/test_util:logger_init_helper",
"//src/graphics/magma/lib/magma/util:macros",
"//src/graphics/magma/lib/magma/util:short_macros",
"//src/graphics/magma/lib/magma_service/mock:msd_cpp",
"//src/graphics/magma/lib/magma_service/sys_driver",
"//src/graphics/magma/lib/magma_service/sys_driver:magma_power_manager",
"//src/graphics/magma/lib/magma_service/test_util:command_buffer_helper_cpp",
"//src/graphics/magma/lib/magma_service/test_util:platform_device_helper",
"//third_party/googletest:gtest",
"//zircon/system/ulib/sync:sync-cpp",
]
if (is_fuchsia) {
deps += [ "//src/graphics/magma/lib/magma/platform/zircon:buffer" ]
}
}
cc_test_executable("magma_system_dfv2_test_executable") {
testonly = true
output_name = "magma_system_dfv2_test"
sources = [ "test_magma_driver_base.cc" ]
deps = [
"//sdk/lib/driver/testing/cpp",
"//sdk/lib/driver/testing/cpp:minimal_compat_environment",
"//src/graphics/magma/lib/magma_service/mock:msd_cpp",
"//src/graphics/magma/lib/magma_service/sys_driver:magma_driver_base",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/predicates",
"//zircon/system/ulib/trace",
]
}
cc_test_executable("magma_sys_driver_test_executable") {
testonly = true
output_name = "magma_sys_driver_test"
metadata = {
test_component_manifest_cml = [
{
include = [ "//sdk/lib/syslog/use.shard.cml" ]
},
]
}
deps = [
":magma_system_tests",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
fuchsia_unittest_package("magma_sys_driver_test") {
deps = [ ":magma_sys_driver_test_executable" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
fuchsia_unittest_package("magma_system_dfv2_test") {
deps = [ ":magma_system_dfv2_test_executable" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
deps = [
":magma_sys_driver_test",
":magma_system_dfv2_test",
]
}