blob: be851b11717fc10ef4a987938efddf70a251b1e5 [file] [log] [blame]
# Copyright 2020 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("//src/sys/build/components.gni")
group("tests") {
testonly = true
deps = [ ":loader-service-test" ]
}
source_set("loader_service") {
sources = [ "loader_service.cc" ]
public_deps = [
"//sdk/fidl/fuchsia.ldsvc:fuchsia.ldsvc_llcpp",
"//zircon/public/lib/async",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxc",
]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_llcpp",
"//sdk/lib/fdio",
"//sdk/lib/syslog/cpp",
"//src/lib/files",
"//zircon/public/lib/fidl",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
# Subclasses of LoaderServiceBase can reuse the test fixture used here.
source_set("loader_service_test_fixture") {
testonly = true
sources = [ "loader_service_test_fixture.cc" ]
public_deps = [
":loader_service",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//src/storage/memfs:memfs-cpp",
"//zircon/public/lib/fbl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
deps = [ "//sdk/fidl/fuchsia.kernel:fuchsia.kernel_llcpp" ]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
executable("loader_service_test") {
testonly = true
sources = [ "loader_service_test.cc" ]
deps = [
":loader_service_test_fixture",
"//zircon/system/ulib/ldmsg",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
fuchsia_unittest_package("loader-service-test") {
manifest = "meta/loader-service-test.cmx"
deps = [ ":loader_service_test" ]
}