blob: 82a192bc220a6f03f7c1df68ab8869027f1678f6 [file] [log] [blame]
# Copyright 2018 The Chromium OS 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("//common-mk/pkg_config.gni")
group("all") {
deps = [
":arcvideodecoder_test",
":arcvideoencoder_test",
]
}
pkg_config("dep_libs") {
pkg_deps = [
"cutils",
"mediandk",
]
}
# For ARC++ test, we does not install Gtest library into the Android
# container. Instead, we build the binary with static library.
config("arc_gtest") {
gtest_config = getenv("GTEST_CONFIG")
lib_dirs = exec_script("//common-mk/args_generator_wrapper.py",
[
gtest_config,
"--libdir",
],
"list lines")
libs = exec_script("//common-mk/arg_prefix_filter_wrapper.py",
[
"--prefix=-l",
gtest_config,
"--libs",
],
"list lines")
include_dirs = exec_script("//common-mk/args_generator_wrapper.py",
[
gtest_config,
"--includedir",
],
"list lines")
cflags_cc = exec_script("//common-mk/args_generator_wrapper.py",
[
gtest_config,
"--cxxflags",
],
"list lines")
}
executable("arcvideoencoder_test") {
configs += [
":arc_gtest",
":dep_libs",
]
# In Android N branch, off_t is 32-bit. Therefore we cannot compile the binary
# with _FILE_OFFSET_BITS=64. However, we already add the variable at
# //common-mk/compiler_defaults. Therefore we undefine the variable here.
# (crbug.com/945197)
cflags_cc = [ "-U_FILE_OFFSET_BITS" ]
sources = [
"arc_video_encoder_e2e_test.cc",
"common.cc",
"mediacodec_encoder.cc",
]
}
executable("arcvideodecoder_test") {
configs += [
":arc_gtest",
":dep_libs",
]
sources = [
"arc_video_decoder_e2e_test.cc",
"common.cc",
"encoded_data_helper.cc",
"mediacodec_decoder.cc",
]
}