blob: c031a18bb9fdb2c2a629e61683f13022505d78e8 [file] [log] [blame]
# 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("//peridot/build/executable_package.gni")
import("//peridot/build/tests_package.gni")
executable_package("suggestion_engine") {
deprecated_bare_package_url = "//build"
meta = [
{
path = "meta/suggestion_engine.cmx"
dest = "suggestion_engine.cmx"
},
]
resources = [
{
path = "resources/mod_pairs.json"
dest = "ranking_data/mod_pairs.json"
},
]
sources = [
"suggestion_engine_main.cc",
]
deps = [
":debug",
":suggestion_engine_impl",
"//garnet/public/lib/component/cpp",
"//peridot/public/fidl/fuchsia.modular",
"//peridot/public/lib/app_driver/cpp",
"//zircon/public/lib/async-loop-cpp",
]
}
source_set("suggestion_engine_impl") {
sources = [
"media_player.cc",
"media_player.h",
"navigation_processor.cc",
"navigation_processor.h",
"next_processor.cc",
"next_processor.h",
"proposal_publisher_impl.cc",
"proposal_publisher_impl.h",
"query_processor.cc",
"query_processor.h",
"query_runner.cc",
"query_runner.h",
"suggestion_engine_helper.cc",
"suggestion_engine_helper.h",
"suggestion_engine_impl.cc",
"suggestion_engine_impl.h",
]
deps = [
":debug",
":interruption_processor",
":models",
"//garnet/public/fidl/fuchsia.media",
"//garnet/public/lib/fsl",
"//garnet/public/lib/media/timeline",
"//peridot/bin/suggestion_engine/decision_policies:all",
"//peridot/bin/suggestion_engine/filters:all",
"//peridot/bin/suggestion_engine/rankers:all",
"//peridot/bin/suggestion_engine/ranking_features:all",
"//peridot/lib/bound_set",
"//peridot/lib/fidl:json_xdr",
"//peridot/lib/util:rate_limited_retry",
"//peridot/public/fidl/fuchsia.modular",
"//peridot/public/lib/context/cpp:context_helper",
]
public_deps = [
":state",
]
}
tests_package("suggestion_engine_unittests") {
deps = [
":suggestion_engine_impl_unittest",
"//peridot/bin/suggestion_engine/decision_policies:rank_over_threshold_decision_policy_unittest",
"//peridot/bin/suggestion_engine/filters:conjugate_ranked_passive_filter_unittest",
"//peridot/bin/suggestion_engine/filters:ranked_active_filter_unittest",
"//peridot/bin/suggestion_engine/filters:ranked_passive_filter_unittest",
"//peridot/bin/suggestion_engine/rankers:linear_ranker_unittest",
"//peridot/bin/suggestion_engine/ranking_features:affinity_ranking_feature_unittest",
"//peridot/bin/suggestion_engine/ranking_features:annoyance_ranking_feature_unittest",
"//peridot/bin/suggestion_engine/ranking_features:dead_story_ranking_feature_unittest",
"//peridot/bin/suggestion_engine/ranking_features:interrupting_ranking_feature_unittest",
"//peridot/bin/suggestion_engine/ranking_features:kronk_ranking_feature_unittest",
"//peridot/bin/suggestion_engine/ranking_features:mod_pair_ranking_feature_unittest",
"//peridot/bin/suggestion_engine/ranking_features:proposal_hint_ranking_feature_unittest",
"//peridot/bin/suggestion_engine/ranking_features:query_match_ranking_feature_unittest",
]
}
source_set("interruption_processor") {
sources = [
"interruptions_processor.cc",
"interruptions_processor.h",
]
deps = [
":models",
"//peridot/bin/suggestion_engine/decision_policies:all",
"//peridot/bin/suggestion_engine/ranking_features:ranking_feature",
"//peridot/public/fidl/fuchsia.modular",
]
}
source_set("state") {
sources = [
"ranked_suggestions_list.cc",
"ranked_suggestions_list.h",
]
deps = [
":models",
"//garnet/public/lib/fxl",
"//peridot/bin/suggestion_engine/filters:base",
"//peridot/bin/suggestion_engine/rankers:ranker",
"//peridot/public/fidl/fuchsia.modular",
"//peridot/public/lib/context/cpp:context_helper",
]
public_deps = [
"//peridot/bin/suggestion_engine/ranking_features:ranking_feature",
]
}
source_set("models") {
sources = [
"ranked_suggestion.cc",
"ranked_suggestion.h",
"suggestion_prototype.cc",
"suggestion_prototype.h",
]
deps = [
"//garnet/public/lib/fxl",
]
public_deps = [
"//peridot/public/fidl/fuchsia.modular",
]
}
source_set("debug") {
sources = [
"debug.cc",
"debug.h",
]
deps = [
":models",
":state",
"//garnet/public/lib/fxl",
"//peridot/public/fidl/fuchsia.modular",
]
public_deps = [
"//peridot/lib/util:idle_waiter",
]
}
executable("suggestion_engine_impl_unittest") {
testonly = true
sources = [
"suggestion_engine_impl_unittest.cc",
]
deps = [
":suggestion_engine_impl",
"//garnet/public/lib/fsl",
"//peridot/bin/sessionmgr/puppet_master:puppet_master_impl",
"//peridot/lib/testing:test_story_command_executor",
"//peridot/lib/testing:test_with_session_storage",
"//peridot/public/fidl/fuchsia.modular",
"//peridot/public/fidl/fuchsia.modular.internal",
"//third_party/googletest:gtest_main",
]
}