blob: 908ca58fd5574394ede2b59784d3ea99eeda7978 [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")
import("//build/testing/environments.gni")
executable("blobfs-corrupt") {
sources = [ "main.cc" ]
deps = [
":common",
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_c",
"//sdk/lib/syslog/cpp",
"//src/storage/blobfs",
"//zircon/public/lib/fbl",
"//zircon/system/ulib/block-client",
"//zircon/system/ulib/digest",
]
}
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/storage/blobfs",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/block-client:fake-device",
"//zircon/system/ulib/digest",
]
}
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/storage/blobfs",
"//zircon/public/lib/fbl",
"//zircon/system/ulib/block-client",
"//zircon/system/ulib/digest",
]
}
unittest_package("blobfs-corrupt-tests") {
deps = [ ":blobfs-corrupt-test" ]
tests = [
{
name = "blobfs-corrupt-test"
environments = basic_envs
log_settings = {
max_severity = "ERROR"
}
},
]
}
group("tests") {
testonly = true
deps = [ ":blobfs-corrupt-tests" ]
}