blob: f7eaad250c6283d4f5ae77099c762bbdfe80c19c [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/components.gni")
import("//build/config.gni")
import("//build/fidl/fidl.gni")
fidl("interface") {
# TODO(fxbug.dev/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_bin") {
testonly = true
output_name = "test_sysmgr_service"
sources = [ "test_sysmgr_service.cc" ]
deps = [
":interface",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//zircon/system/ulib/async-default",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zx",
]
}
fuchsia_component("test_sysmgr_service") {
testonly = true
manifest = "meta/test_sysmgr_service.cmx"
deps = [ ":test_sysmgr_service_bin" ]
}
executable("mock_resolver_bin") {
testonly = true
output_name = "mock_resolver"
sources = [ "mock_resolver.cc" ]
deps = [
"//sdk/fidl/fuchsia.pkg",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//src/lib/fxl",
"//zircon/system/ulib/async-default",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zx",
]
}
fuchsia_component("mock_resolver") {
testonly = true
manifest = "meta/mock_resolver.cmx"
deps = [ ":mock_resolver_bin" ]
}
executable("service_startup_test_bin") {
testonly = true
output_name = "service_startup_test"
sources = [ "service_startup_test.cc" ]
deps = [
":interface",
"//sdk/fidl/fuchsia.logger",
"//sdk/lib/sys/cpp",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//src/sys/appmgr/integration_tests/fidl:echo",
"//third_party/googletest:gmock",
]
}
fuchsia_component("service_startup_test") {
testonly = true
manifest = "meta/service_startup_test.cmx"
deps = [
":service_startup_test_bin",
":sysmgr_integration_test_observer_config",
]
}
executable("package_updating_loader_test_bin") {
testonly = true
output_name = "package_updating_loader_test"
sources = [ "package_updating_loader_test.cc" ]
deps = [
":interface",
"//sdk/lib/sys/cpp/testing:integration_fixture",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/storage/vfs/cpp",
"//src/lib/testing/loop_fixture",
"//src/sys/appmgr/integration_tests/fidl:echo",
"//src/sys/sysmgr:lib",
"//zircon/system/ulib/zx",
]
}
fuchsia_component("package_updating_loader_test") {
testonly = true
manifest = "meta/package_updating_loader_test.cmx"
deps = [ ":package_updating_loader_test_bin" ]
}
config_data("sysmgr_integration_test_observer_config") {
for_pkg = "sysmgr-integration-tests"
outputs = [ "service_startup_test.config" ]
sources = [ "config/service_startup_test.config" ]
}
fuchsia_test_package("sysmgr-integration-tests") {
test_components = [
":service_startup_test",
":package_updating_loader_test",
]
deps = [
":mock_resolver",
":test_sysmgr_service",
"//src/sys/appmgr/integration_tests:echo_server",
"//src/sys/sysmgr:sysmgr_component",
]
}
group("integration_tests") {
testonly = true
deps = [ ":sysmgr-integration-tests" ]
}