blob: 965777c3c35c4b805a8bce577d963a37f5a02ded [file] [log] [blame]
# Copyright 2020 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/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_test.gni")
import("//build/test/test_package.gni")
import("//src/lib/vulkan/layers.gni")
import("//src/sys/build/components.gni")
import("//src/ui/lib/escher/build_args.gni")
import("//src/ui/lib/escher/shaders/shaders.gni")
rustc_library("scenic-stress-tests-lib") {
edition = "2018"
source_root = "lib/mod.rs"
deps = [
"//sdk/fidl/fuchsia.hardware.display:fuchsia.hardware.display-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/component_manager/testing:test_utils_lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
]
sources = [
"lib/display_provider.rs",
"lib/mod.rs",
"lib/utils.rs",
]
}
rustc_binary("input-stressor-bin") {
name = "input_stressor"
edition = "2018"
source_root = "input_stressor.rs"
deps = [
":scenic-stress-tests-lib",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/ui/input-synthesis",
"//src/sys/component_manager/testing:test_utils_lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:structopt",
]
sources = [ "input_stressor.rs" ]
}
test_package("scenic-stress-tests") {
deps = [
":input-stressor-bin",
"//src/ui/bin/root_presenter:bin",
"//src/ui/examples/simplest_app",
"//src/ui/scenic/bin",
]
binaries = [
{
name = "scenic"
},
{
name = "root_presenter"
},
{
name = "simplest_app"
dest = "view"
},
]
meta = [
{
path = rebase_path("meta/root.cml")
dest = "root.cm"
},
{
path = rebase_path("meta/scenic.cml")
dest = "scenic.cm"
},
{
path = rebase_path("meta/root_presenter.cml")
dest = "root_presenter.cm"
},
{
path = rebase_path("meta/view.cml")
dest = "view.cm"
},
]
tests = [
{
log_settings = {
max_severity = "ERROR"
}
name = "input_stressor"
environments = [ aemu_env ]
},
]
resources = []
if (escher_use_runtime_glsl) {
resources += escher_shaders_resources
} else {
resources += escher_shaders_spirv_resources
}
# If configured, include the vulkan validation layers.
if (is_debug) {
loadable_modules = vulkan_validation_layers.loadable_modules
public_deps = vulkan_validation_layers.public_deps
resources += vulkan_validation_layers.resources
}
}
group("tests") {
testonly = true
deps = [
":scenic-stress-tests",
"//src/sys/component_manager:component-manager",
]
}