LOCAL_JAVA_LIBRARIES := \
junit \
- platform-robolectric-3.4.2-prebuilt
+ platform-robolectric-3.5.1-prebuilt
LOCAL_INSTRUMENTATION_FOR := SettingsLibShell
LOCAL_MODULE := SettingsLibRoboTests
LOCAL_ROBOTEST_TIMEOUT := 36000
-include prebuilts/misc/common/robolectric/3.4.2/run_robotests.mk
+include prebuilts/misc/common/robolectric/3.5.1/run_robotests.mk
final String resDir = appRoot + "/tests/robotests/res";
final String assetsDir = appRoot + config.assetDir();
- final AndroidManifest manifest = new AndroidManifest(Fs.fileFromPath(manifestPath),
- Fs.fileFromPath(resDir), Fs.fileFromPath(assetsDir)) {
+ return new AndroidManifest(Fs.fileFromPath(manifestPath), Fs.fileFromPath(resDir),
+ Fs.fileFromPath(assetsDir), "com.android.settingslib") {
@Override
public List<ResourcePath> getIncludedResourcePaths() {
List<ResourcePath> paths = super.getIncludedResourcePaths();
- SettingsLibRobolectricTestRunner.getIncludedResourcePaths(getPackageName(), paths);
+ paths.add(new ResourcePath(
+ null,
+ Fs.fileFromPath("./frameworks/base/packages/SettingsLib/res"),
+ null));
+ paths.add(new ResourcePath(
+ null,
+ Fs.fileFromPath("./frameworks/base/core/res/res"),
+ null));
+ paths.add(new ResourcePath(
+ null,
+ Fs.fileFromPath("./frameworks/support/v7/appcompat/res"),
+ null));
return paths;
}
};
- manifest.setPackageName("com.android.settingslib");
- return manifest;
}
-
- static void getIncludedResourcePaths(String packageName, List<ResourcePath> paths) {
- paths.add(new ResourcePath(
- null,
- Fs.fileFromPath("./frameworks/base/packages/SettingsLib/res"),
- null));
- paths.add(new ResourcePath(
- null,
- Fs.fileFromPath("./frameworks/base/core/res/res"),
- null));
- paths.add(new ResourcePath(
- null,
- Fs.fileFromPath("./frameworks/support/v7/appcompat/res"),
- null));
- }
-
}