Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae84a18a authored by Steve McKay's avatar Steve McKay
Browse files

Move functional tests into separate test target.

Also separate out support code from unittests.

Change-Id: I81490950373e170c857b23468da8d97d6aaf50d9
parent e0edcd90
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -5,10 +5,8 @@ LOCAL_MODULE_TAGS := tests

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
    $(call all-java-files-under, ../tests/src/com/android/documentsui/bots) \
    ../tests/src/com/android/documentsui/DocumentsProviderHelper.java \
    ../tests/src/com/android/documentsui/StubProvider.java \
    ../tests/src/com/android/documentsui/functional/ActivityTest.java
    $(call all-java-files-under, ../tests/common/com/android/documentsui) \
    ../tests/functional/com/android/documentsui/ActivityTest.java

LOCAL_JAVA_LIBRARIES := android-support-v4 android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := mockito-target ub-uiautomator ub-janktesthelper espresso-core
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import android.test.suitebuilder.annotation.LargeTest;

import com.android.documentsui.BaseActivity.EventListener;
import com.android.documentsui.base.RootInfo;
import com.android.documentsui.functional.ActivityTest;
import com.android.documentsui.ActivityTest;
import com.android.documentsui.manager.ManageActivity;

import java.util.ArrayList;
+14 −5
Original line number Diff line number Diff line

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

# unittests
LOCAL_MODULE_TAGS := tests
#LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under, common, unit)
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := mockito-target ub-uiautomator espresso-core guava
LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
LOCAL_PACKAGE_NAME := DocumentsUIUnitTests
LOCAL_INSTRUMENTATION_FOR := DocumentsUI
LOCAL_CERTIFICATE := platform

LOCAL_SRC_FILES := $(call all-java-files-under, src)
include $(CLEAR_VARS)

# functional tests
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, common, functional)
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := mockito-target ub-uiautomator espresso-core guava
LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt

LOCAL_PACKAGE_NAME := DocumentsUITests
LOCAL_PACKAGE_NAME := DocumentsUIFunctionalTests
LOCAL_INSTRUMENTATION_FOR := DocumentsUI

LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)

tests/README

0 → 100644
+8 −0
Original line number Diff line number Diff line
Welcome to our tests!

unit tests are under the 'unit/' dir, function under 'functional/'.

To run just small tests"
adb shell am instrument -w -e debug false -e log false -e timeout_msec 300000 -e size small com.android.documentsui.tests/android.support.test.runner.AndroidJUnitRunner

Replace '-e size small' with '-e size large'.
Loading