| # Copyright 2024 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("//build/testing/cc_test_executable.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":system_monitor_integration_test", |
| ":system_monitor_unittest", |
| ] |
| } |
| |
| cc_test_executable("system_monitor_integration_test_bin") { |
| testonly = true |
| output_name = "system_monitor_integration_test" |
| |
| sources = [ "system_monitor_integration_test.cc" ] |
| |
| deps = [ |
| "//sdk/lib/async", |
| "//sdk/lib/async-loop:async-loop-cpp", |
| "//sdk/lib/async-loop:async-loop-default", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/ui/bin/system_monitor:lib", |
| ] |
| } |
| |
| fuchsia_test_component("system_monitor_integration_test_component") { |
| component_name = "system_monitor_integration_test" |
| manifest = "meta/system_monitor_integration_test.cml" |
| deps = [ ":system_monitor_integration_test_bin" ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("system_monitor_integration_test") { |
| test_components = [ ":system_monitor_integration_test_component" ] |
| deps = [ "//src/cobalt/bin/system-metrics:cobalt_system_metrics_component" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| cc_test_executable("system_monitor_unittest_bin") { |
| testonly = true |
| sources = [ "system_monitor_unittest.cc" ] |
| deps = [ |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/ui/bin/system_monitor:lib", |
| ] |
| } |
| |
| fuchsia_unittest_package("system_monitor_unittest") { |
| manifest = "meta/system_monitor_unittest.cml" |
| deps = [ ":system_monitor_unittest_bin" ] |
| } |