| # Copyright 2022 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/testing/run_target_test_and_host_script.gni") |
| |
| fuchsia_test_component("web_view_system_validation_component") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| component_name = "web_view_system_validation" |
| manifest = "tests/meta/web_view_system_validation.cml" |
| deps = [ "//src/testing/system-validation/ui:bin" ] |
| |
| test_type = "system_validation" |
| } |
| |
| # To run tests: |
| # fx test fuchsia-pkg://fuchsia.com/simple_png_web_system_validation#meta/web_view_system_validation.cm |
| fuchsia_test_package("simple_png_web_system_validation_test_pkg") { |
| package_name = "simple_png_web_system_validation" |
| test_components = [ ":web_view_system_validation_component" ] |
| |
| # Do not fail test on ERROR log. When the test ends, elf_test_runner will shut down the |
| # system-validation test component and its children, which causes web_engine to log an |
| # error upon getting disconnected. |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| "//src/testing/system-validation/web/apps:simple_png_web_view_component", |
| "//src/testing/system-validation/web/file_server:file_server_component", |
| ] |
| } |
| |
| # To run tests: |
| # fx test fuchsia-pkg://fuchsia.com/dynamic_elements_web_system_validation#meta/web_view_system_validation.cm |
| fuchsia_test_package("dynamic_elements_web_system_validation_test_pkg") { |
| package_name = "dynamic_elements_web_system_validation" |
| test_components = [ ":web_view_system_validation_component" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| "//src/testing/system-validation/web/apps:dynamic_element_web_view_component", |
| "//src/testing/system-validation/web/file_server:file_server_component", |
| ] |
| } |
| |
| # To run tests: |
| # fx test fuchsia-pkg://fuchsia.com/simple_audio_web_system_validation#meta/web_view_system_validation.cm |
| fuchsia_test_package("simple_audio_web_system_validation_test_pkg") { |
| package_name = "simple_audio_web_system_validation" |
| test_components = [ ":web_view_system_validation_component" ] |
| |
| # Do not fail test on ERROR log. When the test ends, elf_test_runner will shut down the |
| # system-validation test component and its children, which causes web_engine to log an |
| # error upon getting disconnected. |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| "//src/testing/system-validation/web/apps:simple_audio_web_view_component", |
| "//src/testing/system-validation/web/file_server:file_server_component", |
| ] |
| } |
| |
| # To run tests: |
| # fx test fuchsia-pkg://fuchsia.com/simple_video_web_system_validation#meta/web_view_system_validation.cm |
| fuchsia_test_package("simple_video_web_system_validation_test_pkg") { |
| package_name = "simple_video_web_system_validation" |
| test_components = [ ":web_view_system_validation_component" ] |
| |
| # Do not fail test on ERROR log. When the test ends, elf_test_runner will shut down the |
| # system-validation test component and its children, which causes web_engine to log an |
| # error upon getting disconnected. |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| "//src/testing/system-validation/web/apps:simple_video_web_view_component", |
| "//src/testing/system-validation/web/file_server:file_server_component", |
| ] |
| } |
| |
| # fx set workstation_eng_paused.x64 --release \ |
| # --with-base //src/testing/system-validation:tests \ |
| # --with-host //src/testing/system-validation/web:simple_video_web_with_host_script |
| # |
| # fx test --e2e simple_video_web_with_host_script |
| if (is_host && target_cpu == "x64" && !is_asan) { |
| run_target_test_and_host_script("simple_video_web_with_host_script") { |
| test_url = "fuchsia-pkg://fuchsia.com/simple_video_web_system_validation#meta/web_view_system_validation.cm" |
| test_package = "//src/testing/system-validation/web:simple_video_web_system_validation_test_pkg(${target_toolchain})" |
| host_script = "//src/performance/trace2json:bin" |
| host_script_args = [ |
| "--input-file=" + "{test_artifact_dir}/custom-0/trace.fxt", |
| "--output-file=" + "{test_artifact_dir}/custom-0/trace.json", |
| ] |
| environments = [ emu_env ] |
| } |
| } else { |
| group("simple_video_web_with_host_script") { |
| } |
| } |