| # Copyright 2021 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("//sdk/ctf/build/ctf.gni") |
| |
| executable("inspect-publisher-bin") { |
| output_name = "inspect-publisher" |
| testonly = true |
| |
| sources = [ "inspect_publisher.cc" ] |
| |
| deps = [ |
| "//sdk/lib/inspect/component/cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| executable("diagnostics-test-bin") { |
| output_name = "diagnostics-test" |
| testonly = true |
| |
| sources = [ "accessor_test.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_hlcpp", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_hlcpp", |
| "//sdk/lib/diagnostics/reader/cpp:archive_reader", |
| "//sdk/lib/fit", |
| "//sdk/lib/sys/cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/zxtest", |
| |
| # TODO(81398): Include this in the SDK. |
| "//sdk/lib/sys/component/cpp/testing:cpp", |
| "//third_party/rapidjson", |
| "//third_party/re2", |
| ] |
| } |
| |
| executable("diagnostics-log-test-bin") { |
| output_name = "diagnostics-log-test" |
| testonly = true |
| |
| sources = [ "logging_test.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_hlcpp", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_hlcpp", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_hlcpp", |
| "//sdk/lib/diagnostics/reader/cpp:archive_reader", |
| "//sdk/lib/fit", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/zxtest", |
| |
| # TODO(81398): Include this in the SDK. |
| "//sdk/lib/sys/component/cpp/testing:cpp", |
| "//third_party/rapidjson", |
| "//third_party/re2", |
| ] |
| } |
| |
| fuchsia_component("diagnostics-test") { |
| component_name = "fuchsia-diagnostics-tests" |
| manifest = "meta/diagnostics-test.cml" |
| testonly = true |
| deps = [ |
| ":diagnostics-test-bin", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_hlcpp", |
| ] |
| } |
| |
| fuchsia_component("diagnostics-log-test") { |
| component_name = "fuchsia-diagnostics-log-tests" |
| manifest = "meta/diagnostics-log-test.cml" |
| testonly = true |
| |
| deps = [ |
| ":diagnostics-log-test-bin", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_hlcpp", |
| ] |
| } |
| |
| fuchsia_component("inspect-publisher") { |
| manifest = "meta/inspect-publisher.cml" |
| testonly = true |
| deps = [ ":inspect-publisher-bin" ] |
| } |
| |
| ctf_fuchsia_package("fuchsia-diagnostics-tests") { |
| package_name = "fuchsia-diagnostics-tests" |
| testonly = true |
| deps = [ |
| ":diagnostics-test", |
| ":inspect-publisher", |
| ] |
| } |
| |
| ctf_fuchsia_package("fuchsia-diagnostics-log-tests") { |
| package_name = "fuchsia-diagnostics-log-tests" |
| testonly = true |
| deps = [ |
| ":diagnostics-log-test", |
| ":inspect-publisher", |
| ] |
| } |
| |
| fuchsia_test_component("fuchsia-diagnostics-tests-root") { |
| manifest = "meta/fuchsia-diagnostics-tests-root.cml" |
| test_type = "ctf" |
| } |
| |
| fuchsia_test_component("fuchsia-diagnostics-log-tests-root") { |
| manifest = "meta/fuchsia-diagnostics-log-tests-root.cml" |
| test_type = "ctf" |
| } |
| |
| fuchsia_test_package("fuchsia-diagnostics-tests-latest") { |
| test_components = [ ":fuchsia-diagnostics-tests-root" ] |
| subpackages = [ ":fuchsia-diagnostics-tests" ] |
| } |
| |
| fuchsia_test_package("fuchsia-diagnostics-log-tests-latest") { |
| test_components = [ ":fuchsia-diagnostics-log-tests-root" ] |
| subpackages = [ ":fuchsia-diagnostics-log-tests" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":fuchsia-diagnostics-log-tests-latest", |
| ":fuchsia-diagnostics-log-tests_archive", |
| ":fuchsia-diagnostics-tests-latest", |
| ":fuchsia-diagnostics-tests_archive", |
| ] |
| } |