| # Copyright 2016 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/testing/environments.gni") |
| import("//peridot/build/tests_package.gni") |
| |
| group("maxwell_integration") { |
| testonly = true |
| deps = [ |
| ":common", |
| ":context_common", |
| ":context_engine_test", |
| ":maxwell_integration_tests", |
| ":maxwell_service_provider_bridge", |
| ":suggestion_engine_test", |
| ":test_suggestion_listener", |
| ] |
| } |
| |
| hermetic_tests_package("maxwell_integration_tests") { |
| deps = [ |
| ":context_engine_test", |
| ":suggestion_engine_test", |
| ] |
| environments = basic_envs |
| } |
| |
| executable("context_engine_test") { |
| testonly = true |
| |
| sources = [ |
| "context_engine_test.cc", |
| ] |
| |
| deps = [ |
| ":context_common", |
| ":maxwell_service_provider_bridge", |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/fsl", |
| "//peridot/bin/context_engine:scope_utils", |
| "//peridot/lib/testing:entity_resolver_fake", |
| "//peridot/public/lib/context/cpp:context_helper", |
| "//peridot/public/lib/context/cpp:context_metadata_builder", |
| "//sdk/fidl/fuchsia.modular", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| executable("suggestion_engine_test") { |
| testonly = true |
| |
| sources = [ |
| "suggestion_engine_test.cc", |
| ] |
| |
| deps = [ |
| ":context_common", |
| ":maxwell_service_provider_bridge", |
| ":test_suggestion_listener", |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/fsl", |
| "//peridot/lib/rapidjson", |
| "//peridot/lib/testing:story_provider_mock", |
| "//peridot/lib/testing:wait_until_idle", |
| "//peridot/public/lib/context/cpp:context_helper", |
| "//sdk/fidl/fuchsia.modular", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| # TODO(rosswang): move utils to a subdirectory |
| |
| source_set("context_common") { |
| testonly = true |
| |
| sources = [ |
| "context_engine_test_base.cc", |
| "context_engine_test_base.h", |
| ] |
| |
| deps = [ |
| ":common", |
| "//peridot/lib/testing:wait_until_idle", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.modular", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| source_set("maxwell_service_provider_bridge") { |
| sources = [ |
| "maxwell_service_provider_bridge.cc", |
| "maxwell_service_provider_bridge.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/svc/cpp", |
| ] |
| } |
| |
| source_set("common") { |
| testonly = true |
| |
| sources = [ |
| "test.cc", |
| "test.h", |
| ] |
| |
| deps = [ |
| ":maxwell_service_provider_bridge", |
| "//peridot/lib/testing:component_context_fake", |
| "//peridot/lib/testing:entity_resolver_fake", |
| ] |
| |
| public_deps = [ |
| "//garnet/public/lib/component/cpp", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| source_set("test_suggestion_listener") { |
| testonly = true |
| |
| sources = [ |
| "test_suggestion_listener.cc", |
| "test_suggestion_listener.h", |
| ] |
| |
| deps = [ |
| "//peridot/public/lib/fostr/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.modular", |
| "//src/lib/fxl", |
| ] |
| |
| public_deps = [ |
| "//third_party/googletest:gtest", |
| ] |
| } |