From 155c983ad162899a9a926fe8750c2fcc9f4fb418 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 23 Feb 2017 17:49:23 -0800 Subject: [PATCH] Make libutils test compile on the host Reapply of Icd5f39ae71b57167e9b2fe7ec09c5400bcb90e78 with RefBase_test.cpp and Looper_test.cpp removed from mac builds. Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests Test: out/host/darwin-x86/nativetest64/libutils_tests/libutils_tests Change-Id: I5979b296a8500b5697d94d64fc441363047adcea --- libutils/tests/Android.bp | 50 ++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/libutils/tests/Android.bp b/libutils/tests/Android.bp index ec6b67f21..70ada729e 100644 --- a/libutils/tests/Android.bp +++ b/libutils/tests/Android.bp @@ -18,33 +18,49 @@ cc_test { name: "libutils_tests", + host_supported: true, srcs: [ - "BlobCache_test.cpp", "BitSet_test.cpp", - "Looper_test.cpp", "LruCache_test.cpp", - "RefBase_test.cpp", "String8_test.cpp", "StrongPointer_test.cpp", - "SystemClock_test.cpp", "Unicode_test.cpp", "Vector_test.cpp", ], - shared_libs: [ - "libz", - "liblog", - "libcutils", - "libutils", - ], -} + target: { + android: { + srcs: [ + "BlobCache_test.cpp", + "Looper_test.cpp", + "RefBase_test.cpp", + "SystemClock_test.cpp", + ], + shared_libs: [ + "libz", + "liblog", + "libcutils", + "libutils", + ], + }, + linux: { + srcs: [ + "Looper_test.cpp", + "RefBase_test.cpp", + ], + }, + host: { + static_libs: [ + "libutils", + "liblog", + ], + }, + }, -cc_test_host { - name: "libutils_tests_host", - srcs: ["Vector_test.cpp"], - static_libs: [ - "libutils", - "liblog", + cflags: [ + "-Wall", + "-Wextra", + "-Werror", ], }