Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Prepare for removal of legacy-test from default targets
Browse files Browse the repository at this point in the history
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Change-Id: I13e88297731253420e4e5f5291d503f13a39a156
  • Loading branch information
paulduffin committed Jan 18, 2017
1 parent 57b8eb3 commit 8aeb59e
Show file tree
Hide file tree
Showing 39 changed files with 47 additions and 18 deletions.
2 changes: 2 additions & 0 deletions cmds/uiautomator/library/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(uiautomator.core_src_files)
LOCAL_MODULE := uiautomator.core
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
include $(BUILD_STATIC_JAVA_LIBRARY)

###############################################
# Generate the stub source files
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(uiautomator.core_src_files)
LOCAL_JAVA_LIBRARIES := $(uiautomator.core_java_libraries)
LOCAL_STATIC_JAVA_LIBRARIES := legacy-android-test
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/core-src \
$(LOCAL_PATH)/testrunner-src
Expand Down
1 change: 1 addition & 0 deletions core/tests/ConnectivityManagerTest/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
Expand Down
1 change: 1 addition & 0 deletions core/tests/bandwidthtests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ LOCAL_SRC_FILES := \
$(call all-java-files-under, src)

LOCAL_JAVA_LIBRARIES := android.test.runner org.apache.http.legacy
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := BandwidthTests

include $(BUILD_PACKAGE)
Expand Down
1 change: 1 addition & 0 deletions core/tests/bluetoothtests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ LOCAL_SRC_FILES := \
$(call all-java-files-under, src)

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := BluetoothTests
LOCAL_CERTIFICATE := platform

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LOCAL_MODULE_TAGS := tests

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

LOCAL_STATIC_JAVA_LIBRARIES := android-common mockwebserver
LOCAL_STATIC_JAVA_LIBRARIES := android-common mockwebserver junit legacy-android-test
LOCAL_JAVA_LIBRARIES := android.test.runner

LOCAL_PACKAGE_NAME := DownloadManagerTestApp
Expand Down
2 changes: 2 additions & 0 deletions core/tests/notificationtests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := NotificationStressTests

LOCAL_STATIC_JAVA_LIBRARIES := \
junit \
legacy-android-test \
ub-uiautomator

include $(BUILD_PACKAGE)
Expand Down
1 change: 1 addition & 0 deletions core/tests/utillib/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_MODULE := frameworks-core-util-lib
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

include $(BUILD_STATIC_JAVA_LIBRARY)

Expand Down
1 change: 1 addition & 0 deletions graphics/tests/graphicstests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := FrameworksGraphicsTests

include $(BUILD_PACKAGE)
Expand Down
1 change: 1 addition & 0 deletions keystore/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := platform

LOCAL_JAVA_LIBRARIES := android.test.runner bouncycastle conscrypt
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
Expand Down
1 change: 1 addition & 0 deletions media/mca/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
Expand Down
3 changes: 2 additions & 1 deletion media/tests/MediaFrameworkTest/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := \
mockito-target-minus-junit4 \
android-support-test \
android-ex-camera2
android-ex-camera2 \
legacy-android-test

LOCAL_PACKAGE_NAME := mediaframeworktest

Expand Down
2 changes: 2 additions & 0 deletions nfc-extras/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

LOCAL_MODULE:= com.android.nfc_extras

include $(BUILD_JAVA_LIBRARY)
2 changes: 1 addition & 1 deletion packages/CarrierDefaultApp/tests/unit/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LOCAL_CERTIFICATE := platform

LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common

LOCAL_STATIC_JAVA_LIBRARIES := android-support-test mockito-target-minus-junit4
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test mockito-target-minus-junit4 legacy-android-test

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
Expand Down
1 change: 1 addition & 0 deletions packages/MtpDocumentsProvider/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := MtpDocumentsProviderTests
LOCAL_INSTRUMENTATION_FOR := MtpDocumentsProvider
LOCAL_CERTIFICATE := media
Expand Down
1 change: 1 addition & 0 deletions packages/SettingsProvider/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) \
src/com/android/providers/settings/EventLogTags.logtags

LOCAL_JAVA_LIBRARIES := telephony-common ims-common
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

LOCAL_PACKAGE_NAME := SettingsProvider
LOCAL_CERTIFICATE := platform
Expand Down
4 changes: 2 additions & 2 deletions packages/SettingsProvider/test/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-subdir-java-files) \
../src/com/android/providers/settings/SettingsState.java

LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test legacy-android-test

LOCAL_PACKAGE_NAME := SettingsProviderTest

LOCAL_MODULE_TAGS := tests

LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)
include $(BUILD_PACKAGE)
2 changes: 2 additions & 0 deletions packages/Shell/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
mockito-target-minus-junit4 \
ub-uiautomator \
junit \
legacy-android-test \

LOCAL_PACKAGE_NAME := ShellTests
LOCAL_INSTRUMENTATION_FOR := Shell
Expand Down
3 changes: 2 additions & 1 deletion packages/SystemUI/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
mockito-updated-target-minus-junit4 \
SystemUI-proto \
SystemUI-tags
SystemUI-tags \
legacy-android-test

LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common android.car

Expand Down
1 change: 1 addition & 0 deletions packages/WAPPushManager/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests

LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
Expand Down
2 changes: 1 addition & 1 deletion packages/WallpaperCropper/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_JAVA_LIBRARIES := telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 junit

