blob: ad402db441022d8680538dff59acbb5e8fce2bf9 [file] [log] [blame]
Dan Willemsen9c99f152018-11-16 15:30:38 -08001// Build the unit tests for libaudioprocessing
2
Bob Badour56786ac2021-02-25 15:24:36 -08003package {
4 // See: http://go/android-license-faq
5 // A large-scale-change added 'default_applicable_licenses' to import
6 // all of the 'license_kinds' from "frameworks_av_license"
7 // to get the below license kinds:
8 // SPDX-license-identifier-Apache-2.0
9 default_applicable_licenses: ["frameworks_av_license"],
10}
11
Dan Willemsen9c99f152018-11-16 15:30:38 -080012cc_defaults {
13 name: "libaudioprocessing_test_defaults",
14
Marco Nelissen6b285942019-10-21 14:52:30 -070015 header_libs: [
16 "libbase_headers",
17 "libmedia_headers",
18 ],
19
Dan Willemsen9c99f152018-11-16 15:30:38 -080020 shared_libs: [
Marco Nelissen3230ed82019-09-26 11:20:54 -070021 "libaudioclient",
Dan Willemsen9c99f152018-11-16 15:30:38 -080022 "libaudioprocessing",
Andy Hung3f692412019-04-02 15:48:22 -070023 "libaudioutils",
Dan Willemsen9c99f152018-11-16 15:30:38 -080024 "libcutils",
25 "liblog",
26 "libutils",
jiabinbf6b0ec2019-02-12 12:30:12 -080027 "libvibrator",
Dan Willemsen9c99f152018-11-16 15:30:38 -080028 ],
29
30 cflags: [
31 "-Werror",
32 "-Wall",
33 ],
34}
35
36//
37// resampler unit test
38//
39cc_test {
40 name: "resampler_tests",
41 defaults: ["libaudioprocessing_test_defaults"],
42
43 srcs: ["resampler_tests.cpp"],
44}
45
46//
47// audio mixer test tool
48//
49cc_binary {
50 name: "test-mixer",
51 defaults: ["libaudioprocessing_test_defaults"],
52
53 srcs: ["test-mixer.cpp"],
54 static_libs: ["libsndfile"],
55}
56
57//
58// build audio resampler test tool
59//
60cc_binary {
61 name: "test-resampler",
62 defaults: ["libaudioprocessing_test_defaults"],
63
64 srcs: ["test-resampler.cpp"],
65 static_libs: ["libsndfile"],
66}
Judy Hsiao19e533c2019-08-14 16:52:51 +080067
68//
69// build mixerops objdump
70//
71// This is used to verify proper optimization of the code.
72//
73// For example, use:
74// ./prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-objdump
75// -d --source ./out/target/product/crosshatch/symbols/system/bin/mixerops_objdump
76//
77cc_binary {
78 name: "mixerops_objdump",
Andy Hunge059b8f2021-06-08 17:10:54 -070079 header_libs: ["libaudioutils_headers"],
Judy Hsiao19e533c2019-08-14 16:52:51 +080080 srcs: ["mixerops_objdump.cpp"],
81}
82
83//
84// build mixerops benchmark
85//
86cc_benchmark {
87 name: "mixerops_benchmark",
Andy Hunge059b8f2021-06-08 17:10:54 -070088 header_libs: ["libaudioutils_headers"],
Judy Hsiao19e533c2019-08-14 16:52:51 +080089 srcs: ["mixerops_benchmark.cpp"],
90 static_libs: ["libgoogle-benchmark"],
91}
Andy Hunge059b8f2021-06-08 17:10:54 -070092
93//
94// mixerops unit test
95//
96cc_test {
97 name: "mixerops_tests",
98 defaults: ["libaudioprocessing_test_defaults"],
99 srcs: ["mixerops_tests.cpp"],
100}