summaryrefslogtreecommitdiff
path: root/simpleperf/Android.mk
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-03-02 13:56:28 -0800
committerYabin Cui <yabinc@google.com>2016-03-02 18:21:14 -0800
commitbe7ec66eaa4f995bd9068637f7c7d5718173922c (patch)
tree3340b9e58baa518f75b60bfabac56532f25a1a26 /simpleperf/Android.mk
parent5cfed7b49b1ae706265d4181b1d4f0dbb79491f5 (diff)
downloadextras-be7ec66eaa4f995bd9068637f7c7d5718173922c.tar.gz
simpleperf: support building cts test.
1. build cts test libraries. 2. change tests to use tmpfile instead of perf.data. 3. support extracting testdata from cts test file. Bug: 27387280 Change-Id: I7c5db77f3157d586d0c9beb446b247626e7cce36
Diffstat (limited to 'simpleperf/Android.mk')
-rw-r--r--simpleperf/Android.mk36
1 files changed, 36 insertions, 0 deletions
diff --git a/simpleperf/Android.mk b/simpleperf/Android.mk
index 3bd1a63a..1ec496ed 100644
--- a/simpleperf/Android.mk
+++ b/simpleperf/Android.mk
@@ -300,4 +300,40 @@ LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux)
LOCAL_MULTILIB := first
include $(BUILD_HOST_NATIVE_TEST)
+
+# libsimpleperf_cts_test
+# =========================================================
+libsimpleperf_cts_test_src_files := \
+ $(libsimpleperf_src_files) \
+ $(libsimpleperf_src_files_linux) \
+ $(simpleperf_unit_test_src_files) \
+ $(simpleperf_unit_test_src_files_linux) \
+
+# libsimpleperf_cts_test target
+include $(CLEAR_VARS)
+LOCAL_CLANG := true
+LOCAL_MODULE := libsimpleperf_cts_test
+LOCAL_CPPFLAGS := $(simpleperf_cppflags_target) -DIN_CTS_TEST
+LOCAL_SRC_FILES := $(libsimpleperf_cts_test_src_files)
+LOCAL_STATIC_LIBRARIES := $(simpleperf_static_libraries_target)
+LOCAL_SHARED_LIBRARIES := $(simpleperf_shared_libraries_target)
+LOCAL_MULTILIB := both
+include $(LLVM_DEVICE_BUILD_MK)
+include $(BUILD_STATIC_TEST_LIBRARY)
+
+# libsimpleperf_cts_test linux host
+include $(CLEAR_VARS)
+LOCAL_CLANG := true
+LOCAL_MODULE := libsimpleperf_cts_test
+LOCAL_MODULE_HOST_OS := linux
+LOCAL_CPPFLAGS := $(simpleperf_cppflags_host) -DIN_CTS_TEST
+LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
+LOCAL_SRC_FILES := $(libsimpleperf_cts_test_src_files)
+LOCAL_STATIC_LIBRARIES := $(simpleperf_static_libraries_host)
+LOCAL_SHARED_LIBRARIES_linux := $(simpleperf_shared_libraries_host_linux)
+LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux)
+LOCAL_MULTILIB := both
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_STATIC_TEST_LIBRARY)
+
include $(call first-makefiles-under,$(LOCAL_PATH))