| # Copyright 2019 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/cipd.gni") | |
| import("//build/components.gni") | |
| import("//build/testing/cc_test_executable.gni") | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":controller_unittest" ] | |
| } | |
| source_set("constants") { | |
| testonly = true | |
| sources = [ "constants.h" ] | |
| public_deps = [ | |
| "//sdk/fidl/fuchsia.camera2:fuchsia.camera2_hlcpp", | |
| "//sdk/fidl/fuchsia.camera2.hal:fuchsia.camera2.hal_hlcpp", | |
| ] | |
| } | |
| cc_test_executable("controller_unittest_bin") { | |
| testonly = true | |
| sources = [ | |
| "allocator_test.cc", | |
| "device_test.cc", | |
| "fake_gdc.h", | |
| "fake_ge2d.h", | |
| "fake_isp.h", | |
| "fake_sysmem.h", | |
| ] | |
| deps = [ | |
| ":constants", | |
| "//sdk/fidl/fuchsia.hardware.camera:fuchsia.hardware.camera_hlcpp", | |
| "//sdk/fidl/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_cpp_testing", | |
| "//sdk/lib/async:async-cpp", | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async-loop:async-loop-default", | |
| "//sdk/lib/async_patterns/testing/cpp", | |
| "//sdk/lib/component/outgoing/cpp", | |
| "//sdk/lib/fit-promise", | |
| "//sdk/lib/sys/cpp", | |
| "//src/camera/drivers/controller:source", | |
| "//src/camera/drivers/controller/sherlock:config", | |
| "//src/camera/drivers/test_utils", | |
| "//src/devices/testing/mock-ddk", | |
| "//src/lib/fxl/test:gtest_main", | |
| "//src/lib/testing/loop_fixture", | |
| ] | |
| if (internal_access) { | |
| defines = [ "INTERNAL_ACCESS" ] | |
| } | |
| } | |
| fuchsia_unittest_package("controller_unittest") { | |
| manifest = "meta/controller_unittest.cml" | |
| deps = [ ":controller_unittest_bin" ] | |
| test_type = "system" | |
| test_specs = { | |
| log_settings = { | |
| max_severity = "ERROR" | |
| } | |
| } | |
| } |