blob: 62f45e359bcb2c3ec4d5dc728e5f6266bcb1935d [file] [log] [blame]
# Copyright 2021 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")
static_library("inspect") {
public = [
"node_operations.h",
"operation_tracker.h",
]
sources = [ "operation_tracker/operation_tracker_shared.cc" ]
public_deps = [
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxc",
]
deps = [ "//sdk/lib/syslog/cpp" ]
if (is_fuchsia) {
public += [
"inspect_data.h",
"inspect_tree.h",
]
sources += [
"inspect_data.cc",
"inspect_tree.cc",
"operation_tracker/operation_tracker_fuchsia.cc",
]
public_deps += [
"//src/lib/storage/block_client/cpp",
"//zircon/system/ulib/inspect",
]
deps += [ "//sdk/lib/fit" ]
}
# TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
# Consider switching to the C++ bindings. See linked bug for details.
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}
test("inspect_unittests") {
output_name = "fs-inspect-unittests"
sources = [
"inspect_data_tests.cc",
"inspect_tree_tests.cc",
"operation_tracker/operation_tracker_fuchsia_tests.cc",
]
deps = [
":inspect",
"//sdk/lib/inspect/testing/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/storage/block_client/cpp:fake_device",
"//third_party/googletest:gtest",
]
# TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
# Consider switching to the C++ bindings. See linked bug for details.
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}
fuchsia_unittest_package("vfs-inspect-tests") {
deps = [ ":inspect_unittests" ]
}
group("tests") {
testonly = true
deps = [ ":vfs-inspect-tests" ]
}