blob: a5dc71136622fd38834414658ac68b73dab1b58d [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/components.gni")
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/ui/lib/escher/build_args.gni")
import("//src/ui/lib/escher/shaders/shaders.gni")
rustc_binary("input-stressor-bin") {
name = "input_stressor"
edition = "2018"
testonly = true
deps = [
"//sdk/fidl/fuchsia.hardware.display:fuchsia.hardware.display-rustc",
"//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/ui/input-synthesis",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/component_manager/testing:test_utils_lib",
"//src/sys/lib/component-events",
"//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:matches",
"//third_party/rust_crates:rand",
]
sources = [
"src/display_provider.rs",
"src/environment.rs",
"src/main.rs",
"src/tap_actor.rs",
]
}
test_package("scenic-stress-tests") {
deps = [
":input-stressor-bin",
"//src/ui/bin/root_presenter:bin",
"//src/ui/examples/simplest_app:bin",
"//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 = [
{
dimensions = {
device_type = "AEMU"
}
tags = [ "stress-tests" ]
},
]
},
]
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",
]
}