| # Copyright 2019 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/components/fuchsia_unittest_component.gni") | |
| import("//build/testing/cc_test_executable.gni") | |
| visibility = [ ":*" ] | |
| ############################################################################### | |
| # EXECUTABLES | |
| ############################################################################### | |
| cc_test_executable("archive_unittest_exe") { | |
| testonly = true | |
| sources = [ "archive_unittest.cc" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.feedback:fuchsia.feedback_hlcpp", | |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem_hlcpp", | |
| "//sdk/lib/syslog/cpp", | |
| "//src/developer/forensics/testing:gmatchers", | |
| "//src/developer/forensics/testing:gpretty_printers", | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/utils:archive", | |
| "//src/lib/fsl", | |
| "//src/lib/fxl", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("cobalt_unittest_exe") { | |
| testonly = true | |
| sources = [ "cobalt_unittest.cc" ] | |
| deps = [ | |
| "//src/developer/forensics/testing:gpretty_printers", | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/testing:unit_test_fixture", | |
| "//src/developer/forensics/testing/stubs:cobalt", | |
| "//src/developer/forensics/utils/cobalt", | |
| "//src/lib/timekeeper:testing", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| } | |
| cc_test_executable("component_unittest_exe") { | |
| testonly = true | |
| sources = [ "component_unittest.cc" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.process.lifecycle:fuchsia.process.lifecycle_hlcpp", | |
| "//sdk/lib/sys/cpp", | |
| "//sdk/lib/sys/cpp/testing:unit", | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/utils/component", | |
| "//src/lib/testing/loop_fixture", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("errors_unittest_exe") { | |
| testonly = true | |
| sources = [ "errors_unittest.cc" ] | |
| deps = [ | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/utils:errors", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("inspect_node_manager_unittest_exe") { | |
| testonly = true | |
| sources = [ "inspect_node_manager_unittest.cc" ] | |
| deps = [ | |
| "//sdk/lib/syslog/cpp", | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/testing:unit_test_fixture", | |
| "//src/developer/forensics/utils:inspect_node_manager", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("instrumented_binding_set_unittest_exe") { | |
| testonly = true | |
| sources = [ "instrumented_binding_set_unittest.cc" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.feedback:fuchsia.feedback_cpp", | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/testing:unit_test_fixture", | |
| "//src/developer/forensics/utils:inspect_node_manager", | |
| "//src/developer/forensics/utils:instrumented_binding_set", | |
| ] | |
| } | |
| cc_test_executable("log_format_unittest_exe") { | |
| testonly = true | |
| sources = [ "log_format_unittest.cc" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_cpp", | |
| "//sdk/lib/syslog/cpp", | |
| "//src/developer/forensics/testing:gpretty_printers", | |
| "//src/developer/forensics/utils:logs", | |
| "//src/lib/fxl/test:gtest_main", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("previous_boot_file_unittest_exe") { | |
| testonly = true | |
| sources = [ "previous_boot_file_unittest.cc" ] | |
| deps = [ | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/utils:previous_boot_file", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("promise_timeout_unittest_exe") { | |
| testonly = true | |
| sources = [ "promise_timeout_unittest.cc" ] | |
| deps = [ | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/testing:unit_test_fixture", | |
| "//src/developer/forensics/utils:promise_timeout", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("purge_memory_unittest_exe") { | |
| testonly = true | |
| sources = [ "purge_memory_unittest.cc" ] | |
| deps = [ | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/testing:unit_test_fixture", | |
| "//src/developer/forensics/utils:purge_memory", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("time_unittest_exe") { | |
| testonly = true | |
| sources = [ "time_unittest.cc" ] | |
| deps = [ | |
| "//src/developer/forensics/utils:time", | |
| "//src/lib/fxl/test:gtest_main", | |
| "//src/lib/timekeeper:testing", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("utc_clock_ready_watcher_unittest_exe") { | |
| testonly = true | |
| sources = [ "utc_clock_ready_watcher_unittest.cc" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.time:fuchsia.time_hlcpp", | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/testing:unit_test_fixture", | |
| "//src/developer/forensics/utils:utc_time_provider", | |
| "//src/lib/timekeeper:testing", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("utc_time_provider_unittest_exe") { | |
| testonly = true | |
| sources = [ "utc_time_provider_unittest.cc" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.time:fuchsia.time_hlcpp", | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/testing:unit_test_fixture", | |
| "//src/developer/forensics/utils:utc_clock_ready_watcher", | |
| "//src/developer/forensics/utils:utc_time_provider", | |
| "//src/lib/files", | |
| "//src/lib/timekeeper:testing", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| ] | |
| } | |
| cc_test_executable("vmo_unittest_exe") { | |
| testonly = true | |
| sources = [ "vmo_unittest.cc" ] | |
| deps = [ | |
| "//src/developer/forensics/testing:gtest_with_syslog_main", | |
| "//src/developer/forensics/utils:vmo", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| } | |
| ############################################################################### | |
| # RESOURCES | |
| ############################################################################### | |
| resource("test_data_zip") { | |
| sources = [ "resources/test_data.zip" ] | |
| outputs = [ "data/test_data.zip" ] | |
| } | |
| ############################################################################### | |
| # COMPONENTS | |
| ############################################################################### | |
| fuchsia_unittest_component("archive_unittest") { | |
| deps = [ | |
| ":archive_unittest_exe", | |
| ":test_data_zip", | |
| "//src/sys/test_runners:tmp_storage", | |
| ] | |
| } | |
| fuchsia_unittest_component("cobalt_unittest") { | |
| deps = [ ":cobalt_unittest_exe" ] | |
| } | |
| fuchsia_unittest_component("component_unittest") { | |
| deps = [ | |
| ":component_unittest_exe", | |
| "//src/sys/test_runners:tmp_storage", | |
| ] | |
| } | |
| fuchsia_unittest_component("errors_unittest") { | |
| deps = [ ":errors_unittest_exe" ] | |
| } | |
| fuchsia_unittest_component("inspect_node_manager_unittest") { | |
| deps = [ | |
| ":inspect_node_manager_unittest_exe", | |
| "//src/sys/test_runners/gtest:death_test", | |
| ] | |
| } | |
| fuchsia_unittest_component("instrumented_binding_set_unittest") { | |
| deps = [ ":instrumented_binding_set_unittest_exe" ] | |
| } | |
| fuchsia_unittest_component("log_format_unittest") { | |
| deps = [ ":log_format_unittest_exe" ] | |
| } | |
| fuchsia_component("previous_boot_file_unittest") { | |
| testonly = true | |
| manifest = "meta/previous_boot_file_unittest.cml" | |
| deps = [ ":previous_boot_file_unittest_exe" ] | |
| } | |
| fuchsia_unittest_component("promise_timeout_unittest") { | |
| deps = [ ":promise_timeout_unittest_exe" ] | |
| } | |
| fuchsia_unittest_component("purge_memory_unittest") { | |
| deps = [ ":purge_memory_unittest_exe" ] | |
| } | |
| fuchsia_unittest_component("time_unittest") { | |
| deps = [ | |
| ":time_unittest_exe", | |
| "//src/sys/test_runners/gtest:death_test", | |
| ] | |
| } | |
| fuchsia_unittest_component("utc_clock_ready_watcher_unittest") { | |
| deps = [ ":utc_clock_ready_watcher_unittest_exe" ] | |
| } | |
| fuchsia_component("utc_time_provider_unittest") { | |
| testonly = true | |
| manifest = "meta/utc_time_provider_unittest.cml" | |
| deps = [ ":utc_time_provider_unittest_exe" ] | |
| } | |
| fuchsia_unittest_component("vmo_unittest") { | |
| deps = [ ":vmo_unittest_exe" ] | |
| } | |
| ############################################################################### | |
| # PACKAGES | |
| ############################################################################### | |
| fuchsia_test_package("feedback-utils-tests") { | |
| test_components = [ | |
| ":archive_unittest", | |
| ":cobalt_unittest", | |
| ":component_unittest", | |
| ":errors_unittest", | |
| ":inspect_node_manager_unittest", | |
| ":instrumented_binding_set_unittest", | |
| ":log_format_unittest", | |
| ":previous_boot_file_unittest", | |
| ":promise_timeout_unittest", | |
| ":purge_memory_unittest", | |
| ":time_unittest", | |
| ":utc_clock_ready_watcher_unittest", | |
| ":utc_time_provider_unittest", | |
| ":vmo_unittest", | |
| ] | |
| test_specs = { | |
| log_settings = { | |
| max_severity = "FATAL" | |
| } | |
| } | |
| } | |
| ############################################################################### | |
| # GROUPS | |
| ############################################################################### | |
| group("tests") { | |
| testonly = true | |
| public_deps = [ ":feedback-utils-tests" ] | |
| visibility += [ "//src/developer/forensics:tests" ] | |
| } |