Unit test for UidRange.java and UidRange.cpp
Verifies that:
- UidRange only accepts non-negative UIDs
- UidRange only accepts start UID <= stop UID
- Native implementation is in sync with java implementation (via JNI)
Change-Id: I8b412781efe9cfda6d5e666e37fe0d8f5e2b6ecc
diff --git a/services/tests/servicestests/Android.mk b/services/tests/servicestests/Android.mk
index 7ffdb35..59c6970 100644
--- a/services/tests/servicestests/Android.mk
+++ b/services/tests/servicestests/Android.mk
@@ -28,10 +28,22 @@
LOCAL_CERTIFICATE := platform
-LOCAL_JNI_SHARED_LIBRARIES := \
- libapfjni \
+# These are not normally accessible from apps so they must be explicitly included.
+LOCAL_JNI_SHARED_LIBRARIES := libservicestestsjni \
+ libbacktrace \
+ libbase \
+ libbinder \
libc++ \
- libnativehelper
+ libcutils \
+ liblog \
+ liblzma \
+ libnativehelper \
+ libnetdaidl \
+ libui \
+ libunwind \
+ libutils
+
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
include $(BUILD_PACKAGE)
@@ -45,22 +57,24 @@
LOCAL_MODULE_TAGS := tests
-LOCAL_CFLAGS := -Wall -Werror
+LOCAL_CFLAGS := -Wall -Wextra -Werror
LOCAL_C_INCLUDES := \
libpcap \
hardware/google/apf
-LOCAL_SRC_FILES := apf_jni.cpp
+LOCAL_SRC_FILES := $(call all-cpp-files-under)
LOCAL_SHARED_LIBRARIES := \
+ libbinder \
+ libcutils \
libnativehelper \
- liblog
+ libnetdaidl
LOCAL_STATIC_LIBRARIES := \
libpcap \
libapf
-LOCAL_MODULE := libapfjni
+LOCAL_MODULE := libservicestestsjni
include $(BUILD_SHARED_LIBRARY)