blob: 3337436769f57f8154bc095667be0c22a57a25fb [file]
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2025 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.
-->
<configuration description="Config for AiSeal tests">
<option name="test-suite-tag" value="apct" />
<option name="config-descriptor:metadata" key="component" value="framework" />
<!-- Only system apps can access AiSeal APIs, no instant apps -->
<option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
<!-- Tests would have native code, so test on multiple ABIs -->
<option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
<!-- AiSeal API is available only for system user -->
<option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" />
<!-- Skip tests if device does not have the AiSeal feature -->
<object type="module_controller"
class="com.android.tradefed.testtype.suite.module.DeviceFeatureModuleController">
<option name="required-feature" value="android.software.aiseal" />
</object>
<!-- Test requires root to change AiSeal configuration. -->
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
<option name="force-root" value="true"/>
</target_preparer>
<!-- Install platform-signed test apps. -->
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="cleanup-apks" value="true" />
<option name="test-file-name" value="AiSealTestCases.apk" />
<option name="test-file-name" value="AiSealTestTenantConfig.apk" />
<option name="test-file-name" value="AiSealTestHelperAppOdim.apk" />
</target_preparer>
<!-- Reboot the system after test to restore system properties. -->
<target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer">
<option name="pre-reboot" value="false" />
<option name="post-reboot" value="true" />
</target_preparer>
<!-- Push AiSeal configuration. -->
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="abort-on-push-failure" value="true" />
<option name="push-file" key="aiseal-test.prop" value="/data/local.prop" />
<option name="cleanup" value="true" />
</target_preparer>
<!-- Set proper permissions for the AiSeal configuration. -->
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<option name="run-command" value="chmod 644 /data/local.prop" />
</target_preparer>
<!-- Reboot the system to apply changes to the system files. -->
<target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" />
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="android.aiseal.tests" />
</test>
</configuration>