| # 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") |
| |
| visibility = [ ":*" ] |
| |
| ############################################################################### |
| # EXECUTABLES |
| ############################################################################### |
| 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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| executable("fidl_oneshot_unittest_exe") { |
| testonly = true |
| |
| sources = [ "fidl_oneshot_unittest.cc" ] |
| |
| deps = [ |
| "//src/developer/forensics/testing:gtest_with_syslog_main", |
| "//src/developer/forensics/testing:unit_test_fixture", |
| "//src/developer/forensics/testing/stubs:channel_control", |
| "//src/developer/forensics/utils:errors", |
| "//src/developer/forensics/utils:fidl_oneshot", |
| "//src/lib/fxl", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| executable("instrumented_binding_set_unittest_exe") { |
| testonly = true |
| |
| sources = [ "instrumented_binding_set_unittest.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.feedback:fuchsia.feedback_hlcpp", |
| "//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", |
| ] |
| } |
| |
| executable("log_format_unittest_exe") { |
| testonly = true |
| |
| sources = [ "log_format_unittest.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_hlcpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/developer/forensics/utils:logs", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| |
| ############################################################################### |
| # 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("fidl_oneshot_unittest") { |
| deps = [ ":fidl_oneshot_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("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" ] |
| } |
| |
| ############################################################################### |
| # PACKAGES |
| ############################################################################### |
| fuchsia_test_package("feedback-utils-tests") { |
| test_components = [ |
| ":archive_unittest", |
| ":cobalt_unittest", |
| ":component_unittest", |
| ":errors_unittest", |
| ":fidl_oneshot_unittest", |
| ":inspect_node_manager_unittest", |
| ":instrumented_binding_set_unittest", |
| ":log_format_unittest", |
| ":previous_boot_file_unittest", |
| ":promise_timeout_unittest", |
| ":time_unittest", |
| ":utc_clock_ready_watcher_unittest", |
| ":utc_time_provider_unittest", |
| ] |
| test_specs = { |
| log_settings = { |
| max_severity = "FATAL" |
| } |
| } |
| } |
| |
| ############################################################################### |
| # GROUPS |
| ############################################################################### |
| group("tests") { |
| testonly = true |
| |
| public_deps = [ ":feedback-utils-tests" ] |
| |
| visibility += [ "//src/developer/forensics:tests" ] |
| } |