blob: 742bd73ea0ee1f797fcac5b139c2674c7cd360ee [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/test.gni")
import("//build/testing/bootfs_test.gni")
import("//build/unification/zx_library.gni")
import("//src/sys/build/components.gni")
group("tests") {
testonly = true
deps = [ ":watchdog-unittest" ]
}
test("watchdog_unittest") {
testonly = true
sources = [ "watchdog_test.cc" ]
deps = [
"//src/storage/lib/watchdog",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxc",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/fs",
"//zircon/system/ulib/syslog",
]
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",
]
host = true
deps = [
"//zircon/public/lib/fbl",
"//zircon/public/lib/fit",
"//zircon/public/lib/zxc",
"//zircon/system/ulib/fs",
]
if (is_fuchsia) {
sources = [ "watchdog.cc" ]
public_deps = [
"//zircon/public/lib/zx",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/syslog",
]
deps += [
"//sdk/lib/fdio",
"//zircon/public/lib/fbl",
"//zircon/system/ulib/inspector",
]
} else {
sources = [ "watchdog_host.cc" ]
}
}