blob: f2513f3a8345b3a40bc75cbf314b096e3077b5d1 [file] [log] [blame]
# 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("$zx/public/gn/config/standard.gni")
import("$zx/public/gn/toolchain/environment_redirect.gni")
import("$zx/public/gn/zbi.gni")
if (current_cpu != "") {
group("utest") {
testonly = true
deps = [
":host", # TODO(mcgrathr): reach this differently?
"$zx/system/core/bootsvc:bootsvc-tests",
"$zx/system/core/devmgr/devcoordinator:devcoordinator-test",
"$zx/system/core/devmgr/fshost:fshost-test",
"$zx/system/core/virtcon:virtual-console-test",
"$zx/system/dev/backlight/sg-micro:sgm37603a-test",
"$zx/system/dev/block/ftl/test",
"$zx/system/dev/block/fvm/test",
"$zx/system/dev/block/mtk-sdmmc:mtk-sdmmc-test",
"$zx/system/dev/block/usb-mass-storage:tests",
"$zx/system/dev/bluetooth/bt-hci-mediatek:bt-hci-mediatek-test",
"$zx/system/dev/bus/pci:pci_tests",
"$zx/system/dev/bus/virtio:virtio-test",
"$zx/system/dev/gpio/mt-8167:mtk-gpio",
"$zx/system/dev/gpio/qcom-gpio:qcom-gpio-test",
"$zx/system/dev/input/bma253:bma253-test",
"$zx/system/dev/lib/scsi:scsilib-disk-test",
"$zx/system/dev/lib/usb:usb-wrapper-test",
"$zx/system/dev/light-sensor/lite-on:ltr-578als-test",
"$zx/system/dev/nand/broker/test",
"$zx/system/dev/nand/nand/test",
"$zx/system/dev/nand/nandpart:nandpart-test",
"$zx/system/dev/nand/ram-nand:ram-nand-test",
"$zx/system/dev/nand/skip-block:skip-block-test",
"$zx/system/dev/power/msm8x53-power:msm8x53-power-test",
"$zx/system/dev/sysmem/sysmem:sysmem-unittest",
"$zx/system/dev/test/usb",
"$zx/system/dev/thermal/mtk-thermal:mtk-thermal-test",
"$zx/system/dev/usb/mt-musb-host:usb-transaction-test",
"$zx/system/uapp/disk-pave:install-disk-image-test",
"$zx/system/ulib/blobfs/test",
"$zx/system/ulib/bootfs:bootfs-test",
"$zx/system/ulib/ddk:ddk-unittest",
"$zx/system/ulib/driver-integration-test/test",
"$zx/system/ulib/fvm/test",
"$zx/system/ulib/gpt/test",
"$zx/system/ulib/id_allocator/test",
"$zx/system/ulib/io-scheduler:io-scheduler-test",
"$zx/system/ulib/kvstore:kvstore-test",
"$zx/system/ulib/minfs/allocator/test",
"$zx/system/ulib/minfs/test",
"$zx/system/ulib/paver:paver-test",
"$zx/system/ulib/pretty:pretty-test",
"$zx/system/ulib/simplehid/test",
"$zx/system/ulib/storage-metrics/test",
"$zx/system/ulib/tftp:tftp-test",
"$zx/system/ulib/trace-vthread:tests",
"$zx/system/ulib/zbi-bootfs/test:test",
"$zx/system/ulib/zxtest/test",
"abigen",
"async",
"async-loop",
"async-testutils",
"backtrace-request",
"biotime",
"bitmap",
"blobfs",
"blobfs-bench",
"channel-fatal",
"chromeos-disk-setup",
"cleanup",
"cobalt-client",
"compiler",
"core",
"cprng",
"crypto",
"ctor",
"debugger",
"devfs",
"device-enumeration",
"digest",
"dlfcn",
"dlopen-indirect-deps",
"driver-test",
"dump1",
"elf-search",
"entropy",
"errno",
"ethernet",
"events",
"evil",
"exception",
"exit",
"fbl",
"fdio",
"ffl",
"fidl",
"fidl-coding-tables",
"fidl-llcpp-interop",
"fidl-simple",
"fidl-utils",
"fit",
"fpu",
"fs",
"fs-bench",
"fs-management",
"fs-test-utils",
"fs-vnode",
"futex-ownership",
"fuzz-utils",
"fvm",
"fzl",
"getentropy",
"goldfish",
"handle-alias",
"hid",
"hid-parser",
"hypervisor",
"inspect-vmo",
"int-types",
"kcounter",
"kernel-unittests",
"launchpad",
"libfzl",
"libhwreg",
"libzx",
"log",
"logger",
"memfs",
"msd",
"namespace",
"perftest",
"platform-bus",
"policy",
"posixio",
"processor",
"profile",
"property",
"pty",
"qsort",
"race-tests",
"ramdisk",
"region-alloc",
"register-state",
"rtc-lib",
"runtests-utils",
"sanitizer",
"spawn",
"stdio",
"sysconf",
"sysinfo",
"syslog",
"sysmem",
"task-utils",
"thread-initial-state",
"thread-state",
"time",
"timers",
"trace",
"trace-reader",
"usb",
"usb-virtual-bus",
"utf_conversion",
"util",
"vdso",
"vdso-base",
"vdso-variant",
"vmo",
"zbi",
"zxcrypt",
"zxio",
# disabled for now:
#"bad-kernel-access",
# TODO(fuzztest): "edid"
]
if (current_cpu == "x64") {
deps += [ "x86-umip" ]
}
}
# This plus a kernel in deps makes a tiny zbi() that just runs core-tests.
zbi_input("core-tests") {
testonly = true
type = "cmdline"
args = [
"--entry=userboot=bin/core-tests",
"--entry=userboot.shutdown",
]
deps = [
"$zx/system/utest/core:core-tests",
]
}
group("host-tests") {
testonly = true
deps = [
"$zx/system/ulib/fvm/test",
"$zx/system/ulib/zxtest/test",
"cmdline",
"fbl",
"ffl",
"fidl-compiler",
"fit",
"fs-host",
"fvm-host",
"runtests-utils",
"trace-reader",
"util",
"zbi",
]
if (current_os == "linux") {
deps += [
"$zx/system/dev/usb/usb-peripheral-test",
"$zx/system/ulib/ftl-mtd/test",
"ftl-mtd",
"mtd",
]
}
}
}
# Build the host tests for each host.
foreach(host, standard_build_hosts) {
environment_redirect("host-tests-${host.os}-${host.cpu}") {
testonly = true
environment_label = "$zx/public/gn/toolchain:host"
cpu = host.cpu
os = host.os
direct = true
deps = [
":host-tests",
]
}
}
group("host-tests-all-platforms") {
testonly = true
deps = []
foreach(host, standard_build_hosts) {
deps += [ ":host-tests-${host.os}-${host.cpu}" ]
}
}
group("host") {
testonly = true
deps = [
":host-tests-${host_os}-${host_cpu}",
]
}