Andreas Gampe | 35e8093 | 2018-10-29 12:56:53 -0700 | [diff] [blame] | 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 | --> |
Nikita Ioffe | ad94bcc | 2020-04-24 15:22:41 +0100 | [diff] [blame] | 16 | <configuration description="Runs ApexTestCases"> |
Andreas Gampe | 35e8093 | 2018-10-29 12:56:53 -0700 | [diff] [blame] | 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" /> |
Andreas Gampe | 66f4fb9 | 2019-02-25 13:18:09 -0800 | [diff] [blame] | 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. --> |
Nikita Ioffe | ad94bcc | 2020-04-24 15:22:41 +0100 | [diff] [blame] | 23 | <option name="push" value="ApexTestCases->/data/local/tmp/ApexTestCases" /> |
Andreas Gampe | 35e8093 | 2018-10-29 12:56:53 -0700 | [diff] [blame] | 24 | </target_preparer> |
| 25 | |
Andreas Gampe | 0cfa297 | 2019-01-17 15:07:41 -0800 | [diff] [blame] | 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). --> |
Andreas Gampe | e3f215e | 2018-11-28 13:37:41 -0800 | [diff] [blame] | 29 | <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" /> |
Andreas Gampe | 5f7298b | 2018-11-12 11:58:49 -0800 | [diff] [blame] | 30 | |
Nikita Ioffe | a26ac42 | 2020-04-24 18:05:44 +0100 | [diff] [blame] | 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 | <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 Ioffe | 4d1b6ab | 2020-05-18 16:11:26 +0100 | [diff] [blame] | 39 | |
| 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 Gampe | 35e8093 | 2018-10-29 12:56:53 -0700 | [diff] [blame] | 49 | <test class="com.android.tradefed.testtype.GTest" > |
Andreas Gampe | 66f4fb9 | 2019-02-25 13:18:09 -0800 | [diff] [blame] | 50 | <!-- 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 Ioffe | ad94bcc | 2020-04-24 15:22:41 +0100 | [diff] [blame] | 53 | <option name="module-name" value="ApexTestCases" /> |
Andreas Gampe | 35e8093 | 2018-10-29 12:56:53 -0700 | [diff] [blame] | 54 | </test> |
| 55 | </configuration> |