| # Copyright 2019 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("transaction") { |
| sources = [ |
| "buffered_operations_builder.cc", |
| "transaction_handler.cc", |
| ] |
| |
| public = [ |
| "buffered_operations_builder.h", |
| "device_transaction_handler.h", |
| "transaction_handler.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/lib/fit-promise", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/storage/buffer", |
| "//zircon/system/ulib/storage/operation", |
| ] |
| |
| deps = [ |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/storage/operation", |
| ] |
| |
| if (is_fuchsia) { |
| sources += [ |
| "device_transaction_handler.cc", |
| "trace.cc", |
| "trace.h", |
| ] |
| |
| public_deps += [ "//src/lib/storage/block_client/cpp" ] |
| |
| deps += [ |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| # 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" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fs-transaction-tests" ] |
| } |
| |
| test("fs-transaction-test") { |
| output_name = "fs_transaction_test" |
| deps = [ |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/storage/block_client/cpp:fake_device", |
| "//src/lib/storage/vfs/cpp/transaction", |
| ] |
| sources = [ |
| "buffered_operations_builder_test.cc", |
| "device_transaction_handler_test.cc", |
| ] |
| |
| # 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("fs-transaction-tests") { |
| manifest = "meta/fs_transaction_tests.cml" |
| deps = [ ":fs-transaction-test" ] |
| } |