summaryrefslogtreecommitdiffstats
path: root/tests/backup
diff options
context:
space:
mode:
authorOmari Stephens <xsdg@android.com>2009-12-02 17:39:27 -0800
committerOmari Stephens <xsdg@android.com>2009-12-02 17:39:27 -0800
commitaa6e73a6c850694550b59a0911727dcb23c4837d (patch)
tree92b29b4b9f7da80f6baf509ee1d4626f75498acb /tests/backup
parent533a2803506cc4f196403fdfafd948bd4f8e60d9 (diff)
downloadframeworks_base-aa6e73a6c850694550b59a0911727dcb23c4837d.zip
frameworks_base-aa6e73a6c850694550b59a0911727dcb23c4837d.tar.gz
frameworks_base-aa6e73a6c850694550b59a0911727dcb23c4837d.tar.bz2
Revive backup tests
Diffstat (limited to 'tests/backup')
-rwxr-xr-xtests/backup/test_backup.sh8
-rwxr-xr-xtests/backup/test_restore.sh2
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/backup/test_backup.sh b/tests/backup/test_backup.sh
index 10b809d..113a26d 100755
--- a/tests/backup/test_backup.sh
+++ b/tests/backup/test_backup.sh
@@ -18,10 +18,12 @@
#export DRY_RUN="echo"
source test_backup_common.sh
-# wipe prior backup data for packages
+# figure out what packages are participating in backup
b_pkgs=$(a shell dumpsys backup | \
- ruby -ne 'print($1+" ") if $_ =~ /^\s*ApplicationInfo\S+ (.+?)\}/')
+ ruby -e 'p_stanza = STDIN.read.match(/Participants:.*?(?=Ever)/m)[0]
+ puts p_stanza.scan(/^ (.+?)\s*$/).flatten.join(" ")')
+# wipe data for the package participating in backup
for pkg in $b_pkgs; do
a shell bmgr wipe "$pkg"
done
@@ -36,7 +38,7 @@ adb_root
set -x
# set the transport
-a shell bmgr transport com.google.android.backup/.BackupTransportService
+#a shell bmgr transport com.google.android.backup/.BackupTransportService
# load up the three files
a shell \
diff --git a/tests/backup/test_restore.sh b/tests/backup/test_restore.sh
index 46b46e4..48e5c66 100755
--- a/tests/backup/test_restore.sh
+++ b/tests/backup/test_restore.sh
@@ -45,7 +45,7 @@ function check_exists
fi
}
-# run adb as root so we can poke at com.android.backuptest's data
+# Make sure adb is root so we can poke at com.android.backuptest's data
adb_root
# delete the old data