Dan Willemsen | 3e963f9 | 2018-10-31 10:32:32 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2014 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | // ----------------------------------------------------------------------------- |
| 18 | // Unit tests. |
| 19 | // ----------------------------------------------------------------------------- |
| 20 | |
| 21 | cc_defaults { |
| 22 | name: "logd-unit-test-defaults", |
| 23 | |
| 24 | cflags: [ |
| 25 | "-fstack-protector-all", |
| 26 | "-g", |
| 27 | "-Wall", |
| 28 | "-Wextra", |
| 29 | "-Werror", |
| 30 | "-fno-builtin", |
| 31 | |
| 32 | "-DAUDITD_LOG_TAG=1003", |
| 33 | "-DCHATTY_LOG_TAG=1004", |
| 34 | ], |
| 35 | |
| 36 | srcs: ["logd_test.cpp"], |
| 37 | |
dimitry | bf613b4 | 2019-05-14 14:50:27 +0200 | [diff] [blame] | 38 | static_libs: [ |
Dan Willemsen | 3e963f9 | 2018-10-31 10:32:32 -0700 | [diff] [blame] | 39 | "libbase", |
| 40 | "libcutils", |
Dan Willemsen | 3e963f9 | 2018-10-31 10:32:32 -0700 | [diff] [blame] | 41 | "libselinux", |
dimitry | bf613b4 | 2019-05-14 14:50:27 +0200 | [diff] [blame] | 42 | "liblog", |
Dan Willemsen | 3e963f9 | 2018-10-31 10:32:32 -0700 | [diff] [blame] | 43 | ], |
Dan Willemsen | 3e963f9 | 2018-10-31 10:32:32 -0700 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | // Build tests for the logger. Run with: |
| 47 | // adb shell /data/nativetest/logd-unit-tests/logd-unit-tests |
| 48 | cc_test { |
| 49 | name: "logd-unit-tests", |
| 50 | defaults: ["logd-unit-test-defaults"], |
| 51 | } |
| 52 | |
| 53 | cc_test { |
| 54 | name: "CtsLogdTestCases", |
| 55 | defaults: ["logd-unit-test-defaults"], |
| 56 | multilib: { |
| 57 | lib32: { |
| 58 | suffix: "32", |
| 59 | }, |
| 60 | lib64: { |
| 61 | suffix: "64", |
| 62 | }, |
| 63 | }, |
| 64 | test_suites: [ |
| 65 | "cts", |
| 66 | "vts", |
| 67 | ], |
| 68 | } |