| # 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/components.gni") |
| import("//build/test.gni") |
| |
| test("libhwreg-test") { |
| sources = [ |
| "asm-test.cc", |
| "bitfields-test.cc", |
| "indirect-test.cc", |
| ] |
| deps = [ |
| "..:hwreg", |
| "..:hwreg-mock", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| test("libhwreg-i2c-test") { |
| sources = [ "i2c-hwreg-test.cc" ] |
| deps = [ |
| "//sdk/lib/fdio", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/i2c/testing/mock-i2c", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/hwreg-i2c", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| # NOTE: The other tests in this file are zbi tests which are |
| # included from //bundles/bringup:tests. The list below should |
| # instead be reachable from //src:tests. |
| deps = [ |
| ":libhwreg-i2c-test-pkg", |
| ":libhwreg-test($host_toolchain)", |
| ":libhwreg-test-pkg", |
| "asm:tests", |
| ] |
| } |
| |
| fuchsia_unittest_package("libhwreg-test-pkg") { |
| package_name = "libhwreg-test" |
| deps = [ ":libhwreg-test" ] |
| } |
| |
| fuchsia_unittest_package("libhwreg-i2c-test-pkg") { |
| package_name = "libhwreg-i2c-test" |
| deps = [ ":libhwreg-i2c-test" ] |
| } |