| # 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/rust/rustc_library.gni") |
| import("//src/sys/build/components.gni") |
| |
| source_set("cmx_schema_json") { |
| inputs = [ "cmx_schema.json" ] |
| } |
| |
| rustc_library("cm_json") { |
| with_unit_tests = true |
| edition = "2018" |
| deps = [ |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| ] |
| |
| non_rust_deps = [ ":cmx_schema_json" ] |
| |
| test_deps = [ |
| "//src/sys/lib/cm_types", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:matches", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| |
| inputs = [ "cmx_schema.json" ] |
| } |
| |
| fuchsia_unittest_package("cm_json_tests") { |
| manifest = "meta/cm_json_tests.cmx" |
| deps = [ ":cm_json_test" ] |
| test_specs = { |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":cm_json_tests" ] |
| } |