blob: 72fc6dc506b3abaa0b30e90568822b65d2a796b9 [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("//src/sys/build/components.gni")
rustc_binary("bin") {
name = "mock_cobalt"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc",
"//sdk/fidl/fuchsia.cobalt.test:fuchsia.cobalt.test-rustc",
"//src/lib/async-utils",
"//src/lib/cobalt/rust:fuchsia-cobalt",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon-status",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("component") {
component_name = "mock_cobalt"
testonly = true
manifest = "meta/mock_cobalt.cmx"
deps = [ ":bin" ]
}
# TODO: migrate to `fuchsia_package`.
package("mock_cobalt") {
deps = [ ":bin" ]
binaries = [
{
name = "mock_cobalt"
},
]
meta = [
{
path = rebase_path("meta/mock_cobalt.cmx")
dest = "mock_cobalt.cmx"
},
]
}
test_package("tests") {
package_name = "mock-cobalt-tests"
deps = [ ":bin_test" ]
tests = [
{
name = "mock_cobalt_bin_test"
dest = "mock-cobalt-unittests"
},
]
}