| # Copyright 2024 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/cpp/sdk_source_set.gni") |
| import("//build/test.gni") |
| |
| sdk_source_set("cpp") { |
| category = "partner" |
| stable = true |
| sdk_name = "driver_fake_mmio_reg_cpp" |
| include_base = "//sdk" |
| |
| sources = [ |
| "fake-mmio-reg.cc", |
| "fake-mmio-reg.h", |
| ] |
| |
| deps = [ "//zircon/system/ulib/mmio-ptr" ] |
| |
| public_deps = [ |
| "//sdk/lib/fit", |
| "//src/devices/lib/mmio", |
| ] |
| |
| public_configs = [ "//sdk/config" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fake-mmio-reg-test-bin" ] |
| } |
| |
| test("fake-mmio-reg-test-bin") { |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| output_name = "fake-mmio-reg-cpp-test" |
| sources = [ "fake-mmio-reg-test.cc" ] |
| deps = [ |
| ":cpp", |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("fake-mmio-reg-test") { |
| deps = [ ":fake-mmio-reg-test-bin" ] |
| } |