1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2015 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<configuration description="Config for the CTS device admin tests"> 17 <option name="test-suite-tag" value="cts" /> 18 <option name="config-descriptor:metadata" key="component" value="framework" /> 19 <!-- Instant apps can never be device admin / profile owner / device owner so positive tests 20 here are not applicable --> 21 <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" /> 22 <!-- Not testing features backed by native code, so only need to run against one ABI --> 23 <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" /> 24 <!-- Uses SwitchUserTargetPreparer to switch to system so running secondary is not relevant --> 25 <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" /> 26 27 <target_preparer class="com.android.tradefed.targetprep.SwitchUserTargetPreparer"> 28 <option name="user-type" value="system" /> 29 </target_preparer> 30 31 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 32 <option name="cleanup-apks" value="true" /> 33 <option name="install-arg" value="-t" /> 34 <option name="test-file-name" value="CtsAdminApp.apk" /> 35 <option name="test-file-name" value="CtsAdminTestCases.apk" /> 36 </target_preparer> 37 38 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 39 <option name="run-command" value="dpm set-active-admin --user cur android.admin.app/.CtsDeviceAdminReceiver" /> 40 <option name="run-command" value="dpm set-active-admin --user cur android.admin.app/.CtsDeviceAdminReceiver2" /> 41 <option name="run-command" value="dpm set-active-admin --user cur android.admin.app/.CtsDeviceAdminReceiver3" /> 42 <option name="run-command" value="dpm set-profile-owner --user cur android.admin.app/.CtsDeviceAdminProfileOwner" /> 43 <option name="teardown-command" value="dpm remove-active-admin --user cur android.admin.app/.CtsDeviceAdminProfileOwner" /> 44 <option name="teardown-command" value="dpm remove-active-admin --user cur android.admin.app/.CtsDeviceAdminReceiver" /> 45 <option name="teardown-command" value="dpm remove-active-admin --user cur android.admin.app/.CtsDeviceAdminReceiver2" /> 46 <option name="teardown-command" value="dpm remove-active-admin --user cur android.admin.app/.CtsDeviceAdminReceiver3" /> 47 </target_preparer> 48 49 <test class="com.android.tradefed.testtype.AndroidJUnitTest" > 50 <option name="package" value="android.admin.cts" /> 51 <option name="runtime-hint" value="17m" /> 52 </test> 53 54</configuration> 55