| # Copyright 2018 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") |
| |
| group("storage") { |
| public_deps = [ |
| ":session_storage", |
| ":story_storage", |
| ] |
| } |
| |
| source_set("encode_module_path") { |
| sources = [ |
| "encode_module_path.cc", |
| "encode_module_path.h", |
| ] |
| |
| deps = [ |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fxl", |
| "//src/modular/lib/string_escape", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.modular.internal", |
| ] |
| } |
| |
| executable("encode_module_path_unittest") { |
| testonly = true |
| |
| sources = [ "encode_module_path_unittest.cc" ] |
| |
| deps = [ |
| ":encode_module_path", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_unittest_component("encode-module-path-unittest") { |
| deps = [ ":encode_module_path_unittest" ] |
| } |
| |
| source_set("session_storage") { |
| sources = [ |
| "session_storage.cc", |
| "session_storage.h", |
| ] |
| |
| deps = [ |
| ":watcher_list", |
| "//src/modular/bin/sessionmgr/storage:encode_module_path", |
| "//src/modular/lib/fidl:clone", |
| ] |
| |
| public_deps = [ |
| ":story_storage", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.modular.internal", |
| "//src/modular/bin/sessionmgr:annotations", |
| "//src/modular/lib/async/cpp:future", |
| ] |
| } |
| |
| executable("session_storage_unittest") { |
| testonly = true |
| |
| sources = [ "session_storage_unittest.cc" ] |
| |
| deps = [ |
| ":session_storage", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/modular/bin/sessionmgr/testing:annotations_matchers", |
| "//src/modular/lib/async/cpp:future", |
| "//src/modular/lib/fidl:array_to_string", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/system/public", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_unittest_component("session-storage-unittest") { |
| deps = [ ":session_storage_unittest" ] |
| } |
| |
| source_set("story_storage") { |
| sources = [ |
| "story_storage.cc", |
| "story_storage.h", |
| ] |
| |
| deps = [ |
| ":watcher_list", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/lib/fdio", |
| "//sdk/lib/fit-promise", |
| "//src/lib/fsl", |
| "//src/modular/bin/sessionmgr/storage:encode_module_path", |
| "//src/modular/lib/async/cpp:future", |
| "//src/modular/lib/fidl:clone", |
| ] |
| public_deps = [ "//sdk/fidl/fuchsia.modular.internal" ] |
| } |
| |
| source_set("watcher_list") { |
| sources = [ "watcher_list.h" ] |
| |
| public_deps = [ |
| "//sdk/lib/fit", |
| "//src/lib/fxl", |
| ] |
| } |
| |
| executable("story_storage_unittest") { |
| testonly = true |
| |
| sources = [ "story_storage_unittest.cc" ] |
| |
| deps = [ |
| ":story_storage", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/modular/lib/async/cpp:future", |
| "//third_party/googletest:gtest", |
| "//zircon/system/public", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_unittest_component("story-storage-unittest") { |
| deps = [ ":story_storage_unittest" ] |
| } |
| |
| executable("watcher_list_unittest") { |
| testonly = true |
| |
| sources = [ "watcher_list_unittest.cc" ] |
| |
| deps = [ |
| ":watcher_list", |
| "//sdk/lib/fit", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_unittest_component("watcher-list-unittest") { |
| deps = [ ":watcher_list_unittest" ] |
| } |
| |
| fuchsia_test_package("storage_unittests") { |
| test_components = [ |
| ":encode-module-path-unittest", |
| ":session-storage-unittest", |
| ":story-storage-unittest", |
| ":watcher-list-unittest", |
| ] |
| } |