blob: 0c194a12492abaa7910d9753dff28ea30ed4eccb [file] [log] [blame]
# Copyright 2019 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/fidl/fidl.gni")
import("//build/test/test_package.gni")
group("tests") {
testonly = true
deps = [
":modular_integration_tests",
":module_with_fake_runner",
"modular_config",
# modular_test_harness is a dep for any test that uses test_harness_fixture
# (all of the tests below). Add it here so that an fx set --with
# //src/modular/tests includes it.
"//src/modular/bin/modular_test_harness",
]
}
executable("agent_services_test") {
testonly = true
output_name = "agent_services_test"
sources = [
"agent_services_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
]
}
executable("last_focus_time_test") {
testonly = true
output_name = "last_focus_time_test"
sources = [
"last_focus_time_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//src/modular/lib/testing:session_shell_impl",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest_main",
]
}
executable("sessionctl_test") {
testonly = true
output_name = "sessionctl_test"
sources = [
"sessionctl_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/fidl/fuchsia.sys",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/bin/sessionctl:lib",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
]
}
executable("session_shell_test") {
testonly = true
sources = [
"session_shell_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/bin/sessionmgr/testing:annotations_matchers",
"//src/modular/lib/modular_config:modular_config_constants",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest_main",
]
}
executable("inspect_session_test") {
testonly = true
sources = [
"inspect_session_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/inspect/testing/cpp",
"//sdk/lib/sys/cpp/testing:integration",
"//sdk/lib/sys/inspect/cpp",
"//src/lib/fsl",
"//src/modular/lib/modular_config",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//src/modular/lib/modular_test_harness/cpp:test_harness_impl",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest_main",
]
}
executable("intents_test") {
testonly = true
sources = [
"intents_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fsl",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
]
}
executable("intl_property_provider_test") {
testonly = true
sources = [
"intl_property_provider_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.intl",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/fidl/fuchsia.sys",
"//sdk/fidl/fuchsia.ui.app",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/lib/app_driver/cpp:module_driver",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
]
}
executable("module_context_test") {
testonly = true
output_name = "module_context_test"
sources = [
"module_context_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fsl",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest_main",
]
}
executable("story_module_test") {
testonly = true
sources = [
"story_module_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.app.discover",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fsl",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
]
}
executable("sessionmgr_integration_test") {
testonly = true
sources = [
"sessionmgr_integration_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.intl",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fsl",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
"//zircon/system/fidl/fuchsia-device-manager",
]
}
executable("story_shell_factory_test") {
testonly = true
sources = [
"story_shell_factory_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//src/modular/lib/testing:session_shell_impl",
"//third_party/googletest:gtest_main",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
]
}
executable("story_shell_test") {
testonly = true
output_name = "story_shell_test"
sources = [
"story_shell_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fsl",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest_main",
]
}
executable("story_shell_embedded_mod_test") {
testonly = true
sources = [
"story_shell_embedded_mod_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//sdk/lib/ui/scenic/cpp",
"//src/lib/fsl",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
]
}
executable("clipboard_test") {
testonly = true
sources = [
"clipboard_test.cc",
]
deps = [
"//peridot/lib/ledger_client:page_client",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/component/cpp",
"//src/modular/bin/agents/clipboard:clipboard_sources",
"//src/modular/bin/basemgr:lib",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//src/modular/lib/testing:ledger_repository_for_testing",
"//third_party/googletest:gtest_main",
]
}
executable("login_override_test") {
testonly = true
output_name = "login_override_test"
sources = [
"login_override_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.devicesettings",
"//sdk/fidl/fuchsia.identity.account",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/fidl/fuchsia.setui",
"//sdk/fidl/fuchsia.stash",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
]
}
executable("component_context_test") {
testonly = true
sources = [
"component_context_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
"//zircon/public/lib/fs",
]
}
executable("stories_share_session_runners_test") {
testonly = true
sources = [
"stories_share_session_runners_test.cc",
]
deps = [
":module_with_fake_runner",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration",
"//src/modular/lib/modular_test_harness/cpp:test_harness_fixture",
"//third_party/googletest:gtest_main",
]
public_configs = [ "//build/config:Wno-reorder-init-list" ]
}
executable("module_with_fake_runner_bin") {
testonly = true
output_name = "module_with_fake_runner"
sources = [
"module_with_fake_runner.cc",
]
deps = [
"//sdk/fidl/fuchsia.modular",
"//sdk/lib/sys/cpp",
"//src/modular/lib/app_driver/cpp:module_driver",
"//src/modular/lib/integration_testing/cpp",
"//zircon/public/lib/async-loop-cpp",
]
}
package("module_with_fake_runner") {
testonly = true
deps = [
":module_with_fake_runner_bin",
]
binaries = [
{
name = "module_with_fake_runner"
},
]
meta = [
{
path = "meta/module_with_fake_runner.cmx"
dest = "module_with_fake_runner.cmx"
},
]
}
test_package("modular_integration_tests") {
tests = [
{
name = "agent_services_test"
environments = basic_envs
},
{
name = "sessionmgr_integration_test"
environments = basic_envs
},
{
name = "last_focus_time_test"
environments = basic_envs
},
{
name = "session_shell_test"
environments = basic_envs
},
{
name = "intents_test"
environments = basic_envs
},
{
name = "inspect_session_test"
environments = basic_envs
},
{
name = "intl_property_provider_test"
environments = basic_envs
},
{
name = "module_context_test"
environments = basic_envs
},
{
name = "story_module_test"
environments = basic_envs
},
{
name = "story_shell_factory_test"
environments = basic_envs
},
{
name = "story_shell_test"
environments = basic_envs
},
{
name = "sessionctl_test"
environments = basic_envs
},
{
name = "story_shell_embedded_mod_test"
environments = basic_envs
},
{
name = "clipboard_test"
environments = basic_envs
},
{
name = "login_override_test"
environments = basic_envs
},
{
name = "component_context_test"
environments = basic_envs
},
{
name = "stories_share_session_runners_test"
environments = basic_envs
},
]
deps = [
":agent_services_test",
":clipboard_test",
":component_context_test",
":inspect_session_test",
":intents_test",
":intl_property_provider_test",
":last_focus_time_test",
":login_override_test",
":module_context_test",
":session_shell_test",
":sessionctl_test",
":sessionmgr_integration_test",
":stories_share_session_runners_test",
":story_module_test",
":story_shell_embedded_mod_test",
":story_shell_factory_test",
":story_shell_test",
]
}