David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- Copyright (C) 2020 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 | |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 17 | <configuration description="Config for Virtualization tests"> |
Jiyong Park | 360d8a7 | 2021-06-08 13:19:20 +0900 | [diff] [blame^] | 18 | <!-- virtualizationservice doesn't have access to shell_data_file. Instead of giving it |
| 19 | a test-only permission, run it without selinux --> |
| 20 | <target_preparer class="com.android.tradefed.targetprep.DisableSELinuxTargetPreparer"/> |
David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 21 | |
| 22 | <!-- Basic checks that the device has all the prerequisites. --> |
| 23 | <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
| 24 | <option name="throw-if-cmd-fail" value="true" /> |
| 25 | <!-- Kernel has KVM enabled. --> |
| 26 | <option name="run-command" value="ls /dev/kvm" /> |
| 27 | <!-- Kernel has vhost-vsock enabled. --> |
| 28 | <option name="run-command" value="ls /dev/vhost-vsock" /> |
| 29 | <!-- CrosVM is installed. --> |
Andrew Walbran | 3049fdf | 2020-12-23 12:46:30 +0000 | [diff] [blame] | 30 | <option name="run-command" value="ls /apex/com.android.virt/bin/crosvm" /> |
Andrew Walbran | f6bf686 | 2021-05-21 12:41:13 +0000 | [diff] [blame] | 31 | <!-- VirtualizationService is installed. --> |
| 32 | <option name="run-command" value="ls /apex/com.android.virt/bin/virtualizationservice" /> |
David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 33 | </target_preparer> |
| 34 | |
| 35 | <!-- Push test binaries to the device. --> |
| 36 | <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> |
| 37 | <option name="cleanup" value="true" /> |
| 38 | <option name="abort-on-push-failure" value="true" /> |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 39 | <option name="push-file" key="VirtualizationTestCases" value="/data/local/tmp/virt-test/VirtualizationTestCases" /> |
| 40 | <option name="push-file" key="virt_test_kernel" value="/data/local/tmp/virt-test/kernel" /> |
| 41 | <option name="push-file" key="virt_test_initramfs.img" value="/data/local/tmp/virt-test/initramfs" /> |
David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 42 | </target_preparer> |
| 43 | |
| 44 | <!-- Root currently needed to run CrosVM. |
| 45 | TODO: Give sufficient permissions to the adb shell user (b/171240450). --> |
| 46 | <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> |
| 47 | |
Andrew Walbran | f6bf686 | 2021-05-21 12:41:13 +0000 | [diff] [blame] | 48 | <!-- Run VirtualizationService for the duration of the test. |
| 49 | TODO: Run VirtualizationService as a system service. --> |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 50 | <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
| 51 | <option name="throw-if-cmd-fail" value="true" /> |
Andrew Walbran | f6bf686 | 2021-05-21 12:41:13 +0000 | [diff] [blame] | 52 | <option name="run-command" value="start virtualizationservice" /> |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 53 | </target_preparer> |
| 54 | |
| 55 | <test class="com.android.tradefed.testtype.GTest" > |
| 56 | <option name="native-test-device-path" value="/data/local/tmp/virt-test" /> |
| 57 | <option name="module-name" value="VirtualizationTestCases" /> |
| 58 | <!-- test-timeout unit is ms, value = 2 minutes --> |
| 59 | <option name="native-test-timeout" value="120000" /> |
David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 60 | </test> |
| 61 | </configuration> |