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<configuration description="Config for libnativeloader e2e test cases"> 17 <option name="test-suite-tag" value="libnativeloader_e2e_tests" /> 18 <option name="test-suite-tag" value="apct" /> 19 <option name="config-descriptor:metadata" key="mainline-param" value="com.google.android.art.apex" /> 20 <option name="config-descriptor:metadata" key="mainline-param" value="com.android.art.apex" /> 21 22 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" /> 23 24 <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> 25 <!-- We push all files in LibnativeloaderTest.java, but use this 26 preparer to make partitions writable. That since remounting may 27 require a device reboot, and then it's important that the 28 `setenforce 0` from DisableSELinuxTargetPreparer occurs after that. --> 29 <option name="remount-system" value="true" /> 30 <option name="remount-vendor" value="true" /> 31 </target_preparer> 32 33 <!-- Vendor native libraries aren't accessible by any apps by sepolicy 34 rules. For that they need to be labelled same_process_hal_file in a 35 vendor specific file_contexts file (see 36 https://source.android.com/docs/core/permissions/namespaces_libraries#adding-additional-native-libraries). 37 To avoid setting that up to test loading libvendor_private*.so, disable 38 sepolicy checks while running the tests. It's libnativeloader logic we 39 want to test here. --> 40 <target_preparer class="com.android.tradefed.targetprep.DisableSELinuxTargetPreparer"/> 41 42 <test class="com.android.tradefed.testtype.HostTest" > 43 <option name="jar" value="libnativeloader_e2e_tests.jar" /> 44 </test> 45 46 <!-- When this test is run in a Mainline context (e.g. with `mts-tradefed`), only enable it if 47 one of the Mainline modules below is present on the device used for testing. --> 48 <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController"> 49 <!-- ART Mainline Module (internal version). --> 50 <option name="mainline-module-package-name" value="com.google.android.art" /> 51 <!-- ART Mainline Module (external (AOSP) version). --> 52 <option name="mainline-module-package-name" value="com.android.art" /> 53 </object> 54 55 <!-- Only run tests if the device under test is SDK version 31 (Android 12) or above. --> 56 <object type="module_controller" class="com.android.tradefed.testtype.suite.module.Sdk31ModuleController" /> 57</configuration> 58