| # Copyright 2023 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") |
| |
| executable("cpu_profiler_integration_test_bin") { |
| testonly = true |
| output_name = "cpu_profiler_integration_test" |
| sources = [ |
| "component_controlling_test.cc", |
| "integration_test.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.cpu.profiler:fuchsia.cpu.profiler_cpp", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/performance/lib/fxt", |
| "//zircon/system/ulib/trace-reader", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_test_component("cpu_profiler_integration_test_component") { |
| manifest = "meta/cpu_profiler_integration_test.cml" |
| deps = [ ":cpu_profiler_integration_test_bin" ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("cpu_profiler_integration_test") { |
| test_components = [ ":cpu_profiler_integration_test_component" ] |
| deps = [ |
| "//src/performance/cpu_profiler:cpu_profiler_component", |
| "//src/performance/cpu_profiler/tests/demo_target:demo_target_component", |
| |
| # Include some executables for the tests to launch |
| "//src/performance/cpu_profiler/tests/demo_target:bin", |
| "//src/performance/cpu_profiler/tests/thread_spawner", |
| ] |
| subpackages = [ |
| "demo_target", |
| "component_with_children", |
| ] |
| |
| test_specs = { |
| parallel = 1 |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| executable("cpu_profiler_unittest_bin") { |
| sources = [ |
| "fxt_writer_test.cc", |
| "process_watcher_test.cc", |
| "targets_test.cc", |
| ] |
| deps = [ |
| "//src/lib/fxl/test:gtest_main", |
| "//src/performance/cpu_profiler:lib", |
| "//src/performance/lib/fxt", |
| ] |
| testonly = true |
| } |
| |
| fuchsia_unittest_package("cpu_profiler_unittests") { |
| deps = [ ":cpu_profiler_unittest_bin" ] |
| } |
| |
| executable("gtest_target_bin") { |
| sources = [ "gtest_target.cc" ] |
| deps = [ |
| "//sdk/lib/async:async-cpp", |
| "//sdk/lib/async-loop:async-loop-cpp", |
| "//sdk/lib/async-loop:async-loop-default", |
| "//sdk/lib/fdio", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| testonly = true |
| } |
| |
| fuchsia_unittest_package("gtest_target") { |
| deps = [ ":gtest_target_bin" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":cpu_profiler_integration_test", |
| ":cpu_profiler_unittests", |
| ] |
| } |
| |
| group("e2e_tests") { |
| testonly = true |
| public_deps = [ "//src/performance/cpu_profiler/tests/end_to_end:e2e_tests" ] |
| } |