blob: b032595f6efc90156e7113b33527fb9cb81864e4 [file] [log] [blame] [edit]
# 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/cpp/sdk_source_set.gni")
sdk_source_set("cpp") {
testonly = true
category = "partner"
sdk_name = "sys_cpp_testing"
include_base = "//sdk"
sources = [
"component_context_provider.cc",
"component_context_provider.h",
"enclosing_environment.cc",
"enclosing_environment.h",
"fake_component.cc",
"fake_component.h",
"fake_launcher.cc",
"fake_launcher.h",
"launcher_impl.cc",
"launcher_impl.h",
"service_directory_provider.cc",
"service_directory_provider.h",
"test_with_environment.cc",
"test_with_environment.h",
]
public_deps = [
"//sdk/fidl/fuchsia.io",
"//sdk/lib/fit",
"//sdk/lib/sys/cpp",
"//sdk/lib/vfs/cpp",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop/testing:async-loop-testing",
]
deps = [ "//sdk/lib/fdio" ]
public_configs = [ "//sdk/config" ]
}
# DEPRECATED, use `:cpp` instead.
group("unit") {
# TODO(fxbug.dev/82270): Remove or refactor deprecated references to `:unit`.
testonly = true
public_deps = [ ":cpp" ]
}
source_set("integration_fixture") {
testonly = true
sources = [ "test_with_environment_fixture.h" ]
public_deps = [
":enclosing_environment",
":realm_builder",
"//garnet/public/lib/gtest",
"//zircon/system/ulib/async-loop/testing:async-loop-testing",
]
}
source_set("enclosing_environment") {
# TODO(fxbug.dev/82270): Consider renaming or refactoring this target.
testonly = true
sources = [
"component_interceptor.cc",
"component_interceptor.h",
]
deps = [
"//sdk/lib/sys/cpp/testing/environment_delegating_runner:bin",
"//third_party/rapidjson",
]
public_deps = [
":cpp",
"//sdk/fidl/fuchsia.sys",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/vfs/cpp",
"//sdk/lib/vfs/cpp",
"//zircon/system/ulib/async-default",
]
public_configs = [ "//sdk/config" ]
}
# Temporarily house RealmBuiler in its own source_set until it's ready to
# be published in SDK. When the library is ready for public consumption, it'll
# be moved to the "unit" package above.
source_set("realm_builder") {
testonly = true
sources = [
"internal/errors.cc",
"internal/errors.h",
"internal/mock_runner.cc",
"internal/mock_runner.h",
"internal/realm.cc",
"internal/realm.h",
"realm_builder.cc",
"realm_builder.h",
"realm_builder_types.cc",
"realm_builder_types.h",
"scoped_child.cc",
"scoped_child.h",
]
public_deps = [
"//garnet/public/lib/gtest",
"//sdk/fidl/fuchsia.component",
"//sdk/fidl/fuchsia.io",
"//sdk/fidl/fuchsia.sys2",
"//sdk/lib/fdio",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//src/lib/fuchsia-component-test/fidl:fuchsia.realm.builder",
"//src/lib/fxl",
"//zircon/system/public:public",
"//zircon/system/ulib/async-loop",
]
}