blob: 93b05a6b5a280ba2235ce8f197ae920b864d01c5 [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")
group("test") {
testonly = true
deps = [ ":uart-unittests($host_toolchain)" ]
# 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.
}
test("uart-unittests") {
if (is_fuchsia) {
configs += [ "//build/unification/config:zircon-migrated" ]
}
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",
"ns8250-tests.cc",
"onlcr-tests.cc",
"parsing-tests.cc",
"pl011-tests.cc",
]
deps = [
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/uart",
"//zircon/system/ulib/uart:uart-mock",
]
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
deps = [ ":uart-unittests-test-pkg" ]
}