1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2016 The Android Open Source Project 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 6 ~ you may not use this file except in compliance with the License. 7 ~ You may obtain a copy of the License at 8 ~ 9 ~ http://www.apache.org/licenses/LICENSE-2.0 10 ~ 11 ~ Unless required by applicable law or agreed to in writing, software 12 ~ distributed under the License is distributed on an "AS IS" BASIS, 13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ~ See the License for the specific language governing permissions and 15 ~ limitations under the License 16 --> 17<configuration description="Config for CTS Backup test cases"> 18 <option name="test-suite-tag" value="cts" /> 19 <option name="config-descriptor:metadata" key="component" value="backup" /> 20 <!-- Backup of instant apps is not supported. --> 21 <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" /> 22 <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" /> 23 <!-- Run module in system user because backup tests are not fully supported in secondary user. 24 For devices running on secondary user, such as automotive devices, these tests will fail. 25 When backup tests are fully functional for secondary users: 26 -change not_secondary_user to secondary_user. 27 -remove SwitchUserTargetPreparer 28 --> 29 <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" /> 30 <target_preparer class="com.android.tradefed.targetprep.SwitchUserTargetPreparer"> 31 <option name="user-type" value="system" /> 32 </target_preparer> 33 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 34 <option name="cleanup-apks" value="true" /> 35 <option name="test-file-name" value="CtsFullBackupApp.apk" /> 36 <option name="test-file-name" value="CtsKeyValueBackupApp.apk" /> 37 <option name="test-file-name" value="CtsBackupTestCases.apk" /> 38 <option name="test-file-name" value="CtsPermissionBackupApp.apk" /> 39 <option name="test-file-name" value="CtsPermissionBackupApp22.apk" /> 40 </target_preparer> 41 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 42 <option name="run-command" value="mkdir -p /data/local/tmp/cts/backup" /> 43 <option name="teardown-command" value="rm -rf /data/local/tmp/cts"/> 44 </target_preparer> 45 <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> 46 <!-- Also copy the test apks to the device --> 47 <option name="cleanup" value="true" /> 48 <option name="push" value="CtsPermissionBackupApp.apk->/data/local/tmp/cts/backup/CtsPermissionBackupApp.apk" /> 49 <option name="push" value="CtsPermissionBackupApp22.apk->/data/local/tmp/cts/backup/CtsPermissionBackupApp22.apk" /> 50 </target_preparer> 51 <target_preparer class="android.cts.backup.BackupPreparer"> 52 <option name="enable-backup-if-needed" value="true" /> 53 <option name="select-local-transport" value="true" /> 54 </target_preparer> 55 <test class="com.android.tradefed.testtype.AndroidJUnitTest" > 56 <option name="package" value="android.backup.cts" /> 57 <option name="runtime-hint" value="8m20s" /> 58 </test> 59</configuration> 60