| # 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/test.gni") |
| import("//build/testing/bootfs_test.gni") |
| import("//build/zircon/zx_library.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":watchdog-unittest" ] |
| } |
| |
| test("watchdog_unittest") { |
| testonly = true |
| sources = [ "watchdog_test.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/diagnostics/lib/cpp-log-decoder:lib", |
| "//src/diagnostics/lib/cpp-log-tester:cpp-log-tester", |
| "//src/lib/diagnostics/accessor2logger", |
| "//src/lib/fsl", |
| "//src/lib/uuid", |
| "//src/storage/lib/vfs/cpp", |
| "//src/storage/lib/watchdog", |
| "//third_party/rapidjson", |
| "//zircon/system/ulib/async", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| |
| include_dirs = [ ".." ] |
| } |
| |
| bootfs_test("watchdog-unit-bootfs-test") { |
| name = "watchdog-unittest" |
| deps = [ ":watchdog-unittest" ] |
| } |
| |
| fuchsia_unittest_package("watchdog-unittest") { |
| deps = [ ":watchdog_unittest" ] |
| } |
| |
| zx_library("watchdog") { |
| sdk = "source" |
| sdk_headers = [ |
| "lib/watchdog/watchdog.h", |
| "lib/watchdog/operations.h", |
| ] |
| public_deps = [ "//sdk/lib/syslog/cpp" ] |
| deps = [ |
| "//sdk/lib/fit", |
| "//src/storage/lib/vfs/cpp", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zx", |
| ] |
| |
| if (is_fuchsia) { |
| sources = [ "watchdog.cc" ] |
| public_deps += [ |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/zx", |
| ] |
| deps += [ |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/inspector", |
| ] |
| } else { |
| sources = [ "watchdog_host.cc" ] |
| } |
| } |