| # 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/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| test_package("feedback_agent_tests") { |
| tests = [ |
| { |
| name = "data_provider_unittest" |
| }, |
| { |
| name = "data_provider_config_unittest" |
| }, |
| { |
| name = "log_listener_unittest" |
| }, |
| { |
| name = "feedback_agent_integration_test" |
| |
| # We need to also test on real devices as we talk to a real Scenic service. |
| environments = basic_envs |
| }, |
| ] |
| |
| resources = [ |
| # needed for data_provider_unittest |
| { |
| path = "resources/checkerboard_100.png" |
| dest = "checkerboard_100.png" |
| }, |
| |
| # needed for data_provider_config_unittest |
| { |
| path = "configs/valid.json" |
| dest = "valid_config.json" |
| }, |
| |
| # needed for data_provider_config_unittest |
| { |
| path = "configs/bad_schema_duplicated_attachment_key.json" |
| dest = "bad_schema_duplicated_attachment_key_config.json" |
| }, |
| |
| # needed for data_provider_config_unittest |
| { |
| path = "configs/bad_schema_spurious_field.json" |
| dest = "bad_schema_spurious_field_config.json" |
| }, |
| |
| # needed for data_provider_config_unittest |
| { |
| path = "configs/bad_schema_missing_required_field.json" |
| dest = "bad_schema_missing_required_field_config.json" |
| }, |
| ] |
| |
| deps = [ |
| ":config_unittest", |
| ":data_provider_unittest", |
| ":feedback_agent_integration_test", |
| ":log_listener_unittest", |
| ] |
| } |
| |
| executable("config_unittest") { |
| testonly = true |
| |
| output_name = "data_provider_config_unittest" |
| |
| sources = [ |
| "config_unittest.cc", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/syslog/cpp", |
| "//src/developer/feedback_agent:src", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| executable("data_provider_unittest") { |
| testonly = true |
| |
| sources = [ |
| "data_provider_unittest.cc", |
| "stub_scenic.cc", |
| "stub_scenic.h", |
| ] |
| |
| deps = [ |
| ":stub_logger", |
| "//garnet/public/lib/fostr", |
| "//garnet/public/lib/fostr/fidl/fuchsia.math", |
| "//garnet/public/lib/fostr/fidl/fuchsia.mem", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/gtest", |
| "//garnet/public/lib/syslog/cpp", |
| "//sdk/fidl/fuchsia.feedback", |
| "//sdk/fidl/fuchsia.images", |
| "//sdk/fidl/fuchsia.math", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/developer/feedback_agent:src", |
| "//src/lib/files", |
| "//src/lib/fxl", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| executable("log_listener_unittest") { |
| testonly = true |
| |
| sources = [ |
| "log_listener_unittest.cc", |
| ] |
| |
| deps = [ |
| ":stub_logger", |
| "//garnet/public/lib/async_promise", |
| "//garnet/public/lib/fostr/fidl/fuchsia.mem", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/gtest", |
| "//garnet/public/lib/syslog/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/developer/feedback_agent:src", |
| "//src/lib/fxl", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/public/fidl/fuchsia-mem", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| executable("feedback_agent_integration_test") { |
| testonly = true |
| |
| sources = [ |
| "feedback_agent_integration_test.cc", |
| ] |
| |
| deps = [ |
| ":zx_object_util", |
| "//garnet/public/lib/fostr/fidl/fuchsia.feedback", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/gtest", |
| "//garnet/public/lib/syslog/cpp", |
| "//sdk/fidl/fuchsia.feedback", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/ui/lib/escher/test:gtest_vulkan", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//third_party/rapidjson", |
| "//zircon/public/fidl/fuchsia-logger", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| source_set("stub_logger") { |
| sources = [ |
| "stub_logger.cc", |
| "stub_logger.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/public/lib/syslog/cpp", |
| "//sdk/lib/fidl/cpp", |
| "//zircon/public/fidl/fuchsia-logger", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| source_set("zx_object_util") { |
| sources = [ |
| "zx_object_util.cc", |
| "zx_object_util.h", |
| ] |
| |
| public_deps = [ |
| "//src/lib/fxl", |
| "//zircon/public/lib/zx", |
| ] |
| } |