blob: 3873eabd1f6ed2908cc2edd4dabc4bcee28d93a0 [file] [log] [blame]
# 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/config.gni")
import("//build/fidl/fidl.gni")
import("//build/package.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
group("integration_tests") {
testonly = true
deps = [
":appmgr_integration_tests",
":hub_tests",
":realm_tests",
"component_events",
"components",
"fidl",
"inspect",
"logs",
"mock_runner",
"outdir",
"policy",
"sandbox",
"util",
]
}
executable("realm_tests") {
testonly = true
output_name = "appmgr_realm_integration_tests"
sources = [
"mock_runner_registry.cc",
"mock_runner_registry.h",
"realm_integration_test.cc",
"realm_runner_integration_test.cc",
]
deps = [
"fidl:test.component.mockrunner",
"mock_runner:appmgr_mock_runner",
"util:data_file_reader_writer",
"util:data_file_reader_writer_util",
"//garnet//examples/fidl/echo_server_cpp",
"//garnet//examples/fidl/services:echo",
"//garnet/public/lib/gtest",
"//sdk/fidl/fuchsia.sys",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/sys/appmgr:lib",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
]
# TODO(46530): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
executable("hub_tests") {
testonly = true
output_name = "appmgr_hub_integration_tests"
sources = [ "hub_integration_test.cc" ]
deps = [
"//garnet/bin/glob",
"//garnet/bin/sysmgr:lib",
"//garnet/examples/fidl/services:echo",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/inspect_deprecated/query",
"//src/lib/inspect_deprecated/testing",
"//third_party/googletest:gmock",
"//zircon/public/lib/async-cpp",
]
# TODO(46530): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
executable("echo_server") {
testonly = true
output_name = "echo_server_for_test"
sources = [
"echo_server.cc",
"echo_server.h",
]
deps = [
"//garnet/examples/fidl/services:echo",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
]
}
config_data("sysmgr_config") {
for_pkg = "appmgr_integration_tests"
sources = [ rebase_path("//src/sys/sysmgr/config/services.config") ]
}
test_package("appmgr_integration_tests") {
deps = [
":echo_server",
":hub_tests",
":realm_tests",
":sysmgr_config",
"//src/sys/appmgr/integration_tests/inspect:bin-vmo",
]
binaries = [
{
name = "inspect_vmo_test_app"
},
{
name = "echo_server_for_test"
},
]
meta = [
{
path = rebase_path("inspect/meta/inspect_vmo_test_app.cmx")
dest = "appmgr_integration_tests_inspect_test_app.cmx"
},
{
path = rebase_path("meta/echo_server.cmx")
dest = "echo_server.cmx"
},
]
tests = [
{
name = "appmgr_realm_integration_tests"
environments = basic_envs
},
{
name = "appmgr_hub_integration_tests"
environments = basic_envs
},
]
}