blob: b72535bb42622d879d64cf9f64735cc466410c6b [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/bind/bind.gni")
import("//build/config/fuchsia/rules.gni")
import("//build/test.gni")
import("//build/test/test_package.gni")
bind_rules("shtv3-bind") {
rules = "shtv3.bind"
output = "shtv3-bind.h"
tests = "shtv3-bind-test.json"
deps = [
"//src/devices/bind/fuchsia.i2c",
"//src/devices/bind/fuchsia.sensirion.platform",
]
}
source_set("common") {
public_deps = [
":shtv3-bind",
"//sdk/fidl/fuchsia.hardware.temperature:fuchsia.hardware.temperature_llcpp",
"//src/devices/i2c/lib/device-protocol-i2c-channel",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/zxc",
]
}
driver_module("shtv3") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "shtv3.cc" ]
deps = [ ":common" ]
}
test("shtv3-test") {
output_name = "shtv3-test"
sources = [
"shtv3-test.cc",
"shtv3.cc",
]
deps = [
":common",
"//src/devices/i2c/testing/fake-i2c",
"//zircon/public/lib/zxtest",
]
}
unittest_package("shtv3-test-package") {
package_name = "shtv3-test"
deps = [ ":shtv3-test" ]
tests = [
{
name = "shtv3-test"
environments = basic_envs
},
]
}
group("tests") {
testonly = true
deps = [
":shtv3-bind_test",
":shtv3-test-package",
]
}