blob: 10c5dfc4ccdccf5cc093e7d6ce54d70a820be241 [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/host.gni")
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_binary("bin") {
name = "odu"
version = "0.1.0"
with_unit_tests = true
edition = "2018"
deps = [
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:clap",
"//third_party/rust_crates:libc",
"//third_party/rust_crates:log",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:thiserror",
]
enforce_source_listing = true
sources = [
"src/args.rs",
"src/common_operations.rs",
"src/file_target.rs",
"src/generator.rs",
"src/io_packet.rs",
"src/issuer.rs",
"src/log.rs",
"src/main.rs",
"src/operations.rs",
"src/sequential_io_generator.rs",
"src/target.rs",
"src/verifier.rs",
]
}
package("odu") {
deps = [ ":bin" ]
binaries = [
{
name = "odu"
shell = true
},
]
meta = [
{
path = rebase_path("meta/odu.cmx")
dest = "odu.cmx"
},
]
}
test_package("odu_tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "odu_bin_test"
dest = "odu_bin_test"
environments = basic_envs
},
]
}
install_host_tools("odu_host") {
deps = [ ":bin($host_toolchain)" ]
outputs = [ "odu" ]
}