Home | History | Annotate | Download | only in robotests
      1 #############################################
      2 # Add app-specific Robolectric test target. #
      3 #############################################
      4 LOCAL_PATH := $(call my-dir)
      5 include $(CLEAR_VARS)
      6 
      7 LOCAL_SRC_FILES := $(call all-java-files-under, src)
      8 
      9 # Include the testing libraries (JUnit4 + Robolectric libs).
     10 LOCAL_STATIC_JAVA_LIBRARIES := \
     11     platform-robolectric-android-all-stubs \
     12     mockito-robolectric-prebuilt \
     13     truth-prebuilt
     14 
     15 LOCAL_JAVA_LIBRARIES := \
     16     junit \
     17     platform-robolectric-3.6.1-prebuilt
     18 
     19 LOCAL_INSTRUMENTATION_FOR := StorageManager
     20 LOCAL_MODULE := StorageManagerRoboTests
     21 
     22 LOCAL_MODULE_TAGS := optional
     23 
     24 include $(BUILD_STATIC_JAVA_LIBRARY)
     25 
     26 #############################################################
     27 # Add Robolectric runner target to run the previous target. #
     28 #############################################################
     29 include $(CLEAR_VARS)
     30 
     31 LOCAL_MODULE := RunStorageManagerRoboTests
     32 
     33 LOCAL_SDK_VERSION := current
     34 
     35 LOCAL_STATIC_JAVA_LIBRARIES := \
     36     StorageManagerRoboTests
     37 
     38 LOCAL_TEST_PACKAGE := StorageManager
     39 
     40 include prebuilts/misc/common/robolectric/3.6.1/run_robotests.mk
     41