summaryrefslogtreecommitdiff
path: root/services/robotests/backup
diff options
context:
space:
mode:
author Rex Hoffman <rexhoffman@google.com> 2023-12-22 06:40:52 +0000
committer Rex Hoffman <rexhoffman@google.com> 2024-01-05 13:03:46 +0000
commita1acb7d2a5b67a0b4f485118a5ef6f4e65da3f53 (patch)
treeb5de02726384d8c0f860ddfa438a0a07222039da /services/robotests/backup
parenta9ede36fac28b8215f02d2ab38162d06bcadbc6b (diff)
Uptesting is moving folks to /external/robolectric from /external/robolectric-shadows
We maintain /external/robolectric (keep it in sync with github/google3) and are getting ready to delete /external/robolectric-shadows Bug: 314757990 Test: atest same failing tests before and after in services/robotests. Flag: NA Change-Id: Ie3d2e902ffcba6b9d159b78592f7d6ce31288a2f
Diffstat (limited to 'services/robotests/backup')
-rw-r--r--services/robotests/backup/Android.bp4
-rw-r--r--services/robotests/backup/config/robolectric.properties4
-rw-r--r--services/robotests/backup/src/com/android/server/backup/fullbackup/AppMetadataBackupWriterTest.java1
-rw-r--r--services/robotests/backup/src/com/android/server/backup/fullbackup/ShadowSigningInfo.java27
4 files changed, 35 insertions, 1 deletions
diff --git a/services/robotests/backup/Android.bp b/services/robotests/backup/Android.bp
index 66ee696250c9..fba2cad90f00 100644
--- a/services/robotests/backup/Android.bp
+++ b/services/robotests/backup/Android.bp
@@ -56,6 +56,8 @@ android_robolectric_test {
// Include the testing libraries
libs: [
"mockito-robolectric-prebuilt",
+ "Settings-robo-testutils",
+ "SettingsLib-robo-testutils",
"platform-test-annotations",
"testng",
"truth",
@@ -63,4 +65,6 @@ android_robolectric_test {
instrumentation_for: "BackupFrameworksServicesLib",
+ upstream: true,
+
}
diff --git a/services/robotests/backup/config/robolectric.properties b/services/robotests/backup/config/robolectric.properties
index 850557a9b693..1ebf6d423fe2 100644
--- a/services/robotests/backup/config/robolectric.properties
+++ b/services/robotests/backup/config/robolectric.properties
@@ -1 +1,3 @@
-sdk=NEWEST_SDK \ No newline at end of file
+sdk=NEWEST_SDK
+looperMode=LEGACY
+shadows=com.android.server.testing.shadows.FrameworkShadowLooper
diff --git a/services/robotests/backup/src/com/android/server/backup/fullbackup/AppMetadataBackupWriterTest.java b/services/robotests/backup/src/com/android/server/backup/fullbackup/AppMetadataBackupWriterTest.java
index ee5a534fe005..6839a06a0d9a 100644
--- a/services/robotests/backup/src/com/android/server/backup/fullbackup/AppMetadataBackupWriterTest.java
+++ b/services/robotests/backup/src/com/android/server/backup/fullbackup/AppMetadataBackupWriterTest.java
@@ -57,6 +57,7 @@ import java.nio.file.attribute.FileTime;
ShadowBackupDataOutput.class,
ShadowEnvironment.class,
ShadowFullBackup.class,
+ ShadowSigningInfo.class,
})
public class AppMetadataBackupWriterTest {
private static final String TEST_PACKAGE = "com.test.package";
diff --git a/services/robotests/backup/src/com/android/server/backup/fullbackup/ShadowSigningInfo.java b/services/robotests/backup/src/com/android/server/backup/fullbackup/ShadowSigningInfo.java
new file mode 100644
index 000000000000..53d807c2d3c9
--- /dev/null
+++ b/services/robotests/backup/src/com/android/server/backup/fullbackup/ShadowSigningInfo.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.backup.fullbackup;
+
+import static android.os.Build.VERSION_CODES.P;
+
+import android.content.pm.SigningInfo;
+
+import org.robolectric.annotation.Implements;
+
+@Implements(value = SigningInfo.class, minSdk = P)
+public class ShadowSigningInfo {
+}