| # 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/fidl/fidl.gni") |
| import("//build/fuzzing/fuzzer.gni") |
| import("//build/package.gni") |
| import("//build/rust/rustc_fuzzer.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/test/test_package.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":diagnostic-stream-fuzzers", |
| ":diagnostic_streams_tests", |
| ] |
| } |
| |
| rustc_library("lib") { |
| name = "diagnostic_streams" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics.stream:fuchsia.diagnostics.stream-rustc", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//third_party/rust_crates:bitfield", |
| "//third_party/rust_crates:nom", |
| ] |
| } |
| |
| unittest_package("diagnostic_streams_tests") { |
| deps = [ ":lib_test" ] |
| |
| tests = [ |
| { |
| name = "diagnostic_streams_lib_test" |
| }, |
| ] |
| } |
| |
| rustc_fuzzer("parse_record_fuzzer") { |
| deps = [ |
| ":lib", |
| "//src/lib/fuzzing/rust:fuzz", |
| ] |
| source_root = "src/fuzzer.rs" |
| } |
| |
| fuzzers_package("diagnostic-stream-fuzzers") { |
| rust_fuzzers = [ ":parse_record_fuzzer" ] |
| } |