Mark Salyzyn | 65772ca | 2013-12-13 11:10:11 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2013-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 | LOCAL_PATH := $(call my-dir) |
| 18 | |
Mark Salyzyn | 9879ac8 | 2014-06-03 11:24:34 -0700 | [diff] [blame] | 19 | test_module_prefix := logcat- |
Mark Salyzyn | 65772ca | 2013-12-13 11:10:11 -0800 | [diff] [blame] | 20 | test_tags := tests |
| 21 | |
| 22 | test_c_flags := \ |
| 23 | -fstack-protector-all \ |
| 24 | -g \ |
| 25 | -Wall -Wextra \ |
| 26 | -Werror \ |
Mark Salyzyn | 9879ac8 | 2014-06-03 11:24:34 -0700 | [diff] [blame] | 27 | -fno-builtin \ |
Mark Salyzyn | 9879ac8 | 2014-06-03 11:24:34 -0700 | [diff] [blame] | 28 | |
| 29 | # ----------------------------------------------------------------------------- |
Mark Salyzyn | 71919f4 | 2017-02-17 13:15:51 -0800 | [diff] [blame] | 30 | # Benchmarks |
Mark Salyzyn | 9879ac8 | 2014-06-03 11:24:34 -0700 | [diff] [blame] | 31 | # ---------------------------------------------------------------------------- |
| 32 | |
| 33 | benchmark_src_files := \ |
Mark Salyzyn | 71919f4 | 2017-02-17 13:15:51 -0800 | [diff] [blame] | 34 | logcat_benchmark.cpp \ |
| 35 | exec_benchmark.cpp \ |
Mark Salyzyn | 9879ac8 | 2014-06-03 11:24:34 -0700 | [diff] [blame] | 36 | |
| 37 | # Build benchmarks for the device. Run with: |
| 38 | # adb shell /data/nativetest/logcat-benchmarks/logcat-benchmarks |
| 39 | include $(CLEAR_VARS) |
| 40 | LOCAL_MODULE := $(test_module_prefix)benchmarks |
| 41 | LOCAL_MODULE_TAGS := $(test_tags) |
Mark Salyzyn | 9879ac8 | 2014-06-03 11:24:34 -0700 | [diff] [blame] | 42 | LOCAL_CFLAGS += $(test_c_flags) |
| 43 | LOCAL_SRC_FILES := $(benchmark_src_files) |
Mark Salyzyn | 71919f4 | 2017-02-17 13:15:51 -0800 | [diff] [blame] | 44 | LOCAL_SHARED_LIBRARIES := libbase liblogcat |
| 45 | include $(BUILD_NATIVE_BENCHMARK) |
Mark Salyzyn | 9879ac8 | 2014-06-03 11:24:34 -0700 | [diff] [blame] | 46 | |
| 47 | # ----------------------------------------------------------------------------- |
| 48 | # Unit tests. |
| 49 | # ----------------------------------------------------------------------------- |
Mark Salyzyn | 95cfc7b | 2014-03-11 11:20:56 -0700 | [diff] [blame] | 50 | |
Mark Salyzyn | 65772ca | 2013-12-13 11:10:11 -0800 | [diff] [blame] | 51 | test_src_files := \ |
| 52 | logcat_test.cpp \ |
Mark Salyzyn | a073c39 | 2017-04-03 09:30:20 -0700 | [diff] [blame] | 53 | logcatd_test.cpp \ |
Mark Salyzyn | 6dabc81 | 2017-02-10 13:09:07 -0800 | [diff] [blame] | 54 | liblogcat_test.cpp \ |
Mark Salyzyn | 65772ca | 2013-12-13 11:10:11 -0800 | [diff] [blame] | 55 | |
| 56 | # Build tests for the device (with .so). Run with: |
| 57 | # adb shell /data/nativetest/logcat-unit-tests/logcat-unit-tests |
| 58 | include $(CLEAR_VARS) |
Mark Salyzyn | 9879ac8 | 2014-06-03 11:24:34 -0700 | [diff] [blame] | 59 | LOCAL_MODULE := $(test_module_prefix)unit-tests |
Mark Salyzyn | 65772ca | 2013-12-13 11:10:11 -0800 | [diff] [blame] | 60 | LOCAL_MODULE_TAGS := $(test_tags) |
Mark Salyzyn | 65772ca | 2013-12-13 11:10:11 -0800 | [diff] [blame] | 61 | LOCAL_CFLAGS += $(test_c_flags) |
Mark Salyzyn | 6dabc81 | 2017-02-10 13:09:07 -0800 | [diff] [blame] | 62 | LOCAL_SHARED_LIBRARIES := liblog libbase liblogcat |
Mark Salyzyn | 65772ca | 2013-12-13 11:10:11 -0800 | [diff] [blame] | 63 | LOCAL_SRC_FILES := $(test_src_files) |
| 64 | include $(BUILD_NATIVE_TEST) |