Merge "Convert Settings to Android.bp" into qt-dev-plus-aosp
This commit is contained in:
77
tests/robotests/Android.bp
Normal file
77
tests/robotests/Android.bp
Normal file
@@ -0,0 +1,77 @@
|
||||
//############################################################
|
||||
// Build SettingsRoboTestStub.apk which includes test-only resources.#
|
||||
//############################################################
|
||||
|
||||
android_app {
|
||||
name: "SettingsRoboTestStub",
|
||||
defaults: [
|
||||
"SettingsLibDefaults",
|
||||
"SettingsLib-search-defaults",
|
||||
],
|
||||
platform_apis: true,
|
||||
certificate: "platform",
|
||||
privileged: true,
|
||||
|
||||
resource_dirs: ["res"],
|
||||
|
||||
static_libs: [
|
||||
"Settings-core",
|
||||
"androidx-constraintlayout_constraintlayout",
|
||||
"androidx.slice_slice-builders",
|
||||
"androidx.slice_slice-core",
|
||||
"androidx.slice_slice-view",
|
||||
"androidx.core_core",
|
||||
"androidx.appcompat_appcompat",
|
||||
"androidx.cardview_cardview",
|
||||
"androidx.preference_preference",
|
||||
"androidx.recyclerview_recyclerview",
|
||||
"com.google.android.material_material",
|
||||
"setupcompat",
|
||||
"setupdesign",
|
||||
"androidx-constraintlayout_constraintlayout-solver",
|
||||
"androidx.lifecycle_lifecycle-runtime",
|
||||
"androidx.lifecycle_lifecycle-extensions",
|
||||
"guava",
|
||||
"jsr305",
|
||||
"settings-contextual-card-protos-lite",
|
||||
"settings-log-bridge-protos-lite",
|
||||
"contextualcards",
|
||||
"settings-logtags",
|
||||
"zxing-core-1.7",
|
||||
],
|
||||
|
||||
aaptflags: ["--extra-packages com.android.settings"],
|
||||
|
||||
libs: [
|
||||
"telephony-common",
|
||||
"ims-common",
|
||||
],
|
||||
}
|
||||
|
||||
//############################################################
|
||||
// Settings Robolectric test target. #
|
||||
//############################################################
|
||||
android_robolectric_test {
|
||||
name: "SettingsRoboTests",
|
||||
srcs: [
|
||||
"src/**/*.java",
|
||||
],
|
||||
|
||||
static_libs: [
|
||||
"SettingsLib-robo-testutils",
|
||||
],
|
||||
|
||||
java_resource_dirs: ["config"],
|
||||
|
||||
instrumentation_for: "SettingsRoboTestStub",
|
||||
|
||||
test_options: {
|
||||
timeout: "36000",
|
||||
},
|
||||
|
||||
coverage_libs: [
|
||||
"Settings-core",
|
||||
"SettingsLib",
|
||||
"SettingsLib-search",
|
||||
],
|
||||
}
|
@@ -1,111 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
SETTINGS_AOSP_PATH := packages/apps/Settings
|
||||
|
||||
#############################################################
|
||||
# Build SettingsRoboTestStub.apk which includes test-only resources.#
|
||||
#############################################################
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_PACKAGE_NAME := SettingsRoboTestStub
|
||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
||||
LOCAL_CERTIFICATE := platform
|
||||
LOCAL_PRIVILEGED_MODULE := true
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_USE_AAPT2 := true
|
||||
|
||||
RELATIVE_SETTINGS_AOSP_PATH := ../../../../../$(SETTINGS_AOSP_PATH)
|
||||
|
||||
LOCAL_MANIFEST_FILE := $(RELATIVE_SETTINGS_AOSP_PATH)/AndroidManifest.xml
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, $(RELATIVE_SETTINGS_AOSP_PATH)/src)
|
||||
|
||||
LOCAL_RESOURCE_DIR += \
|
||||
$(LOCAL_PATH)/res \
|
||||
$(SETTINGS_AOSP_PATH)/res
|
||||
|
||||
LOCAL_STATIC_ANDROID_LIBRARIES := \
|
||||
androidx-constraintlayout_constraintlayout \
|
||||
androidx.slice_slice-builders \
|
||||
androidx.slice_slice-core \
|
||||
androidx.slice_slice-view \
|
||||
androidx.core_core \
|
||||
androidx.appcompat_appcompat \
|
||||
androidx.cardview_cardview \
|
||||
androidx.preference_preference \
|
||||
androidx.recyclerview_recyclerview \
|
||||
com.google.android.material_material \
|
||||
setupcompat \
|
||||
setupdesign
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := \
|
||||
telephony-common \
|
||||
ims-common
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
||||
androidx-constraintlayout_constraintlayout-solver \
|
||||
androidx.lifecycle_lifecycle-runtime \
|
||||
androidx.lifecycle_lifecycle-extensions \
|
||||
guava \
|
||||
jsr305 \
|
||||
settings-contextual-card-protos-lite \
|
||||
settings-log-bridge-protos-lite \
|
||||
contextualcards \
|
||||
settings-logtags \
|
||||
zxing-core-1.7
|
||||
|
||||
include frameworks/base/packages/SettingsLib/common.mk
|
||||
include frameworks/base/packages/SettingsLib/search/common.mk
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
#############################################################
|
||||
# Settings Robolectric test target. #
|
||||
#############################################################
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := SettingsRoboTests
|
||||
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
|
||||
$(call all-java-files-under, ../../../../../frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/testutils)
|
||||
|
||||
LOCAL_JAVA_RESOURCE_DIRS := config
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := \
|
||||
robolectric_android-all-stub \
|
||||
Robolectric_all-target \
|
||||
mockito-robolectric-prebuilt \
|
||||
truth-prebuilt
|
||||
|
||||
LOCAL_INSTRUMENTATION_FOR := SettingsRoboTestStub
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
# Generate test_config.properties
|
||||
include external/robolectric-shadows/gen_test_config.mk
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
|
||||
#############################################################
|
||||
# Settings runner target to run the previous target. #
|
||||
#############################################################
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := RunSettingsRoboTests
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := \
|
||||
SettingsRoboTests \
|
||||
robolectric_android-all-stub \
|
||||
Robolectric_all-target \
|
||||
mockito-robolectric-prebuilt \
|
||||
truth-prebuilt
|
||||
|
||||
LOCAL_TEST_PACKAGE := SettingsRoboTestStub
|
||||
|
||||
LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src \
|
||||
frameworks/base/packages/SettingsLib/search/src \
|
||||
|
||||
LOCAL_ROBOTEST_TIMEOUT := 36000
|
||||
|
||||
include external/robolectric-shadows/run_robotests.mk
|
8
tests/robotests/AndroidManifest.xml
Normal file
8
tests/robotests/AndroidManifest.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||
coreApp="true"
|
||||
package="com.android.settings">
|
||||
|
||||
<application/>
|
||||
|
||||
</manifest>
|
Reference in New Issue
Block a user