blob: caf1b8a2f17fe004e25daa7209ecb064250e9b9e [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/components.gni")
import("//build/test.gni")
test("uart-unittests") {
if (is_fuchsia) {
fdio_config = [ "//build/config/fuchsia:fdio_config" ]
if (configs + fdio_config - fdio_config != configs) {
configs -= fdio_config
}
}
sources = [
"amlogic-tests.cc",
"driver-tests.cc",
"geni-tests.cc",
"imx-tests.cc",
"motmot-tests.cc",
"ns8250-tests.cc",
"onlcr-tests.cc",
"parsing-tests.cc",
"pl011-tests.cc",
]
defines = [ "UART_ALL_DRIVERS=1" ]
deps = [
"//sdk/lib/zbi-format",
"//zircon/system/ulib/uart",
"//zircon/system/ulib/uart:uart-mock",
"//zircon/system/ulib/zxtest",
]
if (is_fuchsia) {
deps += [ "//sdk/lib/fdio" ]
}
}
fuchsia_unittest_package("uart-unittests-test-pkg") {
package_name = "uart-unittests"
deps = [ ":uart-unittests" ]
}
group("tests") {
testonly = true
# Note uart-unittests-bootfs-test is not listed here because bootfs_test()
# deps are only allowed in bringup, but the host test is included in other
# configurations. So //bundles/bringup:tests lists the bootfs_test() target
# directly. Maybe one day bringup with bootfs packages will get done
# properly and the distinction between including a test in bringup and
# including a test in another configuration will not impose these kludges.
deps = [
":uart-unittests($host_toolchain)",
":uart-unittests-test-pkg",
"interrupt-test",
"polling-input-test",
]
}