| # Copyright 2018 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/test_package.gni") |
| |
| source_set("factory_source") { |
| sources = [ |
| "codec_factory_app.cc", |
| "codec_factory_app.h", |
| "codec_factory_impl.cc", |
| "codec_factory_impl.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.cobalt", |
| "//sdk/fidl/fuchsia.hardware.mediacodec", |
| "//sdk/fidl/fuchsia.mediacodec", |
| "//sdk/lib/svc", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| |
| # For FX_LOGF |
| "//sdk/lib/syslog/cpp:backend_legacy", |
| "//src/lib/fsl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/trace-provider:trace-provider-with-fdio", |
| ] |
| } |
| |
| executable("factory") { |
| output_name = "codec_factory" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ ":factory_source" ] |
| } |
| |
| executable("codec_detect_hw_encode_test_bin") { |
| output_name = "codec_detect_hw_encode_test" |
| |
| testonly = true |
| |
| sources = [ "test/codec_detect_hw_encode_test.cc" ] |
| |
| deps = [ |
| ":factory_source", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| ] |
| } |
| |
| test_package("codec_detect_hw_encode_test") { |
| deps = [ ":codec_detect_hw_encode_test_bin" ] |
| |
| tests = [ |
| { |
| name = "codec_detect_hw_encode_test" |
| |
| # test depends on hw encoder device being present |
| environments = [ sherlock_env ] |
| }, |
| ] |
| } |
| |
| executable("codec_detect_hw_decode_test_bin") { |
| output_name = "codec_detect_hw_decode_test" |
| |
| testonly = true |
| |
| sources = [ "test/codec_detect_hw_decode_test.cc" ] |
| |
| deps = [ |
| ":factory_source", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| ] |
| } |
| |
| test_package("codec_detect_hw_decode_test") { |
| deps = [ ":codec_detect_hw_decode_test_bin" ] |
| |
| tests = [ |
| { |
| name = "codec_detect_hw_decode_test" |
| |
| # test depends on hw decoder device being present |
| environments = [ |
| sherlock_env, |
| astro_env, |
| ] |
| }, |
| ] |
| } |