| # 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. |
| |
| visibility = [ "$cobalt_root/*" ] |
| |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("$cobalt_root/metrics_registry.gni") |
| |
| metrics_registry("rustc_registry") { |
| customer_id = 1 |
| project_id = 1 |
| generate_rust = true |
| |
| directories = [ "tests/test_registry" ] |
| } |
| |
| metrics_registry("rustc_registry_ns") { |
| customer_id = 1 |
| project_id = 1 |
| generate_rust = true |
| namespace = "one.two" |
| |
| directories = [ "tests/test_registry" ] |
| } |
| |
| rustc_test("source_generator_interop_test") { |
| edition = "2018" |
| source_root = "tests/source_generator_interop_test.rs" |
| |
| deps = [ |
| ":cobalt-client", |
| ":rustc_registry_ns_rustlib", |
| ":rustc_registry_rustlib", |
| ] |
| |
| if (is_fuchsia_tree) { |
| sources = [ "tests/source_generator_interop_test.rs" ] |
| } |
| } |
| |
| rustc_library("cobalt-client") { |
| name = "cobalt_client" |
| edition = "2018" |
| version = "0.1.0" |
| |
| with_unit_tests = true |
| |
| if (is_fuchsia_tree) { |
| sources = [ |
| "src/lib.rs", |
| "src/traits.rs", |
| ] |
| } |
| |
| visibility = [] |
| visibility = [ "*" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":cobalt-client_test", |
| ":source_generator_interop_test", |
| ] |
| } |