xref: /aosp_15_r20/cts/tests/tests/media/decoder/Android.bp (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1// Copyright (C) 2021 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    // See: http://go/android-license-faq
17    default_team: "trendy_team_android_media_codec_framework",
18    default_applicable_licenses: [
19        "Android-Apache-2.0",
20        "cts_tests_tests_media_license", // CC-BY
21    ],
22}
23
24cc_test_library {
25    name: "libctsmediadecodertest_jni",
26    srcs: [
27        "jni/native-media-jni.cpp",
28    ],
29    shared_libs: [
30        "libandroid",
31        "libnativehelper_compat_libc++",
32        "liblog",
33        "libmediandk",
34        "libEGL",
35    ],
36    header_libs: ["liblog_headers"],
37    stl: "libc++_static",
38    cflags: [
39        "-Werror",
40        "-Wall",
41        "-DEGL_EGLEXT_PROTOTYPES",
42    ],
43    gtest: false,
44    // this test suite will run on sdk 29 as part of MTS, make sure it's compatible
45    // (revisit if/when we add features to this library that require newer sdk.
46    sdk_version: "29",
47}
48
49java_defaults {
50    name: "MediaDecoderTestCases_defaults",
51    defaults: ["cts_defaults"],
52    // include both the 32 and 64 bit versions
53    compile_multilib: "both",
54    static_libs: [
55        "ctstestrunner-axt",
56        "ctstestserver",
57        "cts-media-common",
58    ],
59    jni_libs: [
60        "libctscodecutils_jni",
61        "libctsmediacommon_jni",
62        "libctsmediadecodertest_jni",
63        "libnativehelper_compat_libc++",
64    ],
65    resource_dirs: ["res"],
66    aaptflags: [
67        // Do not compress these files:
68        "-0 .vp9",
69        "-0 .ts",
70        "-0 .heic",
71        "-0 .trp",
72        "-0 .ota",
73        "-0 .mxmf",
74    ],
75    srcs: [
76        "src/**/*.java",
77    ],
78    // This test uses private APIs
79    platform_apis: true,
80    jni_uses_sdk_apis: true,
81    host_required: ["cts-dynamic-config"],
82    min_sdk_version: "29",
83    target_sdk_version: "31",
84}
85
86android_test {
87    name: "CtsMediaDecoderTestCases",
88    defaults: ["MediaDecoderTestCases_defaults"],
89    test_config: "AndroidTest.xml",
90    test_suites: [
91        "cts",
92        "general-tests",
93    ],
94}
95
96android_test {
97    name: "MctsMediaDecoderTestCases",
98    defaults: ["MediaDecoderTestCases_defaults"],
99    test_config: "AndroidTest-mcts.xml",
100    test_suites: [
101        "cts",
102        "general-tests",
103        "mcts-media",
104        "mts-media",
105    ],
106}
107
108test_module_config {
109    name: "CtsMediaDecoderTestCases_cts_decoderrendertest",
110    base: "CtsMediaDecoderTestCases",
111    test_suites: ["general-tests"],
112    include_filters: ["android.media.decoder.cts.DecoderRenderTest"],
113}
114