| # 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_source_set.gni") |
| import("//build/test.gni") |
| |
| sdk_source_set("cpp") { |
| category = "internal" |
| sdk_name = "device-watcher" |
| include_base = "//sdk" |
| sources = [ "device-watcher.cc" ] |
| public = [ "device-watcher.h" ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_cpp", |
| "//sdk/lib/fit", |
| "//zircon/system/ulib/zx", |
| ] |
| deps = [ "//sdk/lib/fdio" ] |
| } |
| |
| test("test") { |
| output_name = "device-watcher-cpp-test" |
| sources = [ "test.cc" ] |
| deps = [ |
| ":cpp", |
| "//sdk/lib/driver_test_realm/simple", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/predicates", |
| "//src/storage/lib/vfs/cpp", |
| "//third_party/googletest:gmock", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/sync:sync-cpp", |
| ] |
| } |
| |
| fuchsia_unittest_package("device-watcher-cpp-test") { |
| deps = [ ":test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":device-watcher-cpp-test" ] |
| } |