| # 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/package.gni") |
| import("//build/testing/environments.gni") |
| import("//peridot/build/executable_package.gni") |
| import("//peridot/build/tests_package.gni") |
| import("//third_party/flatbuffers/flatbuffer.gni") |
| |
| declare_args() { |
| # Whether basemgr should automatically login as a persistent guest user. |
| auto_login_to_guest = false |
| } |
| |
| executable_package("basemgr") { |
| meta = [ |
| { |
| path = "meta/basemgr.cmx" |
| dest = "basemgr.cmx" |
| }, |
| ] |
| |
| sources = [ |
| "basemgr_impl.cc", |
| "basemgr_impl.h", |
| "basemgr_settings.cc", |
| "basemgr_settings.h", |
| "main.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| ":wait_for_minfs", |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/fxl", |
| "//garnet/public/lib/json", |
| "//peridot/bin/basemgr/cobalt", |
| "//peridot/lib/common:async_holder", |
| "//peridot/lib/common:teardown", |
| "//peridot/lib/fidl:app_client", |
| "//peridot/lib/fidl:array_to_string", |
| "//peridot/lib/fidl:clone", |
| "//peridot/lib/fidl:environment", |
| "//peridot/lib/ledger_client:constants", |
| "//peridot/lib/modular_config:modular_config", |
| "//peridot/public/lib/async/cpp:future", |
| "//sdk/fidl/fuchsia.auth", |
| "//sdk/fidl/fuchsia.auth.account", |
| "//sdk/fidl/fuchsia.devicesettings", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.modular.auth", |
| "//sdk/fidl/fuchsia.modular.internal", |
| "//sdk/fidl/fuchsia.modular.session", |
| "//sdk/fidl/fuchsia.setui", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/fidl/fuchsia.ui.app", |
| "//sdk/fidl/fuchsia.ui.policy", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//sdk/fidl/fuchsia.wlan.service", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/fxl", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/trace-provider", |
| ] |
| |
| public_deps = [ |
| "//peridot/bin/basemgr/cobalt:basemgr_metrics_registry", |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path( |
| get_label_info( |
| "//peridot/bin/basemgr/cobalt:basemgr_metrics_registry", |
| "target_gen_dir") + "/basemgr_metrics_registry.pb") |
| dest = "basemgr_metrics_registry.pb" |
| }, |
| ] |
| } |
| |
| tests_package("basemgr_unittests") { |
| deps = [ |
| ":session_context_impl_unittest", |
| ] |
| environments = basic_envs |
| } |
| |
| source_set("wait_for_minfs") { |
| sources = [ |
| "wait_for_minfs.cc", |
| "wait_for_minfs.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/public/lib/fsl", |
| "//src/lib/fxl", |
| ] |
| } |
| |
| source_set("lib") { |
| sources = [ |
| "presentation_container.cc", |
| "presentation_container.h", |
| "session_context_impl.cc", |
| "session_context_impl.h", |
| "session_provider.cc", |
| "session_provider.h", |
| "session_user_provider_impl.cc", |
| "session_user_provider_impl.h", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/fsl", |
| "//peridot/lib/common:async_holder", |
| "//peridot/lib/common:teardown", |
| "//peridot/lib/fidl:app_client", |
| "//peridot/lib/fidl:array_to_string", |
| "//peridot/lib/fidl:clone", |
| "//peridot/lib/fidl:environment", |
| "//peridot/lib/fidl:json_xdr", |
| "//peridot/lib/modular_config", |
| "//peridot/public/lib/async/cpp:future", |
| "//sdk/fidl/fuchsia.modular.session", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/fidl/fuchsia.ui.gfx", |
| "//sdk/fidl/fuchsia.ui.input", |
| "//sdk/fidl/fuchsia.ui.policy", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//src/lib/fxl", |
| "//zircon/public/lib/trace", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.auth", |
| "//sdk/fidl/fuchsia.auth.account", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.modular.auth", |
| "//sdk/fidl/fuchsia.modular.internal", |
| ] |
| |
| if (auto_login_to_guest) { |
| public_configs = [ ":auto_login_to_guest" ] |
| } |
| } |
| |
| executable_package("dev_base_shell") { |
| meta = [ |
| { |
| path = "meta/dev_base_shell.cmx" |
| dest = "dev_base_shell.cmx" |
| }, |
| ] |
| |
| sources = [ |
| "dev_base_shell.cc", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/callback", |
| "//peridot/lib/fidl:single_service_app", |
| "//peridot/public/lib/app_driver/cpp", |
| "//peridot/public/lib/integration_testing/cpp", |
| "//sdk/fidl/fuchsia.auth.account", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//src/lib/fxl", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| executable("auto_login_base_shell_bin") { |
| output_name = "auto_login_base_shell" |
| |
| sources = [ |
| "auto_login_base_shell.cc", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/callback", |
| "//peridot/lib/fidl:single_service_app", |
| "//peridot/public/lib/app_driver/cpp", |
| "//sdk/fidl/fuchsia.auth.account", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//src/lib/fxl", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| package("auto_login_base_shell") { |
| deps = [ |
| ":auto_login_base_shell_bin", |
| ] |
| |
| binaries = [ |
| { |
| name = "auto_login_base_shell" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = "meta/auto_login_base_shell.cmx" |
| dest = "auto_login_base_shell.cmx" |
| }, |
| ] |
| } |
| |
| executable("auto_login_base_shell_test_bin") { |
| testonly = true |
| |
| output_name = "auto_login_base_shell_test" |
| |
| sources = [ |
| "auto_login_base_shell_test.cc", |
| ] |
| |
| deps = [ |
| "//peridot/public/lib/modular_test_harness/cpp:test_harness_fixture", |
| "//sdk/fidl/fuchsia.modular.testing", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:integration", |
| "//third_party/googletest:gtest_main", |
| ] |
| } |
| |
| package("auto_login_base_shell_test") { |
| testonly = true |
| |
| deps = [ |
| ":auto_login_base_shell_bin", |
| ":auto_login_base_shell_test_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "auto_login_base_shell_test" |
| environments = basic_envs |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = "meta/auto_login_base_shell_test.cmx" |
| dest = "auto_login_base_shell_test.cmx" |
| }, |
| ] |
| } |
| |
| executable("session_context_impl_unittest") { |
| testonly = true |
| |
| sources = [ |
| "session_context_impl_unittest.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/component/cpp/testing:fake_launcher", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/gtest", |
| "//peridot/lib/fidl:clone", |
| "//src/lib/fxl", |
| "//third_party/googletest:gtest_main", |
| ] |
| } |
| |
| config("auto_login_to_guest") { |
| defines = [ "AUTO_LOGIN_TO_GUEST" ] |
| } |