blob: bb27f64b3f7a1aae93cae24e8570b9a9f342e58f [file] [log] [blame]
# 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/config.gni")
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_test.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_binary("bin") {
name = "fake_factory_store_provider"
edition = "2018"
deps = [
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.factory:fuchsia.factory-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/storage/pseudo-fs",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:structopt",
"//third_party/rust_crates:thiserror",
]
sources = [ "src/main.rs" ]
}
package("fake_factory_store_providers") {
deps = [ ":bin" ]
binaries = [
{
name = "fake_factory_store_provider"
},
]
meta = [
{
path = rebase_path("meta/alpha.cmx")
dest = "alpha.cmx"
},
{
path = rebase_path("meta/cast.cmx")
dest = "cast.cmx"
},
{
path = rebase_path("meta/misc.cmx")
dest = "misc.cmx"
},
{
path = rebase_path("meta/playready.cmx")
dest = "playready.cmx"
},
{
path = rebase_path("meta/weave.cmx")
dest = "weave.cmx"
},
{
path = rebase_path("meta/widevine.cmx")
dest = "widevine.cmx"
},
]
}
rustc_test("fake_factory_store_providers_test") {
edition = "2018"
source_root = "tests/fake_factory_store_providers_test.rs"
deps = [
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.factory:fuchsia.factory-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
]
sources = [ "tests/fake_factory_store_providers_test.rs" ]
}
test_package("fake_factory_store_providers_tests") {
deps = [ ":fake_factory_store_providers_test" ]
tests = [
{
name = "fake_factory_store_providers_test"
},
]
}
config_data("test_fake_factory_store_providers_config") {
for_pkg = "fake_factory_store_providers"
sources = [
"testdata/test_alpha.config",
"testdata/test_cast.config",
"testdata/test_misc.config",
"testdata/test_playready.config",
"testdata/test_weave.config",
"testdata/test_widevine.config",
]
}
group("tests") {
testonly = true
deps = [
":fake_factory_store_providers",
":fake_factory_store_providers_tests",
":test_fake_factory_store_providers_config",
]
}