| # 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", |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fdio", |
| "//garnet/public/rust/fuchsia-async", |
| "//garnet/public/rust/fuchsia-component", |
| "//garnet/public/rust/fuchsia-syslog", |
| "//garnet/public/rust/fuchsia-vfs/pseudo-fs", |
| "//garnet/public/rust/fuchsia-zircon", |
| "//sdk/fidl/fuchsia.factory:fuchsia.factory-rustc", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_derive", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:structopt", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| ] |
| } |
| |
| package("fake_factory_store_providers") { |
| deps = [ |
| ":bin", |
| ] |
| |
| binaries = [ |
| { |
| name = "fake_factory_store_provider" |
| }, |
| ] |
| |
| meta = [ |
| { |
| 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/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", |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fuchsia-async", |
| "//garnet/public/rust/fuchsia-component", |
| "//sdk/fidl/fuchsia.factory:fuchsia.factory-rustc", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| ] |
| } |
| |
| 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_cast.config", |
| "testdata/test_misc.config", |
| "testdata/test_playready.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", |
| ] |
| } |