blob: 3514eddc805ac3745ecb408aafdbaaa9e0fe933d [file] [log] [blame]
# Copyright 2021 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/fidl/fidl.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_test.gni")
import("//src/sys/build/components.gni")
rustc_test("stressor_bin") {
testonly = true
name = "stressor"
edition = "2018"
deps = [
"//garnet/lib/rust/files_async",
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/stress-test",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:rand",
]
sources = [
"src/environment.rs",
"src/hub.rs",
"src/lib.rs",
"src/tree_actor.rs",
]
}
rustc_binary("unreliable_echo_server_bin") {
testonly = true
name = "unreliable_echo_server"
edition = "2018"
source_root = "unreliable_echo_server.rs"
deps = [
"//examples/components/routing/fidl:echo-rustc",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:rand",
]
sources = [ "unreliable_echo_server.rs" ]
}
rustc_binary("unreliable_echo_client_bin") {
testonly = true
name = "unreliable_echo_client"
edition = "2018"
source_root = "unreliable_echo_client.rs"
deps = [
"//examples/components/routing/fidl:echo-rustc",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:rand",
]
sources = [ "unreliable_echo_client.rs" ]
}
fuchsia_component("stressor") {
testonly = true
manifest = "meta/stressor.cml"
deps = [ ":stressor_bin" ]
}
fuchsia_component("no_binary") {
testonly = true
manifest = "meta/no_binary.cml"
}
fuchsia_component("unreliable_echo_client") {
testonly = true
deps = [ ":unreliable_echo_client_bin" ]
manifest = "meta/unreliable_echo_client.cml"
}
fuchsia_component("unreliable_echo_server") {
testonly = true
deps = [ ":unreliable_echo_server_bin" ]
manifest = "meta/unreliable_echo_server.cml"
}
fuchsia_test_package("component-manager-stress-tests-alt") {
deps = [
":no_binary",
":unreliable_echo_client",
":unreliable_echo_server",
]
test_components = [ ":stressor" ]
test_specs = {
environments = [
{
dimensions = {
device_type = "QEMU"
}
tags = [ "stress-tests" ]
},
]
}
}
group("stress_tests_alt") {
testonly = true
deps = [ ":component-manager-stress-tests-alt" ]
}