blob: c5302161290e434db881a122e56cc16590647ecc [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("//build/test.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
group("tests") {
testonly = true
deps = [ ":lsusb-test-package" ]
}
test("bin") {
testonly = true
output_name = "lsusb-test"
visibility = [ ":*" ]
sources = [ "test.cc" ]
deps = [
"//sdk/lib/fdio",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/runtime",
"//zircon/system/ulib/syslog",
]
}
executable("lsusb") {
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "lsusb.c" ]
deps = [
"//sdk/fidl/fuchsia.hardware.usb.device:fuchsia.hardware.usb.device_c",
"//sdk/lib/fdio",
"//zircon/public/lib/pretty",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
# A simple test utility that returns the integer value provided to it in its first argument.
test_package("lsusb-test-package") {
deps = [
":bin",
":lsusb",
]
binaries = [
{
name = "lsusb-test"
},
{
name = "lsusb"
},
]
tests = [
{
name = "lsusb-test"
environments = [ nuc_env ]
},
]
}