blob: 63fb849f29bd22a38e1fbd7fae56895d2d818fcd [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("//src/sys/build/components.gni")
executable("blobfs-corrupt") {
sources = [ "main.cc" ]
deps = [
":common",
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_c",
"//sdk/lib/syslog/cpp",
"//src/lib/digest",
"//src/storage/blobfs",
"//zircon/public/lib/fbl",
"//zircon/system/ulib/block-client",
]
}
executable("blobfs-corrupt-test") {
testonly = true
output_name = "blobfs-corrupt-test"
sources = [ "test/corrupt_blob_test.cc" ]
include_dirs = [ "." ]
deps = [
":common",
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_c",
"//src/lib/digest",
"//src/storage/blobfs",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/block-client:fake-device",
]
}
source_set("common") {
sources = [
"corrupt_blob.cc",
"fs_block_client.cc",
]
deps = [
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_c",
"//sdk/lib/syslog/cpp",
"//src/lib/digest",
"//src/storage/blobfs",
"//zircon/public/lib/fbl",
"//zircon/system/ulib/block-client",
]
}
fuchsia_unittest_package("blobfs-corrupt-tests") {
deps = [ ":blobfs-corrupt-test" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
deps = [ ":blobfs-corrupt-tests" ]
}