LOCAL_PACKAGE_NAME := WallpaperCropper
LOCAL_CERTIFICATE := platform
Expand Down
1 change: 1 addition & 0 deletions sax/tests/saxtests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := FrameworksSaxTests

include $(BUILD_PACKAGE)
Expand Down
2 changes: 1 addition & 1 deletion test-runner/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include $(CLEAR_VARS)

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

LOCAL_JAVA_LIBRARIES := core-oj core-libart junit framework
LOCAL_JAVA_LIBRARIES := core-oj core-libart framework legacy-test

LOCAL_MODULE:= android.test.runner

Expand Down
1 change: 1 addition & 0 deletions test-runner/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
Expand Down
2 changes: 1 addition & 1 deletion tests/AppLaunch/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LOCAL_PACKAGE_NAME := AppLaunch
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := android.test.runner

LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test legacy-android-test

include $(BUILD_PACKAGE)

Expand Down
1 change: 1 addition & 0 deletions tests/BrowserPowerTest/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
Expand Down
7 changes: 1 addition & 6 deletions tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ LOCAL_PACKAGE_NAME := SmartCamera-tests
LOCAL_SRC_FILES += $(call all-java-files-under, src)

LOCAL_JAVA_LIBRARIES := android.test.runner
#LOCAL_STATIC_JAVA_LIBRARIES := filterframework-test-lib
LOCAL_STATIC_JAVA_LIBRARIES += guava
LOCAL_STATIC_JAVA_LIBRARIES := guava junit legacy-android-test

#LOCAL_JAVA_LIBRARIES := filterframework-test-lib
LOCAL_STATIC_JAVA_LIBRARIES := guava

LOCAL_STATIC_JAVA_LIBRARIES +=
LOCAL_PROGUARD_ENABLED := disabled

LOCAL_INSTRUMENTATION_FOR := SmartCamera
Expand Down
1 change: 1 addition & 0 deletions tests/CanvasCompare/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ LOCAL_PACKAGE_NAME := CanvasCompare
LOCAL_MODULE_TAGS := tests

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

include $(BUILD_PACKAGE)
1 change: 1 addition & 0 deletions tests/Compatibility/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
# Include all test java files.
LOCAL_SRC_FILES := \
$(call all-java-files-under, src)
Expand Down
1 change: 1 addition & 0 deletions tests/CoreTests/android/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LOCAL_SRC_FILES := \
$(call all-subdir-java-files)

LOCAL_JAVA_LIBRARIES := android.test.runner bouncycastle conscrypt org.apache.http.legacy
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

LOCAL_PACKAGE_NAME := CoreTests

Expand Down
1 change: 1 addition & 0 deletions tests/DataIdleTest/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ LOCAL_MODULE_TAGS := tests

LOCAL_PACKAGE_NAME := DataIdleTest
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_SRC_FILES := $(call all-java-files-under, src)

# We need to sign it to get access to the network usage history.
Expand Down
1 change: 1 addition & 0 deletions tests/FrameworkPerf/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := FrameworkPerf

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

LOCAL_AAPT_FLAGS = -c 120dpi,240dpi,160dpi,161dpi,320dpi,nodpi

Expand Down
1 change: 1 addition & 0 deletions tests/HierarchyViewerTest/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := HierarchyViewerTest

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

include $(BUILD_PACKAGE)
1 change: 1 addition & 0 deletions tests/ImfTest/tests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

LOCAL_PACKAGE_NAME := ImfTestTests

Expand Down
3 changes: 2 additions & 1 deletion tests/MemoryUsage/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ LOCAL_PACKAGE_NAME := MemoryUsage

LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

include $(BUILD_PACKAGE)

# Use the following include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(call all-makefiles-under,$(LOCAL_PATH))
1 change: 1 addition & 0 deletions tests/NetworkSecurityConfigTest/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := platform

LOCAL_JAVA_LIBRARIES := android.test.runner bouncycastle conscrypt
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
Expand Down
2 changes: 1 addition & 1 deletion tests/SoundTriggerTests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ else
LOCAL_SRC_FILES := src/android/hardware/soundtrigger/SoundTriggerTest.java
endif

LOCAL_STATIC_JAVA_LIBRARIES := mockito-target
LOCAL_STATIC_JAVA_LIBRARIES := mockito-target legacy-android-test
LOCAL_JAVA_LIBRARIES := android.test.runner

LOCAL_PACKAGE_NAME := SoundTriggerTests
Expand Down
2 changes: 1 addition & 1 deletion tests/TtsTests/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LOCAL_MODULE_TAGS := tests

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_STATIC_JAVA_LIBRARIES := littlemock
LOCAL_STATIC_JAVA_LIBRARIES := littlemock junit legacy-android-test
LOCAL_JAVA_LIBRARIES := android.test.runner

LOCAL_PACKAGE_NAME := TtsTests
Expand Down
1 change: 1 addition & 0 deletions tests/permission/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := FrameworkPermissionTests

include $(BUILD_PACKAGE)
Expand Down
1 change: 1 addition & 0 deletions tests/utils/testutils/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under,java)

LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
legacy-android-test \
mockito-target-minus-junit4

LOCAL_JAVA_LIBRARIES := android.test.runner
Expand Down

0 comments on commit 8aeb59e

Please sign in to comment.