Merge "Make libutils test compile on the host"
am: f5fd4888ce
Change-Id: Id45309c93a25cba0aa632757eebee341d2dc8d98
diff --git a/libutils/tests/Android.bp b/libutils/tests/Android.bp
index ec6b67f..70ada72 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",
],
}