blob: 5e468efe51e4ee7c2684754f901f8c015d1dc44d [file] [log] [blame]
# Copyright 2018 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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
import("//src/sys/pkg/sysmgr_config.gni")
rustc_binary("bin") {
name = "pkg_cache"
with_unit_tests = true
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//sdk/fidl/fuchsia.space:fuchsia.space-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/inspect/rust/fuchsia-inspect",
"//src/lib/inspect/rust/fuchsia-inspect-contrib",
"//src/lib/syslog/rust:syslog",
"//src/lib/trace/rust:trace",
"//src/lib/trace/rust:trace-provider",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/lib/fuchsia-pkg",
"//src/sys/pkg/lib/pkgfs",
"//src/sys/pkg/lib/system-image",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:openat",
"//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc",
]
test_deps = [
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:tempfile",
]
}
package("pkg-cache") {
deps = [ ":bin" ]
binaries = [
{
name = "pkg_cache"
dest = "pkg-cache"
},
]
meta = [
{
path = rebase_path("meta/pkg-cache.cmx")
dest = "pkg-cache.cmx"
},
]
}
test_package("pkg-cache-tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "pkg_cache_bin_test"
dest = "pkg-cache-bin-test"
environments = basic_envs
},
]
}
sysmgr_config("config") {
source = "sysmgr.config"
}
group("tests") {
testonly = true
public_deps = [ ":pkg-cache-tests" ]
}