diff options
author | Narayan Kamath <narayan@google.com> | 2014-08-21 12:25:24 +0100 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-08-21 12:31:39 +0100 |
commit | d8b54e831dc59ea5f903f0e920a64cf2411dd3ab (patch) | |
tree | aa756baacdf6bb463bce107152903968289dab99 | |
parent | f860be88a9c8fca910f2d97694d102f627d06c71 (diff) | |
download | frameworks_base-d8b54e831dc59ea5f903f0e920a64cf2411dd3ab.zip frameworks_base-d8b54e831dc59ea5f903f0e920a64cf2411dd3ab.tar.gz frameworks_base-d8b54e831dc59ea5f903f0e920a64cf2411dd3ab.tar.bz2 |
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
-rw-r--r-- | services/tests/servicestests/Android.mk | 4 | ||||
-rw-r--r-- | services/tests/servicestests/AndroidManifest.xml | 1 |
2 files changed, 4 insertions, 1 deletions
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 @@ <application> <uses-library android:name="android.test.runner" /> + <uses-library android:name="services" /> <service android:name="com.android.server.AccessibilityManagerServiceTest$MyFirstMockAccessibilityService" android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"> |