| # 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/components.gni") | |
| import("//build/testing/environments.gni") | |
| source_set("vmo_store") { | |
| sources = [ | |
| "growable_slab.h", | |
| "owned_vmo_store.h", | |
| "stored_vmo.h", | |
| "vmo_store.h", | |
| ] | |
| public_deps = [ | |
| "//sdk/lib/fit-promise", | |
| "//sdk/lib/stdcompat", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/fzl", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| } | |
| executable("test_bin") { | |
| testonly = true | |
| output_name = "vmo-store-test" | |
| sources = [ | |
| "growable_slab_test.cc", | |
| "map_pin_test.cc", | |
| "owned_vmo_store_test.cc", | |
| "typed_store_test.cc", | |
| ] | |
| deps = [ | |
| ":vmo_store", | |
| "//src/devices/testing/fake-bti", | |
| "//src/lib/fxl/test:gtest_main", | |
| "//src/lib/testing/predicates", | |
| "//third_party/googletest:gtest", | |
| ] | |
| # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings | |
| configs += [ "//build/config:Wno-conversion" ] | |
| } | |
| fuchsia_unittest_package("vmo-store-test") { | |
| deps = [ ":test_bin" ] | |
| test_specs = { | |
| environments = [ emu_env ] | |
| } | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":vmo-store-test" ] | |
| } |