blob: 66f672492fd9e89d3d9de4d8ac8d33b23236b40a [file] [log] [blame]
Mark Salyzyn65772ca2013-12-13 11:10:11 -08001#
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
17LOCAL_PATH := $(call my-dir)
18
Mark Salyzyn9879ac82014-06-03 11:24:34 -070019test_module_prefix := logcat-
Mark Salyzyn65772ca2013-12-13 11:10:11 -080020test_tags := tests
21
22test_c_flags := \
23 -fstack-protector-all \
24 -g \
25 -Wall -Wextra \
26 -Werror \
Mark Salyzyn9879ac82014-06-03 11:24:34 -070027 -fno-builtin \
Mark Salyzyn9879ac82014-06-03 11:24:34 -070028
29# -----------------------------------------------------------------------------
Mark Salyzyn71919f42017-02-17 13:15:51 -080030# Benchmarks
Mark Salyzyn9879ac82014-06-03 11:24:34 -070031# ----------------------------------------------------------------------------
32
33benchmark_src_files := \
Mark Salyzyn71919f42017-02-17 13:15:51 -080034 logcat_benchmark.cpp \
Mark Salyzyn9879ac82014-06-03 11:24:34 -070035
36# Build benchmarks for the device. Run with:
37# adb shell /data/nativetest/logcat-benchmarks/logcat-benchmarks
38include $(CLEAR_VARS)
39LOCAL_MODULE := $(test_module_prefix)benchmarks
40LOCAL_MODULE_TAGS := $(test_tags)
Mark Salyzyn9879ac82014-06-03 11:24:34 -070041LOCAL_CFLAGS += $(test_c_flags)
42LOCAL_SRC_FILES := $(benchmark_src_files)
Elliott Hughes61b580e2018-06-15 15:16:20 -070043LOCAL_SHARED_LIBRARIES := libbase
Mark Salyzyn71919f42017-02-17 13:15:51 -080044include $(BUILD_NATIVE_BENCHMARK)
Mark Salyzyn9879ac82014-06-03 11:24:34 -070045
46# -----------------------------------------------------------------------------
47# Unit tests.
48# -----------------------------------------------------------------------------
Mark Salyzyn95cfc7b2014-03-11 11:20:56 -070049
Mark Salyzyn65772ca2013-12-13 11:10:11 -080050test_src_files := \
51 logcat_test.cpp \
Mark Salyzyna073c392017-04-03 09:30:20 -070052 logcatd_test.cpp \
Mark Salyzyn65772ca2013-12-13 11:10:11 -080053
54# Build tests for the device (with .so). Run with:
55# adb shell /data/nativetest/logcat-unit-tests/logcat-unit-tests
56include $(CLEAR_VARS)
Mark Salyzyn9879ac82014-06-03 11:24:34 -070057LOCAL_MODULE := $(test_module_prefix)unit-tests
Mark Salyzyn65772ca2013-12-13 11:10:11 -080058LOCAL_MODULE_TAGS := $(test_tags)
Mark Salyzyn65772ca2013-12-13 11:10:11 -080059LOCAL_CFLAGS += $(test_c_flags)
Elliott Hughes61b580e2018-06-15 15:16:20 -070060LOCAL_SHARED_LIBRARIES := liblog libbase
Mark Salyzyn65772ca2013-12-13 11:10:11 -080061LOCAL_SRC_FILES := $(test_src_files)
62include $(BUILD_NATIVE_TEST)