blob: 2dd7cc16b405a7a27e5fbc690b87ed4c84a52b28 [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")
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",
]
}
executable("volume-descriptor-test") {
testonly = true
sources = [
"options_test.cc",
"volume_descriptor_test.cc",
]
deps = [
":volume-descriptor",
"serialization:schema",
"//src/lib/fxl/test:gtest_main",
"//src/lib/json_parser",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/public/lib/fdio",
]
}
unittest_package("storage-volume-image-tests") {
deps = [
":volume-descriptor-test",
"serialization:serialization-test",
"utils:utils-test",
]
tests = [
{
name = "volume-descriptor-test"
environments = basic_envs
},
{
name = "utils-test"
environments = basic_envs
},
{
name = "serialization-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"
},
]
}
group("tests") {
testonly = true
deps = [ ":storage-volume-image-tests" ]
}