| # 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/components.gni") |
| |
| group("testing") { |
| testonly = true |
| deps = [ |
| ":fake-build-info", |
| ":tests", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "fake_build_info" |
| sources = [ |
| "build_info.cc", |
| "build_info.h", |
| "main.cc", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.buildinfo.test", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_component("fake-build-info-component") { |
| testonly = true |
| component_name = "fake_build_info" |
| manifest = "meta/build_info.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("fake-build-info") { |
| testonly = true |
| deps = [ ":fake-build-info-component" ] |
| } |
| |
| executable("test-bin") { |
| testonly = true |
| output_name = "fake_build_info_integration_test" |
| sources = [ |
| "build_info.h", |
| "build_info_test.cc", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.buildinfo", |
| "//sdk/fidl/fuchsia.buildinfo.test", |
| "//sdk/fidl/fuchsia.component", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/component/cpp/testing:cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| ] |
| } |
| |
| fuchsia_component("fake-build-info-test-component") { |
| testonly = true |
| component_name = "fake_build_info_test" |
| manifest = "meta/build_info_integration.cml" |
| deps = [ ":test-bin" ] |
| } |
| |
| fuchsia_test_package("fake-build-info-test") { |
| package_name = "fake_build_info_test" |
| test_components = [ ":fake-build-info-test-component" ] |
| |
| deps = [ ":fake-build-info-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fake-build-info-test" ] |
| } |