| # Copyright 2019 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/bind/bind.gni") |
| import("//build/components.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":gpt-device-test", |
| ":gpt_bind_test", |
| ] |
| } |
| |
| bind_rules("gpt_bind") { |
| disable_autobind = true |
| rules = "gpt.bind" |
| output = "gpt_bind.h" |
| tests = "bind_tests.json" |
| deps = [ "//src/devices/bind/fuchsia.hardware.block" ] |
| } |
| |
| driver_module("gpt") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "gpt.cc" ] |
| deps = [ |
| ":gpt_bind", |
| "//sdk/banjo/fuchsia.hardware.block", |
| "//sdk/banjo/fuchsia.hardware.block.partition", |
| "//sdk/lib/fit", |
| "//sdk/lib/syslog/cpp:backend_legacy", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| "//src/storage/gpt", |
| "//zircon/public/lib/cksum", |
| "//zircon/public/lib/sync", |
| "//zircon/system/ulib/utf_conversion", |
| ] |
| } |
| |
| test("gpt-device-test-bin") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "gpt-device-test" |
| sources = [ |
| "gpt.cc", |
| "gpt_device_test.cc", |
| ] |
| deps = [ |
| ":gpt_bind", |
| "//sdk/banjo/fuchsia.hardware.block", |
| "//sdk/banjo/fuchsia.hardware.block.partition", |
| "//sdk/lib/fit", |
| "//src/devices/testing/fake_ddk", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//src/storage/gpt", |
| "//zircon/public/lib/cksum", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/utf_conversion", |
| ] |
| } |
| |
| fuchsia_unittest_package("gpt-device-test") { |
| deps = [ ":gpt-device-test-bin" ] |
| } |