Narayan Kamath d8b54e831d 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
2014-08-21 12:31:39 +01:00

25 lines
485 B
Makefile

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# We only want this apk build for tests.
LOCAL_MODULE_TAGS := tests
# Include all test java files.
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
LOCAL_PACKAGE_NAME := FrameworksServicesTests
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)