| # Copyright 2016 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/fidl/fidl.gni") |
| import("//build/testing/environments.gni") |
| import("use_media_decoder/test/vp9_file_decoder_conformance_test.gni") |
| |
| declare_args() { |
| build_all_vp9_file_decoder_conformance_tests = false |
| } |
| |
| # We have a separate package for each example to clarify the dependencies of |
| # each example. |
| |
| # Test video encode of camera stream |
| fuchsia_shell_package("encode-camera") { |
| testonly = true |
| deps = [ "//src/media/codec/examples/encode_camera" ] |
| } |
| |
| # Test video encode of from raw video file |
| fuchsia_shell_package("encode-file") { |
| testonly = true |
| deps = [ "//src/media/codec/examples/encode_file" ] |
| } |
| |
| fuchsia_shell_package("use_media_decoder") { |
| testonly = true |
| deps = [ "//src/media/codec/examples/use_media_decoder" ] |
| } |
| |
| resource("bear_h264") { |
| sources = [ |
| "//prebuilt/test_data/media/third_party/chromium_media_test_data/bear.h264", |
| ] |
| outputs = [ "data/bear.h264" ] |
| } |
| |
| resource("bear_vp9") { |
| sources = [ "//prebuilt/test_data/media/third_party/chromium_media_test_data/bear-vp9.ivf" ] |
| outputs = [ "data/bear-vp9.ivf" ] |
| } |
| |
| resource("bear_mjpeg") { |
| sources = [ "//prebuilt/test_data/media/third_party/chromium_media_test_data/bear.mjpeg" ] |
| outputs = [ "data/bear.mjpeg" ] |
| } |
| |
| resource("1080p_10_frames_h264") { |
| sources = [ "//prebuilt/test_data/media/third_party/chromium_media_test_data_downstream/1080p_10_frames.h264" ] |
| outputs = [ "data/1080p_10_frames.h264" ] |
| } |
| |
| resource("adts_audio_resource") { |
| sources = [ "use_media_decoder/test/test_audio.adts" ] |
| outputs = [ "data/media_test_data/test_audio.adts" ] |
| } |
| |
| resource("bear-1280x546-vp9") { |
| sources = [ "//prebuilt/test_data/media/third_party/chromium_media_test_data_downstream/bear-1280x546-vp9.ivf" ] |
| outputs = [ "data/bear-1280x546-vp9.ivf" ] |
| } |
| |
| resource("test-25fps.vp9") { |
| sources = [ "//prebuilt/test_data/media/third_party/chromium_media_test_data/test-25fps.vp9" ] |
| outputs = [ "data/test-25fps.vp9.ivf" ] |
| } |
| |
| # Test amlogic-video h264 decode. Can also work in QEMU using SW decode, but |
| # when decode HW is present we'll use that to decode. |
| fuchsia_test_component("use_h264_decoder_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_h264_decoder_test.cml" |
| deps = [ |
| ":bear_h264", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_decoder_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_h264_decoder_tests") { |
| test_components = [ ":use_h264_decoder_test_comp" ] |
| test_specs = { |
| environments = [ |
| atlas_env, |
| astro_env, |
| emu_env, |
| nelson_env, |
| sherlock_env, |
| vim3_env, |
| nuc_env, |
| ] |
| } |
| } |
| |
| fuchsia_test_component("use_h264_decoder_tiled_output_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_h264_decoder_tiled_output_test.cml" |
| deps = [ |
| ":bear_h264", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_decoder_tiled_output_test", |
| ] |
| test_type = "system" |
| } |
| |
| # Gaps in frame_num are often handled specially. We need to at least verify this doesn't get stuck |
| # or crash. At the moment we also verify that the decoder outputs at least a few output frames |
| # beyond the first missing input frame. |
| fuchsia_unittest_component("use_h264_decoder_frame_num_gaps_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_h264_decoder_frame_num_gaps_test.cml" |
| deps = [ |
| ":bear_h264", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_decoder_frame_num_gaps_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_h264_decoder_frame_num_gaps_tests") { |
| test_components = [ ":use_h264_decoder_frame_num_gaps_test_comp" ] |
| test_specs = { |
| environments = [ |
| atlas_env, |
| astro_env, |
| emu_env, |
| nelson_env, |
| sherlock_env, |
| vim3_env, |
| nuc_env, |
| ] |
| } |
| } |
| |
| # Force SW decode. Only run in environments where we include a SW h264 decoder. |
| fuchsia_test_component("use_h264_sw_decoder_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_h264_sw_decoder_test.cml" |
| deps = [ |
| ":1080p_10_frames_h264", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_sw_decoder_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_h264_sw_decoder_tests") { |
| test_components = [ ":use_h264_sw_decoder_test_comp" ] |
| |
| test_specs = { |
| environments = [ emu_env ] |
| } |
| } |
| |
| fuchsia_test_component("use_h264_decoder_flake_repro_test_comp") { |
| manifest = "use_media_decoder/meta/use_h264_decoder_flake_repro_test.cml" |
| deps = [ |
| ":bear_h264", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_decoder_flake_repro_test", |
| ] |
| } |
| |
| fuchsia_test_package("use_h264_decoder_flake_repro_tests") { |
| test_components = [ ":use_h264_decoder_flake_repro_test_comp" ] |
| test_specs = { |
| # Only works on amlogic hardware. |
| environments = [ |
| astro_env, |
| nelson_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| # Test amlogic-video h264 decode with stream switching. Can also work in QEMU |
| # using SW decode, but when decode HW is present we'll use that to decode. |
| fuchsia_unittest_component("use_h264_decoder_stream_switching_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_h264_decoder_stream_switching_test.cml" |
| deps = [ |
| ":bear_h264", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_decoder_stream_switching_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_h264_decoder_stream_switching_tests") { |
| test_components = [ ":use_h264_decoder_stream_switching_test_comp" ] |
| test_specs = { |
| environments = [ |
| { |
| dimensions = { |
| device_type = "Atlas" |
| } |
| tags = [ "flaky" ] # TODO(https://fxbug.dev/42064464): Re-enable when |
| # test is no |
| # longer flaky |
| }, |
| astro_env, |
| nelson_env, |
| sherlock_env, |
| vim3_env, |
| { |
| dimensions = { |
| device_type = "Intel NUC Kit NUC7i5DNHE" |
| } |
| tags = [ "flaky" ] # TODO(https://fxbug.dev/42064464): Re-enable when |
| # test is no |
| # longer flaky |
| }, |
| { |
| dimensions = { |
| device_type = "QEMU" |
| } |
| tags = |
| [ "flaky" ] # TODO(https://fxbug.dev/42126698): Re-enable when test |
| # is no |
| # longer flaky |
| }, |
| ] |
| } |
| } |
| |
| # Test amlogic-video h264 decode with stream switching. |
| fuchsia_test_component( |
| "use_h264_decoder_concurrent_stream_switching_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_h264_decoder_concurrent_stream_switching_test.cml" |
| deps = [ |
| ":bear_h264", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_decoder_concurrent_stream_switching_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_h264_decoder_concurrent_stream_switching_tests") { |
| test_components = |
| [ ":use_h264_decoder_concurrent_stream_switching_test_comp" ] |
| test_specs = { |
| # Should pass when run on VIM2, astro, sherlock, or QEMU. |
| |
| environments = [ |
| atlas_env, |
| astro_env, |
| nelson_env, |
| sherlock_env, |
| vim3_env, |
| nuc_env, |
| ] |
| } |
| } |
| |
| # Test amlogic-video h264 decode + vp9 decode + PCMM stress (where applicable). |
| fuchsia_test_component("use_h264_and_vp9_decoders_and_pcmm_stress_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_h264_and_vp9_decoders_and_pcmm_stress_test.cml" |
| deps = [ |
| ":bear_h264", |
| ":bear_vp9", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_and_vp9_decoders_and_pcmm_stress_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_h264_and_vp9_decoders_and_pcmm_stress_test") { |
| test_components = [ ":use_h264_and_vp9_decoders_and_pcmm_stress_test_comp" ] |
| test_specs = { |
| environments = [ |
| astro_env, |
| nelson_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| fuchsia_unittest_component("use_h264_decoder_secure_output_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_h264_decoder_secure_output_test.cml" |
| deps = [ |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_h264_decoder_secure_output_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_h264_decoder_secure_output_tests") { |
| test_components = [ ":use_h264_decoder_secure_output_test_comp" ] |
| |
| deps = [ ":bear_h264" ] |
| |
| test_specs = { |
| # Should pass when run on astro. |
| environments = [ |
| astro_env, |
| nelson_env, |
| sherlock_env, |
| ] |
| } |
| } |
| |
| fuchsia_unittest_package("use_h264_decoder_secure_input_output_test") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = |
| "use_media_decoder/meta/use_h264_decoder_secure_input_output_test.cml" |
| deps = [ |
| ":bear_h264", |
| "use_media_decoder:tee_manager", |
| "//src/media/codec/examples/use_media_decoder:use_h264_decoder_secure_input_output_test", |
| ] |
| |
| test_specs = { |
| # Without ClearTVP, can't pass anywhere at the moment. |
| # TODO(https://fxbug.dev/42119245): Re-enable. |
| environments = [] |
| } |
| } |
| |
| fuchsia_unittest_component("h264_decoder_fuzzer_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/h264_decoder_fuzzer_test.cml" |
| deps = [ |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:h264_decoder_fuzzer_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_unittest_component("h264_decoder_malformed_stream_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/h264_decoder_malformed_stream_test.cml" |
| deps = [ "//src/media/codec/examples/use_media_decoder:h264_decoder_malformed_stream_test" ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("h264_decoder_fuzzer_tests") { |
| test_components = [ |
| ":h264_decoder_fuzzer_test_comp", |
| ":h264_decoder_malformed_stream_test_comp", |
| ] |
| |
| deps = [ ":bear_h264" ] |
| |
| test_specs = { |
| environments = [ |
| atlas_env, |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| nuc_env, |
| ] |
| } |
| } |
| |
| fuchsia_unittest_component("codec_description_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/codec_description_test.cml" |
| deps = [ |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:codec_description_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("codec_description_tests") { |
| test_components = [ ":codec_description_test_comp" ] |
| |
| test_specs = { |
| environments = [ |
| atlas_env, |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| nuc_env, |
| ] |
| } |
| } |
| |
| fuchsia_unittest_component("vp9_decoder_fuzzer_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/vp9_decoder_fuzzer_test.cml" |
| deps = [ |
| ":bear_vp9", |
| "//src/media/codec/examples/use_media_decoder:vp9_decoder_fuzzer_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("vp9_decoder_fuzzer_tests") { |
| test_components = [ ":vp9_decoder_fuzzer_test_comp" ] |
| test_specs = { |
| # Disable on astro because not enough contiguous memory. TODO(https://fxbug.dev/42117851) Re-enable |
| environments = [ |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| fuchsia_unittest_component("use_vp9_decoder_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_vp9_decoder_test.cml" |
| deps = [ |
| ":bear_vp9", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_vp9_decoder_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_unittest_component("use_vp9_decoder_tiled_output_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_vp9_decoder_tiled_output_test.cml" |
| deps = [ |
| ":bear_vp9", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_vp9_decoder_tiled_output_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_unittest_component("use_vp9_decoder_1280x546_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_vp9_decoder_1280x546_test.cml" |
| deps = [ |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_vp9_decoder_1280x546_test", |
| ] |
| test_type = "system" |
| } |
| |
| # Test amlogic-video vp9 decode. |
| fuchsia_test_package("use_vp9_decoder_tests") { |
| test_components = [ |
| ":use_vp9_decoder_1280x546_test_comp", |
| ":use_vp9_decoder_test_comp", |
| ] |
| |
| deps = [ |
| ":bear-1280x546-vp9", |
| ":bear_vp9", |
| ] |
| |
| test_specs = { |
| # Astro has enough contiguous memory for this. |
| environments = [ |
| astro_env, |
| nelson_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| # Test amlogic-video vp9 decode, with stream switching. |
| fuchsia_unittest_component("use_vp9_decoder_stream_switching_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_vp9_decoder_stream_switching_test.cml" |
| deps = [ |
| ":bear_vp9", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_vp9_decoder_stream_switching_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_vp9_decoder_stream_switching_tests") { |
| test_components = [ ":use_vp9_decoder_stream_switching_test_comp" ] |
| |
| test_specs = { |
| environments = [ |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| # Test vp9 decoder's ability to skip frames until keyframe when |
| # input starts at non-keyframe. |
| fuchsia_unittest_component("use_vp9_decoder_skip_first_frame_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_vp9_decoder_skip_first_frame_test.cml" |
| deps = [ |
| ":test-25fps.vp9", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_vp9_decoder_skip_first_frame_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_vp9_decoder_skip_first_frame_tests") { |
| test_components = [ ":use_vp9_decoder_skip_first_frame_test_comp" ] |
| |
| test_specs = { |
| environments = [ |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| # Test amlogic-video vp9 decode with max output frame count, on environments |
| # that have enough contiguous SYSTEM_RAM configured for sysmem. |
| fuchsia_test_component("use_vp9_decoder_24_output_frames_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_vp9_decoder_24_output_frames_test.cml" |
| deps = [ |
| ":bear_vp9", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_vp9_decoder_24_output_frames_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_vp9_decoder_24_output_frames_tests") { |
| test_components = [ ":use_vp9_decoder_24_output_frames_test_comp" ] |
| test_specs = { |
| environments = [ |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| fuchsia_test_component("use_vp9_decoder_secure_output_test_comp") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_vp9_decoder_secure_output_test.cml" |
| deps = [ |
| ":bear_vp9", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_vp9_decoder_secure_output_test", |
| ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("use_vp9_decoder_secure_output_tests") { |
| test_components = [ ":use_vp9_decoder_secure_output_test_comp" ] |
| test_specs = { |
| environments = [ |
| astro_env, |
| nelson_env, |
| sherlock_env, |
| ] |
| } |
| } |
| |
| fuchsia_unittest_package("use_vp9_decoder_secure_input_output_test") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = |
| "use_media_decoder/meta/use_vp9_decoder_secure_input_output_test.cml" |
| deps = [ |
| ":bear_vp9", |
| "use_media_decoder:tee_manager", |
| "//src/media/codec/examples/use_media_decoder:use_vp9_decoder_secure_input_output_test", |
| ] |
| |
| test_specs = { |
| # Without ClearTVP, can't pass anywhere at the moment. |
| # TODO(https://fxbug.dev/42119245): Re-enable. |
| environments = [] |
| } |
| } |
| |
| fuchsia_unittest_component("use_mjpeg_decoder_test_component") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| manifest = "use_media_decoder/meta/use_mjpeg_decoder_test.cml" |
| deps = [ |
| ":bear_mjpeg", |
| "//src/media/codec:codec_factory", |
| "//src/media/codec/examples/use_media_decoder:use_mjpeg_decoder_test", |
| ] |
| test_type = "system" |
| } |
| |
| # |
| # Tests that don't run on CQ yet. |
| # |
| |
| fuchsia_component("vp9_conformance_http_test_component") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| testonly = true |
| manifest = "use_media_decoder/meta/vp9_decoder_conformance_http.cml" |
| deps = [ |
| "//src/media/codec/examples/use_media_decoder:vp9_decoder_conformance_test", |
| ] |
| } |
| |
| # Running this binary, the --http=<url> command-line parameter needs to be |
| # passed, and the binary won't verify the MD5. Instead it'll stream the URL |
| # data in, parse it as ivf, decode it, compute MD5, and output the MD5. |
| fuchsia_package("vp9_decoder_conformance_http") { |
| testonly = true |
| deps = [ ":vp9_conformance_http_test_component" ] |
| } |
| |
| fuchsia_component("h264_conformance_http_test_component") { |
| testonly = true |
| manifest = "use_media_decoder/meta/h264_decoder_conformance_http.cml" |
| deps = [ "//src/media/codec/examples/use_media_decoder:h264_decoder_conformance_test" ] |
| } |
| |
| # Running this binary, the --http=<url> command-line parameter needs to be |
| # passed, and the binary won't verify the MD5. Instead it'll stream the URL |
| # data in, parse it as h264, decode it, compute MD5, and output the MD5. |
| fuchsia_package("h264_decoder_conformance_http") { |
| testonly = true |
| deps = [ ":h264_conformance_http_test_component" ] |
| } |
| |
| # Put the below group of vp9 conformance tests last in the file. Otherwise, |
| # with the above __http package last in this file, the build complains about |
| # duplicate packages, at least when fx set with these: |
| # --args=build_all_vp9_file_decoder_conformance_tests=true \ |
| # --with //src/media/codec/examples:vp9_decoder_conformance_tests \ |
| # --with //src/media/codec/examples:vp9_decoder_conformance_test__http |
| |
| _vp9_file_conformance_tests_group_deps = [] |
| |
| # This target makes sure the vp9_decoder_conformance_test executable builds and |
| # can verify an md5 hash of decompressed frames. |
| # |
| # Test amlogic-video vp9 decode. This uses the same test executable as VP9 |
| # decode conformance tests. |
| package_name = "vp9-decoder-conformance-test--bear-vp9" |
| vp9_file_decoder_conformance_test(package_name) { |
| ivf_file = "//prebuilt/test_data/media/third_party/chromium_media_test_data/bear-vp9.ivf" |
| md5_file = "use_media_decoder/test/bear-vp9.i420.md5" |
| test_specs = { |
| environments = [ |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| _vp9_file_conformance_tests_group_deps += [ ":" + package_name ] |
| |
| # build_all_vp9_file_decoder_conformance_tests is currently false by default. |
| # These tests currently require a directory of converted VP9 test streams which |
| # is not yet hosted on CIPD. |
| # |
| # The self-contained variants of these tests rely on having enough flash space |
| # for the whole input file, and running more than one large test per pave will |
| # tend to fail due to insufficient flash space (at the moment). Still, for |
| # debugging it's useful to be able to run this way, especially since re-building |
| # the code doesn't require re-copying the input file blob whose hash hasn't |
| # changed - and building tests this way avoids relying on a local http server. |
| # |
| # For automated testing, we instead use vp9_decoder_conformance_test__http |
| # (single target), which will fetch a .ivf file from a local http server and |
| # output it's MD5 hash to stdout. That target is driven by e2e test script |
| # running off-target that scrapts stdout for the MD5 and deteremines e2e test |
| # success/failure in the e2e test script, not on the target. |
| if (build_all_vp9_file_decoder_conformance_tests) { |
| testcases_with_comments_and_newlines = read_file( |
| "//prebuilt/test_data/media/third_party/webm_vp9_conformance_streams/test_cases_all.list", |
| "trim list lines") |
| testcases = filter_exclude(testcases_with_comments_and_newlines, |
| [ |
| "#*", # Filter out comments |
| "", # Filter out newlines (whitespaces because |
| # they are trimmed) |
| ]) |
| foreach(testcase, testcases) { |
| # remove prefix |
| testcase = string_replace(testcase, "processed/", "") |
| |
| # remove suffix |
| testcase_partial_path = string_replace(testcase, ".webm.ivf", "") |
| |
| # don't have any "/" in the name |
| testcase = string_replace(testcase_partial_path, "/", "__") |
| |
| # shorten profile string |
| testcase = string_replace(testcase, "Profile_0_8bit", "0") |
| testcase = string_replace(testcase, "Profile_2_10bit", "2") |
| |
| # Downcase the only uppercase letters that actually exist; uppercase isn't |
| # allowed in package names. |
| testcase = string_replace(testcase, "X", "x") |
| package_name = "vp9_decoder_conformance_test__file__" + testcase |
| |
| # Avoid any "_" in the package name. |
| package_name = string_replace(package_name, "_", "-") |
| vp9_file_decoder_conformance_test(package_name) { |
| ivf_file = "//prebuilt/test_data/media/third_party/webm_vp9_conformance_streams/processed/" + testcase_partial_path + ".webm.ivf" |
| md5_file = "//prebuilt/test_data/media/third_party/webm_vp9_conformance_streams/decompressed_md5/" + testcase_partial_path + ".md5" |
| test_specs = { |
| # This should pass when run on VIM2 or astro, and will fail in any env |
| # that lacks VP9 decode. |
| # Disable on astro because not enough contiguous memory. TODO(https://fxbug.dev/42117851) Re-enable |
| environments = [ |
| sherlock_env, |
| vim3_env, |
| nuc_env, |
| atlas_env, |
| ] |
| } |
| } |
| _vp9_file_conformance_tests_group_deps += [ ":" + package_name ] |
| } |
| } |
| |
| group("vp9_decoder_conformance_tests") { |
| testonly = true |
| deps = _vp9_file_conformance_tests_group_deps |
| } |
| |
| # These canary test run during CQ to ensure that there has not been any |
| # regressions in core VP9 functionality. While not exhaustive it allows the |
| # CQ runner to notify the developer of any problems that were introduced in |
| # the latest CL. A more exhaustive list will be run later in the pipeline. |
| template("vp9_decoder_canary_conformance_test") { |
| vp9_file_decoder_conformance_test(target_name) { |
| forward_variables_from(invoker, [ "test_specs" ]) |
| ivf_file = "//prebuilt/test_data/media/third_party/webm_vp9_canary_conformance_stream/processed/Profile_0_8bit/${invoker.test_rel_path}.webm.ivf" |
| md5_file = "//prebuilt/test_data/media/third_party/webm_vp9_canary_conformance_stream/decompressed_md5/Profile_0_8bit/${invoker.test_rel_path}.md5" |
| } |
| } |
| template("vp9_decoder_tiled_canary_conformance_test") { |
| vp9_file_decoder_conformance_test(target_name) { |
| forward_variables_from(invoker, [ "test_specs" ]) |
| ivf_file = "//prebuilt/test_data/media/third_party/webm_vp9_canary_conformance_stream/processed/Profile_0_8bit/${invoker.test_rel_path}.webm.ivf" |
| md5_file = "//prebuilt/test_data/media/third_party/webm_vp9_canary_conformance_stream/decompressed_md5/Profile_0_8bit/${invoker.test_rel_path}.md5" |
| y_tiled = true |
| } |
| } |
| |
| vp9_decoder_canary_conformance_test("vp9_decoder_canary_conformance_test_buf") { |
| test_rel_path = "buf/crowd_run_256X144_fr15_bd8_8buf_l1" |
| test_specs = { |
| environments = [ |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| vp9_decoder_canary_conformance_test( |
| "vp9_decoder_canary_conformance_test_frm_resize") { |
| test_rel_path = "frm_resize/crowd_run_384X192_fr30_bd8_frm_resize_l11" |
| test_specs = { |
| environments = [ |
| atlas_env, |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| vp9_decoder_canary_conformance_test( |
| "vp9_decoder_canary_conformance_test_gf_dist") { |
| test_rel_path = "gf_dist/crowd_run_256X144_fr15_bd8_gf_dist_4_l1" |
| test_specs = { |
| environments = [ |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| vp9_decoder_canary_conformance_test( |
| "vp9_decoder_canary_conformance_test_odd_size") { |
| test_rel_path = "odd_size/crowd_run_248X144_fr15_bd8_odd_size_l1" |
| test_specs = { |
| environments = [ |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| vp9_decoder_canary_conformance_test( |
| "vp9_decoder_canary_conformance_test_sub8x8") { |
| test_rel_path = "sub8X8/crowd_run_256X144_fr15_bd8_sub8X8_l1" |
| test_specs = { |
| environments = [ |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| vp9_decoder_tiled_canary_conformance_test( |
| "vp9_decoder_tiled_canary_conformance_test_buf") { |
| test_rel_path = "buf/crowd_run_256X144_fr15_bd8_8buf_l1" |
| test_specs = { |
| environments = [] |
| } |
| } |
| |
| vp9_decoder_tiled_canary_conformance_test( |
| "vp9_decoder_tiled_canary_conformance_test_frm_resize") { |
| test_rel_path = "frm_resize/crowd_run_384X192_fr30_bd8_frm_resize_l11" |
| test_specs = { |
| environments = [] |
| } |
| } |
| |
| vp9_decoder_tiled_canary_conformance_test( |
| "vp9_decoder_tiled_canary_conformance_test_gf_dist") { |
| test_rel_path = "gf_dist/crowd_run_256X144_fr15_bd8_gf_dist_4_l1" |
| test_specs = { |
| environments = [] |
| } |
| } |
| |
| vp9_decoder_tiled_canary_conformance_test( |
| "vp9_decoder_tiled_canary_conformance_test_odd_size") { |
| test_rel_path = "odd_size/crowd_run_248X144_fr15_bd8_odd_size_l1" |
| test_specs = { |
| environments = [] |
| } |
| } |
| |
| vp9_decoder_tiled_canary_conformance_test( |
| "vp9_decoder_tiled_canary_conformance_test_sub8x8") { |
| test_rel_path = "sub8X8/crowd_run_256X144_fr15_bd8_sub8X8_l1" |
| test_specs = { |
| environments = [] |
| } |
| } |
| |
| group("vp9_decoder_canary_conformance_tests") { |
| testonly = true |
| deps = [ |
| ":vp9_decoder_canary_conformance_test_buf", |
| ":vp9_decoder_canary_conformance_test_frm_resize", |
| ":vp9_decoder_canary_conformance_test_gf_dist", |
| ":vp9_decoder_canary_conformance_test_odd_size", |
| ":vp9_decoder_canary_conformance_test_sub8x8", |
| ":vp9_decoder_tiled_canary_conformance_test_buf", |
| ":vp9_decoder_tiled_canary_conformance_test_frm_resize", |
| ":vp9_decoder_tiled_canary_conformance_test_gf_dist", |
| ":vp9_decoder_tiled_canary_conformance_test_odd_size", |
| ":vp9_decoder_tiled_canary_conformance_test_sub8x8", |
| ] |
| } |