| # Copyright 2018 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/config.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| |
| group("test") { |
| testonly = true |
| deps = [ |
| ":max_severity", |
| ":run_test_component_test", |
| ] |
| } |
| |
| executable("bin") { |
| testonly = true |
| output_name = "run_test_component_test" |
| |
| sources = [ "run_test_component_test.cc" ] |
| |
| deps = [ |
| "//garnet/public/lib/gtest", |
| "//sdk/fidl/fuchsia.debugdata", |
| "//sdk/fidl/fuchsia.process", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/fdio", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| executable("coverage_component") { |
| testonly = true |
| |
| sources = [ "coverage_component.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.debugdata", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| rustc_binary("component_to_test_standard_out") { |
| name = "component_to_test_standard_out" |
| source_root = "./component_to_test_standard_out.rs" |
| edition = "2018" |
| |
| deps = [ |
| "//src/lib/syslog/rust:syslog", |
| "//third_party/rust_crates:log", |
| ] |
| |
| sources = [ "component_to_test_standard_out.rs" ] |
| } |
| |
| rustc_binary("error_logging_component") { |
| name = "error_logging_component" |
| source_root = "./error_logging_component.rs" |
| edition = "2018" |
| |
| deps = [ |
| "//src/lib/syslog/rust:syslog", |
| "//third_party/rust_crates:log", |
| ] |
| |
| sources = [ "error_logging_component.rs" ] |
| } |
| |
| test_package("run_test_component_test") { |
| deps = [ |
| ":bin", |
| ":component_to_test_standard_out", |
| ":coverage_component", |
| ":error_logging_component", |
| "//src/diagnostics/archivist/tests/logging-component:bin", |
| ] |
| |
| binaries = [ |
| { |
| name = "coverage_component" |
| }, |
| { |
| name = "logging_component" |
| }, |
| { |
| name = "component_to_test_standard_out" |
| }, |
| { |
| name = "error_logging_component" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/coverage_component.cmx") |
| dest = "coverage_component.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/diagnostics/archivist/tests/logging-component/logging_component.cmx") |
| dest = "logging_component.cmx" |
| }, |
| { |
| path = rebase_path("meta/component_to_test_standard_out.cmx") |
| dest = "component_to_test_standard_out.cmx" |
| }, |
| { |
| path = rebase_path("meta/error_logging_component.cmx") |
| dest = "error_logging_component.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/diagnostics/archivist/tests/logging-component/logging_component.cmx") |
| dest = "logging_component_with_config.cmx" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "run_test_component_test" |
| }, |
| ] |
| } |
| |
| config_data("max_severity") { |
| testonly = true |
| for_pkg = "run_test_component" |
| sources = [ "max_severity_run_test_component_test.json" ] |
| } |