blob: 1acb882d5bb9a31824635e48aa6928b6c5df7baa [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/components.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_test.gni")
rustc_test("storage_integration_test_bin") {
name = "storage_integration_test"
edition = "2021"
source_root = "integration_test.rs"
deps = [
"//sdk/fidl/fuchsia.component:fuchsia.component_rust",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component-test",
"//src/sys/lib/component-events",
]
sources = [ "integration_test.rs" ]
}
rustc_test("storage_admin_integration_test_bin") {
name = "storage_admin_integration_test"
edition = "2021"
source_root = "admin_integration_test.rs"
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-component-test",
"//src/lib/fuchsia-fs",
"//src/sys/lib/component-events",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:maplit",
]
sources = [ "admin_integration_test.rs" ]
}
rustc_binary("storage_realm_admin_bin") {
name = "storage_realm_admin"
edition = "2021"
source_root = "storage_realm_admin.rs"
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-fs",
"//src/sys/lib/component-events",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:maplit",
]
sources = [ "storage_realm_admin.rs" ]
}
rustc_binary("storage_realm_coll_bin") {
name = "storage_realm_coll"
edition = "2021"
source_root = "storage_realm_coll.rs"
deps = [
"//sdk/fidl/fuchsia.component:fuchsia.component_rust",
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-fs",
"//src/sys/lib/component-events",
]
sources = [ "storage_realm_coll.rs" ]
}
rustc_binary("storage_realm_coll_invalid_route_bin") {
name = "storage_realm_coll_invalid_route"
edition = "2021"
source_root = "storage_realm_coll_invalid_route.rs"
deps = [
"//sdk/fidl/fuchsia.component:fuchsia.component_rust",
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/sys/lib/component-events",
]
sources = [ "storage_realm_coll_invalid_route.rs" ]
}
rustc_binary("storage_user_bin") {
name = "storage_user"
edition = "2021"
source_root = "storage_user.rs"
deps = [ "//src/lib/fuchsia" ]
sources = [ "storage_user.rs" ]
}
rustc_binary("storage_user_with_instance_id_bin") {
name = "storage_user_with_instance_id"
edition = "2021"
source_root = "storage_user_with_instance_id.rs"
deps = [ "//src/lib/fuchsia" ]
sources = [ "storage_user_with_instance_id.rs" ]
}
rustc_binary("only_exits_bin") {
name = "only_exits"
edition = "2021"
source_root = "only_exits.rs"
deps = []
sources = [ "only_exits.rs" ]
}
fuchsia_component("storage_user") {
deps = [ ":storage_user_bin" ]
manifest = "meta/storage_user.cml"
}
fuchsia_component("storage_user_with_instance_id") {
deps = [ ":storage_user_with_instance_id_bin" ]
manifest = "meta/storage_user_with_instance_id.cml"
}
fuchsia_component("storage_realm") {
manifest = "meta/storage_realm.cml"
}
fuchsia_component("storage_realm_admin") {
deps = [ ":storage_realm_admin_bin" ]
manifest = "meta/storage_realm_admin.cml"
}
fuchsia_component("storage_realm_coll") {
deps = [ ":storage_realm_coll_bin" ]
manifest = "meta/storage_realm_coll.cml"
}
fuchsia_component("storage_realm_coll_invalid_route") {
deps = [ ":storage_realm_coll_invalid_route_bin" ]
manifest = "meta/storage_realm_coll_invalid_route.cml"
}
fuchsia_component("only_exits") {
deps = [ ":only_exits_bin" ]
manifest = "meta/only_exits.cml"
}
fuchsia_unittest_component("storage_integration_test_component") {
component_name = "storage_integration_test"
manifest = "meta/storage_integration_test.cml"
deps = [ ":storage_integration_test_bin" ]
}
fuchsia_unittest_component("storage_admin_integration_test_component") {
component_name = "storage_admin_integration_test"
manifest = "meta/storage_admin_integration_test.cml"
deps = [ ":storage_admin_integration_test_bin" ]
}
fuchsia_test_package("storage_integration_test") {
test_components = [
":storage_integration_test_component",
":storage_admin_integration_test_component",
]
deps = [
":only_exits",
":storage_realm",
":storage_realm_admin",
":storage_realm_coll",
":storage_realm_coll_invalid_route",
":storage_user",
":storage_user_with_instance_id",
"//src/storage/memfs:memfs_component",
"//src/sys/component_manager:component-manager-realm-builder-debug-cmp",
]
}
# This is used out-of-tree.
group("memfs") {
testonly = true
deps = [ "//src/storage/memfs:memfs_component" ]
}