blob: 6258c4ae3fddd20a9e948dd0866405052cfd0a5b [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/test_package.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",
]
}
unittest_package("blobfs-corrupt-tests") {
deps = [ ":blobfs-corrupt-test" ]
tests = [
{
name = "blobfs-corrupt-test"
log_settings = {
max_severity = "ERROR"
}
},
]
}
group("tests") {
testonly = true
deps = [ ":blobfs-corrupt-tests" ]
}