| # 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/config.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_macro.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| group("test") { |
| testonly = true |
| deps = [ |
| ":audio_encoder_test", |
| ":h264_decoder_test", |
| ":stream_processor_lib_test", |
| ] |
| } |
| |
| rustc_library("stream_processor_test_lib") { |
| name = "stream_processor_test" |
| edition = "2018" |
| testonly = true |
| with_unit_tests = true |
| |
| deps = [ |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fuchsia-async", |
| "//garnet/public/rust/fuchsia-component", |
| "//garnet/public/rust/fuchsia-syslog", |
| "//garnet/public/rust/fuchsia-zircon", |
| "//sdk/fidl/fuchsia.media:fuchsia.media-rustc", |
| "//sdk/fidl/fuchsia.mediacodec:fuchsia.mediacodec-rustc", |
| "//src/lib/fidl_table_validation", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures-preview", |
| "//third_party/rust_crates:log", |
| "//zircon/public/fidl/fuchsia-sysmem:fuchsia-sysmem-rustc", |
| ] |
| } |
| |
| test_package("stream_processor_lib_test") { |
| deps = [ |
| ":stream_processor_test_lib", |
| ] |
| |
| tests = [ |
| { |
| name = "stream_processor_test_lib_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| rustc_library("stream_processor_decoder_factory_lib") { |
| name = "stream_processor_decoder_factory" |
| edition = "2018" |
| source_root = "stream_processor_factories/decoders.rs" |
| testonly = true |
| |
| deps = [ |
| ":stream_processor_test_lib", |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fuchsia-component", |
| "//sdk/fidl/fuchsia.media:fuchsia.media-rustc", |
| "//sdk/fidl/fuchsia.mediacodec:fuchsia.mediacodec-rustc", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures-preview", |
| ] |
| } |
| |
| rustc_library("stream_processor_encoder_factory_lib") { |
| name = "stream_processor_encoder_factory" |
| edition = "2018" |
| source_root = "stream_processor_factories/encoders.rs" |
| testonly = true |
| |
| deps = [ |
| ":stream_processor_test_lib", |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fuchsia-component", |
| "//sdk/fidl/fuchsia.media:fuchsia.media-rustc", |
| "//sdk/fidl/fuchsia.mediacodec:fuchsia.mediacodec-rustc", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures-preview", |
| ] |
| } |
| |
| rustc_library("audio_encoder_test_lib") { |
| name = "audio_encoder_test" |
| edition = "2018" |
| source_root = "audio_encoder_test/lib.rs" |
| testonly = true |
| with_unit_tests = true |
| |
| deps = [ |
| ":stream_processor_encoder_factory_lib", |
| ":stream_processor_test_lib", |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fuchsia-async", |
| "//garnet/public/rust/mundane", |
| "//sdk/fidl/fuchsia.media:fuchsia.media-rustc", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures-preview", |
| "//third_party/rust_crates:hex", |
| ] |
| } |
| |
| test_package("audio_encoder_test") { |
| deps = [ |
| ":audio_encoder_test_lib", |
| ] |
| |
| tests = [ |
| { |
| name = "audio_encoder_test_lib_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| rustc_test("h264_decoder_test_bin") { |
| edition = "2018" |
| source_root = "h264_decoder_test/lib.rs" |
| |
| deps = [ |
| ":stream_processor_decoder_factory_lib", |
| ":stream_processor_test_lib", |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fuchsia-async", |
| "//garnet/public/rust/fuchsia-syslog", |
| "//sdk/fidl/fuchsia.media:fuchsia.media-rustc", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures-preview", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:parking_lot", |
| ] |
| } |
| |
| test_package("h264_decoder_test") { |
| deps = [ |
| ":h264_decoder_test_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "h264_decoder_test_bin" |
| environments = basic_envs |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path( |
| "../../../../garnet/test_data/media/third_party/chromium_media_test_data/bear.h264") |
| dest = "bear.h264" |
| }, |
| ] |
| } |