Dan Willemsen | 9c99f15 | 2018-11-16 15:30:38 -0800 | [diff] [blame] | 1 | // Build the unit tests for libaudioprocessing |
| 2 | |
Bob Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 3 | package { |
| 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 Willemsen | 9c99f15 | 2018-11-16 15:30:38 -0800 | [diff] [blame] | 12 | cc_defaults { |
| 13 | name: "libaudioprocessing_test_defaults", |
| 14 | |
Marco Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 15 | header_libs: [ |
| 16 | "libbase_headers", |
| 17 | "libmedia_headers", |
| 18 | ], |
| 19 | |
Dan Willemsen | 9c99f15 | 2018-11-16 15:30:38 -0800 | [diff] [blame] | 20 | shared_libs: [ |
Marco Nelissen | 3230ed8 | 2019-09-26 11:20:54 -0700 | [diff] [blame] | 21 | "libaudioclient", |
Dan Willemsen | 9c99f15 | 2018-11-16 15:30:38 -0800 | [diff] [blame] | 22 | "libaudioprocessing", |
Andy Hung | 3f69241 | 2019-04-02 15:48:22 -0700 | [diff] [blame] | 23 | "libaudioutils", |
Dan Willemsen | 9c99f15 | 2018-11-16 15:30:38 -0800 | [diff] [blame] | 24 | "libcutils", |
| 25 | "liblog", |
| 26 | "libutils", |
jiabin | bf6b0ec | 2019-02-12 12:30:12 -0800 | [diff] [blame] | 27 | "libvibrator", |
Dan Willemsen | 9c99f15 | 2018-11-16 15:30:38 -0800 | [diff] [blame] | 28 | ], |
| 29 | |
| 30 | cflags: [ |
| 31 | "-Werror", |
| 32 | "-Wall", |
| 33 | ], |
| 34 | } |
| 35 | |
| 36 | // |
| 37 | // resampler unit test |
| 38 | // |
| 39 | cc_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 | // |
| 49 | cc_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 | // |
| 60 | cc_binary { |
| 61 | name: "test-resampler", |
| 62 | defaults: ["libaudioprocessing_test_defaults"], |
| 63 | |
| 64 | srcs: ["test-resampler.cpp"], |
| 65 | static_libs: ["libsndfile"], |
| 66 | } |
Judy Hsiao | 19e533c | 2019-08-14 16:52:51 +0800 | [diff] [blame] | 67 | |
| 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 | // |
| 77 | cc_binary { |
| 78 | name: "mixerops_objdump", |
Andy Hung | e059b8f | 2021-06-08 17:10:54 -0700 | [diff] [blame] | 79 | header_libs: ["libaudioutils_headers"], |
Judy Hsiao | 19e533c | 2019-08-14 16:52:51 +0800 | [diff] [blame] | 80 | srcs: ["mixerops_objdump.cpp"], |
| 81 | } |
| 82 | |
| 83 | // |
| 84 | // build mixerops benchmark |
| 85 | // |
| 86 | cc_benchmark { |
| 87 | name: "mixerops_benchmark", |
Andy Hung | e059b8f | 2021-06-08 17:10:54 -0700 | [diff] [blame] | 88 | header_libs: ["libaudioutils_headers"], |
Judy Hsiao | 19e533c | 2019-08-14 16:52:51 +0800 | [diff] [blame] | 89 | srcs: ["mixerops_benchmark.cpp"], |
| 90 | static_libs: ["libgoogle-benchmark"], |
| 91 | } |
Andy Hung | e059b8f | 2021-06-08 17:10:54 -0700 | [diff] [blame] | 92 | |
| 93 | // |
| 94 | // mixerops unit test |
| 95 | // |
| 96 | cc_test { |
| 97 | name: "mixerops_tests", |
| 98 | defaults: ["libaudioprocessing_test_defaults"], |
| 99 | srcs: ["mixerops_tests.cpp"], |
| 100 | } |