| # 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/components.gni") |
| import("//build/dist/resource.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_test("driver") { |
| name = "amberctl-test" |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.space:fuchsia.space-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.update:fuchsia.update-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", |
| "//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext", |
| "//src/sys/pkg/lib/fidl-fuchsia-amber-ext", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| resource("testdata") { |
| sources = [ |
| "data/test-with-versions.json", |
| "data/test.json", |
| ] |
| outputs = [ "data/sources/{{source_file_part}}" ] |
| } |
| |
| fuchsia_unittest_component("amberctl-test") { |
| deps = [ |
| ":driver", |
| ":testdata", |
| ] |
| manifest = "meta/amberctl-test.cmx" |
| } |
| |
| fuchsia_test_package("amberctl-tests") { |
| test_components = [ ":amberctl-test" ] |
| deps = [ |
| "//src/sys/pkg/bin/amber:component", |
| "//src/sys/pkg/bin/pkg-resolver:isolated", |
| "//src/sys/pkg/lib/fuchsia-pkg-testing/certs", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":amberctl-tests" ] |
| } |