blob: 6c7a4e05cd24a68a36e5697556d41bb7153453ee [file]
# 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/fidl/fidl.gni")
import("//build/package.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
fidl("interface") {
# TODO(fxb/35879): Remove lint exclusions by fixing known FIDL lint violations in this target
excluded_checks = [ "string-bounds-not-specified" ]
testonly = true
name = "test.sysmgr"
sources = [ "interface.test.fidl" ]
}
executable("test_sysmgr_service") {
testonly = true
sources = [ "test_sysmgr_service.cc" ]
deps = [
":interface",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//zircon/public/lib/async-default",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
"//zircon/public/lib/zx",
]
}
executable("mock_resolver") {
testonly = true
sources = [ "mock_resolver.cc" ]
deps = [
"//sdk/fidl/fuchsia.pkg",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//src/lib/fxl",
"//zircon/public/lib/async-default",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
"//zircon/public/lib/zx",
]
}
executable("service_startup_test") {
testonly = true
sources = [ "service_startup_test.cc" ]
deps = [
":interface",
"//garnet/examples/fidl/services:echo",
"//garnet/public/lib/gtest",
"//sdk/lib/sys/cpp",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/sys/appmgr:appmgr_for_test",
]
}
executable("package_updating_loader_test") {
testonly = true
sources = [ "package_updating_loader_test.cc" ]
deps = [
":interface",
"//garnet/examples/fidl/services:echo",
"//garnet/public/lib/gtest",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/sys/sysmgr:lib",
"//zircon/public/lib/fs",
"//zircon/public/lib/zx",
]
}
test_package("integration_tests") {
package_name = "sysmgr_integration_tests"
deps = [
":mock_resolver",
":package_updating_loader_test",
":service_startup_test",
":test_sysmgr_service",
]
binaries = [
{
name = "mock_resolver"
},
{
name = "test_sysmgr_service"
},
]
tests = [
{
name = "service_startup_test"
environments = basic_envs
},
{
name = "package_updating_loader_test"
environments = basic_envs
},
]
meta = [
{
path = rebase_path("meta/test_sysmgr_service.cmx")
dest = "test_sysmgr_service.cmx"
},
{
path = rebase_path("meta/mock_resolver.cmx")
dest = "mock_resolver.cmx"
},
]
components =
[ "//garnet/examples/fidl/echo_server_rust:echo_server_rust_component" ]
}