- To run robolectric tests with code coverage, run: make RunSettingsRoboTests-jacoco -j44 - Generated reports are placed under $OUT/obj/FAKE/RunSettingsRoboTests_intermediates/coverage bug:32617403 Test: Ran manually, verified that reports are generated. Change-Id: Ie51ab86c5fbaa9297d717167fda04a555dadbfe8
43 lines
1.1 KiB
Makefile
43 lines
1.1 KiB
Makefile
#############################################
|
|
# Settings Robolectric test target. #
|
|
#############################################
|
|
LOCAL_PATH:= $(call my-dir)
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
|
|
|
# Include the testing libraries (JUnit4 + Robolectric libs).
|
|
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
platform-system-robolectric \
|
|
truth-prebuilt
|
|
|
|
LOCAL_JAVA_LIBRARIES := \
|
|
junit \
|
|
platform-robolectric-prebuilt \
|
|
sdk_vcurrent \
|
|
telephony-common
|
|
|
|
LOCAL_INSTRUMENTATION_FOR := Settings
|
|
LOCAL_MODULE := SettingsRoboTests
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
include $(BUILD_STATIC_JAVA_LIBRARY)
|
|
|
|
#############################################################
|
|
# Settings runner target to run the previous target. #
|
|
#############################################################
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := RunSettingsRoboTests
|
|
|
|
LOCAL_SDK_VERSION := current
|
|
|
|
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
SettingsRoboTests
|
|
|
|
LOCAL_TEST_PACKAGE := Settings
|
|
|
|
LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src
|
|
|
|
include prebuilts/misc/common/robolectric/run_robotests.mk |