| # 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("//src/ui/lib/escher/build_args.gni") |
| |
| rustc_test("scenic-stressor-flatland-bin") { |
| name = "scenic_stressor_flatland" |
| edition = "2021" |
| testonly = true |
| source_root = "src/flatland_main.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.math:fuchsia.math_rust", |
| "//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_rust", |
| "//sdk/fidl/fuchsia.ui.pointer:fuchsia.ui.pointer_rust", |
| "//sdk/fidl/fuchsia.ui.pointerinjector:fuchsia.ui.pointerinjector_rust", |
| "//sdk/fidl/fuchsia.ui.views:fuchsia.ui.views_rust", |
| "//src/lib/diagnostics/log/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//src/lib/ui/fuchsia-scenic", |
| "//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:rand", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ |
| "src/flatland_actor.rs", |
| "src/flatland_environment.rs", |
| "src/flatland_instance.rs", |
| "src/flatland_main.rs", |
| "src/input_actor.rs", |
| "src/input_listener.rs", |
| "src/metrics_discarder.rs", |
| "src/pointer_state.rs", |
| ] |
| } |
| |
| source_set("stress-test-flatland") { |
| testonly = true |
| deps = [ |
| ":scenic-stressor-flatland-bin", |
| "//src/graphics/display/testing/fake-coordinator-connector:component", |
| "//src/lib/vulkan/validation_layers", |
| "//src/ui/scenic:scenic_with_default_config", |
| ] |
| |
| if (escher_use_runtime_glsl) { |
| deps += [ "//src/ui/lib/escher/shaders:escher_shaders_resources" ] |
| } else { |
| deps += [ "//src/ui/lib/escher/shaders:escher_shaders_spirv_resources" ] |
| } |
| } |
| |
| fuchsia_unittest_package("scenic-stress-test-flatland") { |
| manifest = "meta/scenic_stressor_flatland.cml" |
| deps = [ ":stress-test-flatland" ] |
| |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| environments = [ |
| { |
| dimensions = { |
| device_type = "AEMU" |
| } |
| tags = [ "stress-tests" ] |
| }, |
| ] |
| } |
| test_type = "vulkan" |
| } |
| |
| fuchsia_unittest_package("scenic-stress-test-flatland-short") { |
| manifest = "meta/scenic_stressor_flatland_short.cml" |
| deps = [ ":stress-test-flatland" ] |
| |
| if (escher_use_runtime_glsl) { |
| deps += [ "//src/ui/lib/escher/shaders:escher_shaders_resources" ] |
| } else { |
| deps += [ "//src/ui/lib/escher/shaders:escher_shaders_spirv_resources" ] |
| } |
| |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| environments = [ |
| { |
| dimensions = { |
| device_type = "AEMU" |
| } |
| }, |
| ] |
| } |
| test_type = "vulkan" |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":scenic-stress-test-flatland", |
| ":scenic-stress-test-flatland-short", |
| ] |
| } |