| # Copyright 2019 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/test.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| group("test") { |
| testonly = true |
| deps = [ |
| ":chunk_input_stream_tests", |
| ":codec_adapter_sw_test", |
| ":mpsc_queue_tests", |
| ":output_sink_tests", |
| ":raw_frames", |
| ":raw_frames_test", |
| ":raw_frames_test_bin", |
| ":sbc_encoder_test", |
| ":timestamp_extrapolator_tests", |
| ] |
| } |
| |
| executable("codec_adapter_sw_test_bin") { |
| output_name = "codec_adapter_sw_test" |
| testonly = true |
| |
| sources = [ |
| "codec_adapter_sw_test.cc", |
| ] |
| |
| deps = [ |
| "//garnet/bin/media/codecs/sw:codec_adapter_sw", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| test_package("codec_adapter_sw_test") { |
| tests = [ |
| { |
| name = "codec_adapter_sw_test" |
| environments = basic_envs |
| }, |
| ] |
| |
| deps = [ |
| ":codec_adapter_sw_test_bin", |
| ] |
| } |
| |
| source_set("raw_frames") { |
| testonly = true |
| |
| sources = [ |
| "raw_frames.cc", |
| ] |
| |
| public = [ |
| "raw_frames.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/lib/media/codec_impl:fourcc", |
| "//sdk/fidl/fuchsia.images", |
| "//sdk/fidl/fuchsia.mediacodec", |
| "//zircon/public/lib/fzl", |
| ] |
| } |
| |
| source_set("frame_encoder") { |
| testonly = true |
| |
| sources = [ |
| "frame_encoder.cc", |
| ] |
| |
| public = [ |
| "frame_encoder.h", |
| ] |
| |
| public_deps = [ |
| ":raw_frames", |
| "//garnet/lib/media/test:codec_client", |
| "//garnet/public/lib/component/cpp", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| source_set("raw_audio") { |
| testonly = true |
| |
| sources = [ |
| "raw_audio.cc", |
| ] |
| |
| public = [ |
| "raw_audio.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/public/lib/fxl", |
| "//sdk/fidl/fuchsia.mediacodec", |
| "//zircon/public/lib/fzl", |
| ] |
| } |
| |
| executable("sbc_encoder_test_bin") { |
| output_name = "sbc_encoder_test" |
| |
| testonly = true |
| |
| sources = [ |
| "sbc_encoder_test.cc", |
| ] |
| |
| deps = [ |
| ":frame_encoder", |
| ":raw_audio", |
| ] |
| } |
| |
| test_package("sbc_encoder_test") { |
| deps = [ |
| ":sbc_encoder_test_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "sbc_encoder_test" |
| environments = basic_envs |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("test_data/third_party/sfx_s16be.au") |
| dest = "sfx_s16be.au" |
| }, |
| { |
| path = rebase_path("test_data/third_party/sfx_s16be.au.sbc") |
| dest = "sfx_s16be.au.sbc" |
| }, |
| ] |
| } |
| |
| executable("raw_frames_test_bin") { |
| output_name = "raw_frames_test" |
| |
| testonly = true |
| |
| sources = [ |
| "test/raw_frames_test.cc", |
| ] |
| |
| deps = [ |
| ":raw_frames", |
| "//garnet/lib/media/test:frame_sink", |
| "//garnet/public/lib/component/cpp", |
| "//src/lib/fxl", |
| "//third_party/boringssl:crypto", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| test_package("raw_frames_test") { |
| deps = [ |
| ":raw_frames_test_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "raw_frames_test" |
| environments = basic_envs |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path( |
| "../../../../test_data/media/third_party/chromium_media_test_data/bear_320x192_40frames.yuv") |
| dest = "bear_320x192_40frames.yuv" |
| }, |
| ] |
| } |
| |
| executable("timestamp_extrapolator_test_bin") { |
| output_name = "timestamp_extrapolator_tests" |
| |
| testonly = true |
| |
| sources = [ |
| "timestamp_extrapolator_tests.cc", |
| ] |
| |
| deps = [ |
| "//garnet/bin/media/codecs:timestamp_extrapolator", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| test_package("timestamp_extrapolator_tests") { |
| deps = [ |
| ":timestamp_extrapolator_test_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "timestamp_extrapolator_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| executable("mpsc_queue_test_bin") { |
| output_name = "mpsc_queue_tests" |
| |
| testonly = true |
| |
| sources = [ |
| "mpsc_queue_tests.cc", |
| ] |
| |
| deps = [ |
| "//garnet/bin/media/codecs:mpsc_queue", |
| "//garnet/public/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| test_package("mpsc_queue_tests") { |
| deps = [ |
| ":mpsc_queue_test_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "mpsc_queue_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| source_set("test_codec_packets") { |
| testonly = true |
| public = [ |
| "test_codec_packets.h", |
| ] |
| public_deps = [ |
| "//garnet/lib/media/codec_impl", |
| "//zircon/public/lib/fzl", |
| ] |
| } |
| |
| executable("chunk_input_stream_test_bin") { |
| output_name = "chunk_input_stream_tests" |
| |
| testonly = true |
| |
| sources = [ |
| "chunk_input_stream_tests.cc", |
| ] |
| |
| deps = [ |
| ":test_codec_packets", |
| "//garnet/bin/media/codecs:chunk_input_stream", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| test_package("chunk_input_stream_tests") { |
| deps = [ |
| ":chunk_input_stream_test_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "chunk_input_stream_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| executable("output_sink_test_bin") { |
| output_name = "output_sink_tests" |
| |
| testonly = true |
| |
| sources = [ |
| "output_sink_tests.cc", |
| ] |
| |
| deps = [ |
| ":test_codec_packets", |
| "//garnet/bin/media/codecs:output_sink", |
| "//src/lib/fxl", |
| "//third_party/googletest:gtest_main", |
| ] |
| } |
| |
| test_package("output_sink_tests") { |
| deps = [ |
| ":output_sink_test_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "output_sink_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |