1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2021 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
17<configuration description="Config for apkdmverity tests">
18  <!--
19    Creating and configuring the loop devices and the device-mapper devices require root privilege.
20  -->
21  <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
22
23  <!--
24    We need to disable selinux because kernel (which is implementing the loop device) doesn't have
25    the privilege to read files on /data. Otherwise, we hit the following errors:
26
27    avc: denied { read } for comm="loop32"
28    path="/data/local/tmp/.tmp.ptPChH/test.apk.idsig" dev="dm-8" ino=2939
29    scontext=u:r:kernel:s0 tcontext=u:object_r:shell_data_file:s0
30    tclass=file
31  -->
32  <target_preparer class="com.android.tradefed.targetprep.DisableSELinuxTargetPreparer"/>
33
34  <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
35    <option name="push-file" key="apkdmverity.test" value="/data/local/tmp/apkdmverity.test" />
36  </target_preparer>
37
38  <test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
39    <option name="test-device-path" value="/data/local/tmp" />
40    <option name="module-name" value="apkdmverity.test" />
41  </test>
42</configuration>
43