blob: 6f65f4e6232242d256317f2447f95009be5ec388 [file] [log] [blame]
Andreas Gampe35e80932018-10-29 12:56:53 -07001<?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-->
Nikita Ioffead94bcc2020-04-24 15:22:41 +010016<configuration description="Runs ApexTestCases">
Andreas Gampe35e80932018-10-29 12:56:53 -070017 <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" />
Andreas Gampe66f4fb92019-02-25 13:18:09 -080021 <!-- 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. -->
Nikita Ioffead94bcc2020-04-24 15:22:41 +010023 <option name="push" value="ApexTestCases->/data/local/tmp/ApexTestCases" />
Andreas Gampe35e80932018-10-29 12:56:53 -070024 </target_preparer>
25
Andreas Gampe0cfa2972019-01-17 15:07:41 -080026 <!-- 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). -->
Andreas Gampee3f215e2018-11-28 13:37:41 -080029 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
Andreas Gampe5f7298b2018-11-12 11:58:49 -080030
Nikita Ioffea26ac422020-04-24 18:05:44 +010031 <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 <option name="push" value="apex.apexd_test_postinstall.apex->/system_ext/apex/apex.apexd_test_postinstall.apex" />
37 <option name="push" value="apex.apexd_test_preinstall.apex->/system_ext/apex/apex.apexd_test_preinstall.apex" />
38 </target_preparer>
Nikita Ioffe4d1b6ab2020-05-18 16:11:26 +010039
40 <!-- system_server might still hold a reference to apexservice. This means that apexd is still
41 running, and test apexes pushed in the PushFilePreparer above are not yet scanned.
42 One way to solve this is to reboot a device, but that would significantly increase
43 execution of this test module. Instead, force a GC in system_server by sending kill -10. -->
44 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
45 <option name="run-command" value="shell kill -10 $(pidof system_server)" />
46 <option name="teardown-command" value="shell kill -10 $(pidof system_server)" />
47 </target_preparer>
48
Andreas Gampe35e80932018-10-29 12:56:53 -070049 <test class="com.android.tradefed.testtype.GTest" >
Andreas Gampe66f4fb92019-02-25 13:18:09 -080050 <!-- Note: despite how these lines read, the test will run nicely separated out
51 of a subfolder. -->
52 <option name="native-test-device-path" value="/data/local/tmp" />
Nikita Ioffead94bcc2020-04-24 15:22:41 +010053 <option name="module-name" value="ApexTestCases" />
Andreas Gampe35e80932018-10-29 12:56:53 -070054 </test>
55</configuration>