blob: 8a71edac131d352c18441cd17bdcb8e8775a9985 [file] [log] [blame]
# Copyright 2022 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/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import(
"//src/sys/pkg/scripts/gen_eager_package_config/eager_package_config.gni")
if (is_host) {
rustc_library("lib") {
with_unit_tests = true
edition = "2021"
deps = [
"//src/lib/fuchsia-url",
"//src/sys/pkg/lib/channel-config",
"//src/sys/pkg/lib/eager-package-config",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:omaha_client",
"//third_party/rust_crates:serde",
]
test_deps = [
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
]
sources = [ "src/lib.rs" ]
configs += [ "//build/config/rust/lints:clippy_warn_all" ]
}
rustc_binary("gen_eager_package_config") {
edition = "2021"
with_unit_tests = true
deps = [
":lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:serde_json",
]
test_deps = [
"//src/sys/pkg/lib/eager-package-config",
"//third_party/rust_crates:tempfile",
]
sources = [ "src/main.rs" ]
configs += [ "//build/config/rust/lints:clippy_warn_all" ]
}
}
group("tests") {
testonly = true
deps = [
":gen_eager_package_config_test($host_toolchain)",
":lib_test($host_toolchain)",
]
}