1# Copyright 2016 The Android Open Source Project
2
3LOCAL_PATH:= $(call my-dir)
4
5# -----------------------------------------------------------------------------
6# Unit tests.
7# -----------------------------------------------------------------------------
8
9test_c_flags := \
10    -fstack-protector-all \
11    -g \
12    -Wall -Wextra \
13    -Werror \
14    -fno-builtin \
15
16# Required Tests
17cts_src_files := \
18    multicast_test.cpp \
19    pstore_test.cpp \
20    sysvipc_test.cpp \
21    logger_test.cpp
22
23# Required plus Recommended Tests
24# TODO: move aslr_test.cpp back to cts_src_files b/36888825
25test_src_files := \
26    $(cts_src_files) \
27    aslr_test.cpp \
28    aslr_rec_test.cpp \
29    mmc_max_speed_test.cpp \
30
31include $(CLEAR_VARS)
32LOCAL_MODULE := kernel-config-unit-tests
33LOCAL_MODULE_TAGS := tests
34LOCAL_CFLAGS := $(test_c_flags)
35LOCAL_CFLAGS := -DHAS_KCMP
36LOCAL_SRC_FILES := $(test_src_files)
37include $(BUILD_NATIVE_TEST)
38
39include $(CLEAR_VARS)
40LOCAL_MODULE := CtsKernelConfigTestCases
41LOCAL_MODULE_TAGS := optional
42LOCAL_CFLAGS := $(test_c_flags)
43LOCAL_CFLAGS := -DHAS_KCMP
44LOCAL_SRC_FILES := $(cts_src_files)
45LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
46LOCAL_MULTILIB := both
47LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
48LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
49LOCAL_STATIC_LIBRARIES := libgtest libgtest_main
50
51LOCAL_COMPATIBILITY_SUITE := cts
52LOCAL_CTS_TEST_PACKAGE := android.kernel.config
53include $(BUILD_CTS_EXECUTABLE)
54
55include $(CLEAR_VARS)
56LOCAL_SRC_FILES := \
57    scrape_mmap_addr.cpp
58
59LOCAL_MODULE := scrape_mmap_addr
60include $(BUILD_NATIVE_TEST)
61