Sasha Smundak | d23e29c | 2019-01-22 14:21:59 -0800 | [diff] [blame] | 1 | // Copyright (C) 2016 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 | |
| 15 | cc_defaults { |
| 16 | name: "libwifilogd_flags", |
| 17 | cflags: [ |
| 18 | "-Wall", |
| 19 | "-Wextra", |
| 20 | "-Weffc++", |
Sasha Smundak | d23e29c | 2019-01-22 14:21:59 -0800 | [diff] [blame] | 21 | "-Werror", |
| 22 | |
| 23 | ], |
| 24 | include_dirs: ["system/connectivity"], |
| 25 | shared_libs: [ |
| 26 | "libbase", |
| 27 | "libcutils", |
| 28 | "liblog", |
| 29 | ], |
| 30 | |
| 31 | } |
| 32 | |
| 33 | // wifilogd static library |
| 34 | cc_library_static { |
| 35 | name: "libwifilogd", |
| 36 | srcs: [ |
| 37 | "command_processor.cpp", |
| 38 | "main_loop.cpp", |
| 39 | "memory_reader.cpp", |
| 40 | "message_buffer.cpp", |
| 41 | "os.cpp", |
| 42 | "raw_os.cpp", |
| 43 | ], |
| 44 | defaults: ["libwifilogd_flags"], |
| 45 | } |
| 46 | |
| 47 | // wifilogd unit tests. |
| 48 | cc_test { |
| 49 | name: "wifilogd_unit_test", |
| 50 | test_suites: ["device-tests"], |
| 51 | defaults: ["libwifilogd_flags"], |
Sasha Smundak | d23e29c | 2019-01-22 14:21:59 -0800 | [diff] [blame] | 52 | srcs: [ |
| 53 | "tests/byte_buffer_unittest.cpp", |
| 54 | "tests/command_processor_unittest.cpp", |
| 55 | "tests/local_utils_unittest.cpp", |
| 56 | "tests/main.cpp", |
| 57 | "tests/main_loop_unittest.cpp", |
| 58 | "tests/memory_reader_unittest.cpp", |
| 59 | "tests/message_buffer_unittest.cpp", |
| 60 | "tests/mock_command_processor.cpp", |
| 61 | "tests/mock_os.cpp", |
| 62 | "tests/mock_raw_os.cpp", |
| 63 | "tests/os_unittest.cpp", |
| 64 | "tests/protocol_unittest.cpp", |
| 65 | ], |
| 66 | static_libs: [ |
| 67 | "libgmock", |
| 68 | "libwifilogd", |
| 69 | ], |
| 70 | } |