| # 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/components.gni") |
| |
| executable("sessionmgr_bin") { |
| output_name = "sessionmgr" |
| sources = [ "sessionmgr.cc" ] |
| |
| deps = [ |
| ":sessionmgr_lib", |
| "//sdk/fidl/fuchsia.modular.internal", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/inspect/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/modular/bin/basemgr/cobalt", |
| "//src/modular/lib/app_driver/cpp:app_driver", |
| "//src/modular/lib/modular_config", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/trace-provider:trace-provider-with-fdio", |
| ] |
| } |
| |
| fuchsia_package_with_single_component("sessionmgr") { |
| manifest = "meta/sessionmgr.cmx" |
| deps = [ ":sessionmgr_bin" ] |
| } |
| |
| source_set("sessionmgr_lib") { |
| sources = [ |
| "argv_injecting_launcher.cc", |
| "argv_injecting_launcher.h", |
| "element_controller_impl.cc", |
| "element_controller_impl.h", |
| "element_manager_impl.cc", |
| "element_manager_impl.h", |
| "sessionmgr_impl.cc", |
| "sessionmgr_impl.h", |
| ] |
| |
| public_deps = [ |
| ":startup_agent_launcher", |
| "//sdk/fidl/fuchsia.element", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.modular.internal", |
| "//sdk/fidl/fuchsia.modular.session", |
| "//sdk/fidl/fuchsia.session", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/fidl/fuchsia.ui.app", |
| "//sdk/fidl/fuchsia.ui.policy", |
| "//sdk/fidl/fuchsia.ui.scenic", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/modular/bin/sessionmgr/agent_runner", |
| "//src/modular/lib/deprecated_service_provider", |
| "//src/modular/lib/scoped_tmpfs", |
| ] |
| |
| deps = [ |
| ":annotations", |
| ":component_context", |
| ":session_ctl", |
| ":startup_agent_launcher", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/inspect/cpp", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/fsl", |
| "//src/lib/uuid", |
| "//src/modular/bin/basemgr/cobalt", |
| "//src/modular/bin/sessionmgr/puppet_master:make_production_impl", |
| "//src/modular/bin/sessionmgr/puppet_master:puppet_master_impl", |
| "//src/modular/bin/sessionmgr/puppet_master:story_command_executor", |
| "//src/modular/bin/sessionmgr/storage", |
| "//src/modular/bin/sessionmgr/story_runner", |
| "//src/modular/lib/app_driver/cpp:app_driver", |
| "//src/modular/lib/async/cpp:operation", |
| "//src/modular/lib/common:async_holder", |
| "//src/modular/lib/common:teardown", |
| "//src/modular/lib/fidl:app_client", |
| "//src/modular/lib/fidl:array_to_string", |
| "//src/modular/lib/fidl:clone", |
| "//src/modular/lib/fidl:environment", |
| "//src/modular/lib/fidl:json_xdr", |
| "//src/modular/lib/modular_config", |
| "//src/modular/lib/modular_config:modular_config_accessor", |
| ] |
| |
| # TODO(fxb/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| executable("dev_session_shell_bin") { |
| output_name = "dev_session_shell" |
| |
| sources = [ "dev_session_shell.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.ui.scenic", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//sdk/lib/fidl/cpp", |
| "//src/modular/lib/app_driver/cpp", |
| "//src/modular/lib/fidl:array_to_string", |
| "//src/modular/lib/fidl:single_service_app", |
| "//src/modular/lib/fidl:view_host", |
| "//src/modular/lib/testing:test_driver", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_component("dev_session_shell_component") { |
| component_name = "dev_session_shell" |
| manifest = "meta/dev_session_shell.cmx" |
| deps = [ ":dev_session_shell_bin" ] |
| } |
| |
| fuchsia_package("dev_session_shell") { |
| deps = [ ":dev_session_shell_component" ] |
| } |
| |
| source_set("session_ctl") { |
| sources = [ |
| "session_ctl.cc", |
| "session_ctl.h", |
| ] |
| |
| deps = [ |
| "//sdk/lib/vfs/cpp", |
| "//src/lib/fsl", |
| "//src/lib/storage/vfs/cpp", |
| "//src/modular/bin/sessionmgr/puppet_master:puppet_master_impl", |
| ] |
| } |
| |
| source_set("component_context") { |
| sources = [ |
| "component_context_impl.cc", |
| "component_context_impl.h", |
| ] |
| |
| public_deps = [ "//sdk/fidl/fuchsia.modular" ] |
| |
| deps = [ |
| "//src/lib/fsl", |
| "//src/modular/bin/sessionmgr/agent_runner:public", |
| "//src/modular/lib/async/cpp:operation", |
| "//src/modular/lib/fidl:array_to_string", |
| "//src/modular/lib/fidl:json_xdr", |
| ] |
| } |
| |
| source_set("agent_services_factory") { |
| sources = [ "agent_services_factory.h" ] |
| |
| public_deps = [ "//sdk/fidl/fuchsia.sys" ] |
| } |
| |
| source_set("startup_agent_launcher") { |
| sources = [ |
| "startup_agent_launcher.cc", |
| "startup_agent_launcher.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/public/lib/svc/cpp", |
| "//sdk/lib/sys/cpp", |
| ] |
| |
| deps = [ |
| ":agent_services_factory", |
| ":rate_limited_retry", |
| "agent_runner", |
| "//sdk/fidl/fuchsia.element", |
| "//sdk/fidl/fuchsia.intl", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/lib/syslog/cpp", |
| "//sdk/lib/syslog/cpp:backend_legacy", |
| "//src/modular/lib/connect", |
| "//src/modular/lib/modular_config:modular_config_accessor", |
| ] |
| } |
| |
| source_set("rate_limited_retry") { |
| sources = [ |
| "rate_limited_retry.cc", |
| "rate_limited_retry.h", |
| ] |
| |
| public_deps = [ "//zircon/system/ulib/zx" ] |
| } |
| |
| source_set("annotations") { |
| sources = [ |
| "annotations.cc", |
| "annotations.h", |
| ] |
| |
| deps = [ |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fxl", |
| "//src/modular/lib/string_escape", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.element", |
| "//sdk/fidl/fuchsia.modular", |
| ] |
| } |
| |
| executable("element_manager_impl_unittest") { |
| testonly = true |
| |
| sources = [ "element_manager_impl_unittest.cc" ] |
| |
| deps = [ |
| ":annotations", |
| ":sessionmgr_lib", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/modular/bin/sessionmgr/testing:annotations_matchers", |
| "//src/modular/lib/testing:test_with_session_storage", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_unittest_component("element-manager-impl-unittest") { |
| deps = [ ":element_manager_impl_unittest" ] |
| } |
| |
| executable("element_controller_impl_unittest") { |
| testonly = true |
| |
| sources = [ "element_controller_impl_unittest.cc" ] |
| |
| deps = [ |
| ":annotations", |
| ":sessionmgr_lib", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/modular/bin/sessionmgr/testing:annotations_matchers", |
| "//src/modular/lib/testing:test_with_session_storage", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_unittest_component("element-controller-impl-unittest") { |
| deps = [ ":element_controller_impl_unittest" ] |
| } |
| |
| executable("annotations_unittest") { |
| testonly = true |
| |
| sources = [ "annotations_unittest.cc" ] |
| |
| deps = [ |
| ":annotations", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/modular/bin/sessionmgr/testing:annotations_matchers", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_unittest_component("annotations-unittest") { |
| deps = [ ":annotations_unittest" ] |
| } |
| |
| fuchsia_test_package("sessionmgr_unittests") { |
| test_components = [ |
| ":annotations-unittest", |
| ":element-controller-impl-unittest", |
| ":element-manager-impl-unittest", |
| ] |
| } |