xref: /aosp_15_r20/art/libnativeloader/test/libnativeloader_e2e_tests.xml (revision 795d594fd825385562da6b089ea9b2033f3abf5a)
1*795d594fSAndroid Build Coastguard Worker<?xml version="1.0" encoding="utf-8"?>
2*795d594fSAndroid Build Coastguard Worker<!-- Copyright (C) 2021 The Android Open Source Project
3*795d594fSAndroid Build Coastguard Worker
4*795d594fSAndroid Build Coastguard Worker    Licensed under the Apache License, Version 2.0 (the "License");
5*795d594fSAndroid Build Coastguard Worker    you may not use this file except in compliance with the License.
6*795d594fSAndroid Build Coastguard Worker    You may obtain a copy of the License at
7*795d594fSAndroid Build Coastguard Worker
8*795d594fSAndroid Build Coastguard Worker        http://www.apache.org/licenses/LICENSE-2.0
9*795d594fSAndroid Build Coastguard Worker
10*795d594fSAndroid Build Coastguard Worker    Unless required by applicable law or agreed to in writing, software
11*795d594fSAndroid Build Coastguard Worker    distributed under the License is distributed on an "AS IS" BASIS,
12*795d594fSAndroid Build Coastguard Worker    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*795d594fSAndroid Build Coastguard Worker    See the License for the specific language governing permissions and
14*795d594fSAndroid Build Coastguard Worker    limitations under the License.
15*795d594fSAndroid Build Coastguard Worker-->
16*795d594fSAndroid Build Coastguard Worker<configuration description="Config for libnativeloader e2e test cases">
17*795d594fSAndroid Build Coastguard Worker    <option name="test-suite-tag" value="libnativeloader_e2e_tests" />
18*795d594fSAndroid Build Coastguard Worker    <option name="test-suite-tag" value="apct" />
19*795d594fSAndroid Build Coastguard Worker    <option name="config-descriptor:metadata" key="mainline-param" value="com.google.android.art.apex" />
20*795d594fSAndroid Build Coastguard Worker    <option name="config-descriptor:metadata" key="mainline-param" value="com.android.art.apex" />
21*795d594fSAndroid Build Coastguard Worker
22*795d594fSAndroid Build Coastguard Worker    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
23*795d594fSAndroid Build Coastguard Worker
24*795d594fSAndroid Build Coastguard Worker    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
25*795d594fSAndroid Build Coastguard Worker        <!-- We push all files in LibnativeloaderTest.java, but use this
26*795d594fSAndroid Build Coastguard Worker             preparer to make partitions writable. That since remounting may
27*795d594fSAndroid Build Coastguard Worker             require a device reboot, and then it's important that the
28*795d594fSAndroid Build Coastguard Worker             `setenforce 0` from DisableSELinuxTargetPreparer occurs after that. -->
29*795d594fSAndroid Build Coastguard Worker        <option name="remount-system" value="true" />
30*795d594fSAndroid Build Coastguard Worker        <option name="remount-vendor" value="true" />
31*795d594fSAndroid Build Coastguard Worker    </target_preparer>
32*795d594fSAndroid Build Coastguard Worker
33*795d594fSAndroid Build Coastguard Worker    <!-- Vendor native libraries aren't accessible by any apps by sepolicy
34*795d594fSAndroid Build Coastguard Worker         rules. For that they need to be labelled same_process_hal_file in a
35*795d594fSAndroid Build Coastguard Worker         vendor specific file_contexts file (see
36*795d594fSAndroid Build Coastguard Worker         https://source.android.com/docs/core/permissions/namespaces_libraries#adding-additional-native-libraries).
37*795d594fSAndroid Build Coastguard Worker         To avoid setting that up to test loading libvendor_private*.so, disable
38*795d594fSAndroid Build Coastguard Worker         sepolicy checks while running the tests. It's libnativeloader logic we
39*795d594fSAndroid Build Coastguard Worker         want to test here. -->
40*795d594fSAndroid Build Coastguard Worker    <target_preparer class="com.android.tradefed.targetprep.DisableSELinuxTargetPreparer"/>
41*795d594fSAndroid Build Coastguard Worker
42*795d594fSAndroid Build Coastguard Worker    <test class="com.android.tradefed.testtype.HostTest" >
43*795d594fSAndroid Build Coastguard Worker        <option name="jar" value="libnativeloader_e2e_tests.jar" />
44*795d594fSAndroid Build Coastguard Worker    </test>
45*795d594fSAndroid Build Coastguard Worker
46*795d594fSAndroid Build Coastguard Worker    <!-- When this test is run in a Mainline context (e.g. with `mts-tradefed`), only enable it if
47*795d594fSAndroid Build Coastguard Worker         one of the Mainline modules below is present on the device used for testing. -->
48*795d594fSAndroid Build Coastguard Worker    <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
49*795d594fSAndroid Build Coastguard Worker        <!-- ART Mainline Module (internal version). -->
50*795d594fSAndroid Build Coastguard Worker        <option name="mainline-module-package-name" value="com.google.android.art" />
51*795d594fSAndroid Build Coastguard Worker        <!-- ART Mainline Module (external (AOSP) version). -->
52*795d594fSAndroid Build Coastguard Worker        <option name="mainline-module-package-name" value="com.android.art" />
53*795d594fSAndroid Build Coastguard Worker    </object>
54*795d594fSAndroid Build Coastguard Worker
55*795d594fSAndroid Build Coastguard Worker    <!-- Only run tests if the device under test is SDK version 31 (Android 12) or above. -->
56*795d594fSAndroid Build Coastguard Worker    <object type="module_controller" class="com.android.tradefed.testtype.suite.module.Sdk31ModuleController" />
57*795d594fSAndroid Build Coastguard Worker</configuration>
58