| # Copyright 2020 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("//src/sys/build/components.gni") |
| |
| executable("bin") { |
| output_name = "build_info" |
| sources = [ |
| "build_info.cc", |
| "build_info.h", |
| "main.cc", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.buildinfo", |
| "//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("build-info") { |
| manifest = "meta/build_info.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("build-info-service") { |
| deps = [ ":build-info" ] |
| } |
| |
| executable("test-bin") { |
| testonly = true |
| output_name = "build_info_unittest" |
| sources = [ |
| "build_info.cc", |
| "build_info.h", |
| "build_info_unittest.cc", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/gtest", |
| "//sdk/fidl/fuchsia.buildinfo", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//third_party/googletest:gtest_main", |
| ] |
| } |
| |
| fuchsia_unittest_package("build-info-unittest") { |
| manifest = "tests/meta/build_info_unittest.cmx" |
| deps = [ ":test-bin" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":build-info-unittest" ] |
| } |