| # 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/package.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":mediaplayer_test_util", |
| ":mediaplayer_tests", |
| ] |
| } |
| |
| package("mediaplayer") { |
| deps = [ |
| ":mediaplayer_bin", |
| ] |
| |
| binaries = [ |
| { |
| name = "mediaplayer" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/mediaplayer.cmx") |
| dest = "mediaplayer.cmx" |
| }, |
| ] |
| } |
| |
| executable("mediaplayer_bin") { |
| output_name = "mediaplayer" |
| |
| sources = [ |
| "main.cc", |
| "player_impl.cc", |
| "player_impl.h", |
| "source_impl.cc", |
| "source_impl.h", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/media/timeline", |
| "//garnet/public/lib/ui/base_view/cpp", |
| "//sdk/fidl/fuchsia.media", |
| "//sdk/fidl/fuchsia.media.playback", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//src/lib/fxl", |
| "//src/media/playback/mediaplayer/core", |
| "//src/media/playback/mediaplayer/decode", |
| "//src/media/playback/mediaplayer/demux", |
| "//src/media/playback/mediaplayer/fidl", |
| "//src/media/playback/mediaplayer/graph", |
| "//src/media/playback/mediaplayer/graph_create", |
| "//src/media/playback/mediaplayer/render", |
| "//src/media/playback/mediaplayer/util", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/trace-provider", |
| ] |
| } |
| |
| executable("mediaplayer_test_util_bin") { |
| output_name = "mediaplayer_test_util" |
| |
| sources = [ |
| "test/command_queue.cc", |
| "test/command_queue.h", |
| "test/mediaplayer_test_util_params.cc", |
| "test/mediaplayer_test_util_params.h", |
| "test/mediaplayer_test_util_view.cc", |
| "test/mediaplayer_test_util_view.h", |
| "test/test_util_main.cc", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/ui/base_view/cpp", |
| "//sdk/fidl/fuchsia.media.playback", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/url", |
| "//src/media/playback/mediaplayer/graph", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/hid", |
| ] |
| } |
| |
| package("mediaplayer_test_util") { |
| binaries = [ |
| { |
| name = "mediaplayer_test_util" |
| }, |
| ] |
| |
| testonly = true |
| |
| deps = [ |
| ":mediaplayer_test_util_bin", |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/mediaplayer_test_util.cmx") |
| dest = "mediaplayer_test_util.cmx" |
| }, |
| ] |
| } |
| |
| executable("mediaplayer_tests_bin") { |
| output_name = "mediaplayer_tests" |
| |
| testonly = true |
| |
| sources = [ |
| "test/command_queue.cc", |
| "test/command_queue.h", |
| "test/fakes/fake_audio.h", |
| "test/fakes/fake_audio_renderer.cc", |
| "test/fakes/fake_audio_renderer.h", |
| "test/fakes/fake_image_pipe.cc", |
| "test/fakes/fake_image_pipe.h", |
| "test/fakes/fake_scenic.cc", |
| "test/fakes/fake_scenic.h", |
| "test/fakes/fake_session.cc", |
| "test/fakes/fake_session.h", |
| "test/fakes/fake_wav_reader.cc", |
| "test/fakes/fake_wav_reader.h", |
| "test/fakes/packet_info.cc", |
| "test/fakes/packet_info.h", |
| "test/mediaplayer_tests.cc", |
| "test/sink_feeder.cc", |
| "test/sink_feeder.h", |
| ] |
| |
| deps = [ |
| ":mediaplayer_bin", |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/gtest", |
| "//garnet/public/lib/ui/base_view/cpp", |
| "//sdk/fidl/fuchsia.media.playback", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/fidl/fuchsia.ui.scenic", |
| "//sdk/fidl/fuchsia.ui.views", |
| "//sdk/lib/sys/cpp/testing:integration", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/url", |
| "//src/media/playback/mediaplayer/graph", |
| "//third_party/googletest:gtest_main", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/hid", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| test_package("mediaplayer_tests") { |
| deps = [ |
| ":mediaplayer_tests_bin", |
| "//src/media/playback/mediaplayer/core:tests", |
| "//src/media/playback/mediaplayer/demux:tests", |
| "//src/media/playback/mediaplayer/util:tests", |
| ] |
| |
| tests = [ |
| { |
| name = "mediaplayer_demux_tests" |
| environments = basic_envs |
| }, |
| |
| { |
| name = "mediaplayer_tests" |
| environments = basic_envs |
| }, |
| |
| { |
| name = "mediaplayer_util_tests" |
| environments = basic_envs |
| }, |
| |
| { |
| name = "mediaplayer_core_tests" |
| environments = basic_envs |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path( |
| "//garnet/test_data/media/third_party/chromium_media_test_data/bear-1280x720.mp4") |
| dest = "media_test_data/bear.mp4" |
| }, |
| ] |
| } |