blob: bed66b8fb737deb0d2bd085a0804af64492e7470 [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("//build/components.gni")
import("//build/cpp/sdk_shared_library.gni")
import("//build/test.gni")
sdk_shared_library("cpp") {
# TODO(https://fxbug.dev/89042): C++ does not have a stable API and this library
# should be an sdk_source_set once LLCPP is in the SDK.
category = "experimental"
sdk_name = "device-watcher"
output_name = "device-watcher"
libcxx_linkage = "static"
sources = [
"device-watcher.cc",
"device-watcher.h",
]
public_deps = [
"//zircon/system/ulib/async",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxc",
]
deps = [
"//sdk/fidl/fuchsia.device:fuchsia.device_llcpp",
"//sdk/fidl/fuchsia.io:fuchsia.io_llcpp",
"//sdk/lib/fdio",
]
}
test("test") {
output_name = "device-watcher-cpp-test"
sources = [ "test.cc" ]
deps = [
":cpp",
"//sdk/fidl/fuchsia.device:fuchsia.device_llcpp",
"//sdk/lib/driver_test_realm/simple",
"//src/lib/storage/vfs/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("device-watcher-cpp-test") {
deps = [ ":test" ]
}
group("tests") {
testonly = true
deps = [ ":device-watcher-cpp-test" ]
}