blob: 8a41d8522fccd7b34b2a5224dba9331cfa5ee0e9 [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.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
source_set("volume-descriptor") {
sources = [
"options.cc",
"volume_descriptor.cc",
]
public = [
"block_io.h",
"options.h",
"volume_descriptor.h",
]
public_deps = [
"utils:guid",
"//third_party/rapidjson",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fit",
]
}
source_set("volume-descriptor-test") {
testonly = true
sources = [
"options_test.cc",
"volume_descriptor_test.cc",
]
deps = [
":volume-descriptor",
"serialization:schema",
"//src/lib/json_parser",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
}
test_package("storage-volume-image-tests") {
deps = [ ":storage-volume-image-test" ]
tests = [
{
name = "storage-volume-image-test"
environments = basic_envs
},
]
resources = [
{
path = rebase_path(
"//src/storage/volume_image/serialization/volume_descriptor.schema.json")
dest = "schema/volume_descriptor.schema.json"
},
{
path = rebase_path(
"//src/storage/volume_image/serialization/address_descriptor.schema.json")
dest = "schema/address_descriptor.schema.json"
},
{
path = rebase_path(
"//src/storage/volume_image/serialization/volume_image.schema.json")
dest = "schema/volume_image.schema.json"
},
]
}
test("storage-volume-image-test") {
deps = [
":volume-descriptor-test",
"fvm:tests",
"serialization:tests",
"utils:tests",
"//src/lib/fxl/test:gtest_main",
]
if (is_fuchsia) {
deps += [ "//zircon/public/lib/fdio" ]
}
}
group("tests") {
testonly = true
deps = [
":storage-volume-image-test($host_toolchain)",
":storage-volume-image-tests",
]
}