From d8b54e831dc59ea5f903f0e920a64cf2411dd3ab Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Thu, 21 Aug 2014 12:25:24 +0100 Subject: Fix service tests. Depending on a LOCAL_JAVA_LIBRARY doesn't do anything at runtime unless the library is manually added to the class path. Since system server classes (and the system server) can't be instrumented like a normal app can, we can't really write "real" Instrumentation Tests for its classes. Given that, we can just compile the classes under test into the same jar file as the testcases. Change-Id: Ie4377bf81b9542ceca938e26ac78e30835fc40bc --- services/tests/servicestests/Android.mk | 4 +++- services/tests/servicestests/AndroidManifest.xml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/tests/servicestests/Android.mk b/services/tests/servicestests/Android.mk index 4ff3899..f25fc62 100644 --- a/services/tests/servicestests/Android.mk +++ b/services/tests/servicestests/Android.mk @@ -8,11 +8,13 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_STATIC_JAVA_LIBRARIES := \ + services.core \ + services.devicepolicy \ easymocklib \ guava \ mockito-target -LOCAL_JAVA_LIBRARIES := android.test.runner services +LOCAL_JAVA_LIBRARIES := android.test.runner LOCAL_PACKAGE_NAME := FrameworksServicesTests diff --git a/services/tests/servicestests/AndroidManifest.xml b/services/tests/servicestests/AndroidManifest.xml index 636dd4d..19a199e 100644 --- a/services/tests/servicestests/AndroidManifest.xml +++ b/services/tests/servicestests/AndroidManifest.xml @@ -39,6 +39,7 @@ + -- cgit v1.1