1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2018 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="Runs ApexServiceTestCases"> 17 <option name="test-suite-tag" value="apct" /> 18 <option name="test-suite-tag" value="apct-native" /> 19 <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> 20 <option name="cleanup" value="true" /> 21 <!-- Note: despite how this line reads, it will push the complete testcase directory, thus 22 all apexes that are required by the blueprint's data[] tag. --> 23 <option name="push" value="ApexServiceTestCases->/data/local/tmp/ApexServiceTestCases" /> 24 </target_preparer> 25 26 <!-- The test runs as root to prepare the temporary directory, make selinux adjustments 27 and so on to provide files that apexd can consume. This is done to avoid dependencies 28 on higher levels (e.g., PackageInstaller). --> 29 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" /> 30 31 <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> 32 <option name="cleanup" value="true" /> 33 <option name="remount-system" value="true" /> 34 <option name="push" value="apex.apexd_test.apex->/system_ext/apex/apex.apexd_test.apex" /> 35 <option name="push" value="apex.apexd_test_different_app.apex->/system_ext/apex/apex.apexd_test_different_app.apex" /> 36 </target_preparer> 37 38 <!-- system_server might still hold a reference to apexservice. This means that apexd is still 39 running, and test apexes pushed in the PushFilePreparer above are not yet scanned. 40 One way to solve this is to reboot a device, but that would significantly increase 41 execution of this test module. Instead, force a GC in system_server by sending kill -10. --> 42 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 43 <option name="run-command" value="shell kill -10 $(pidof system_server)" /> 44 <option name="teardown-command" value="shell kill -10 $(pidof system_server)" /> 45 </target_preparer> 46 47 <test class="com.android.tradefed.testtype.GTest" > 48 <!-- Note: despite how these lines read, the test will run nicely separated out 49 of a subfolder. --> 50 <option name="native-test-device-path" value="/data/local/tmp" /> 51 <option name="module-name" value="ApexServiceTestCases" /> 52 </test> 53</configuration> 54