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 | |
| 17 | <configuration description="Config for Virtualization host tests"> |
| 18 | |
| 19 | <!-- Basic checks that the device has all the prerequisites. --> |
| 20 | <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
| 21 | <option name="throw-if-cmd-fail" value="true" /> |
| 22 | <!-- Kernel has KVM enabled. --> |
| 23 | <option name="run-command" value="ls /dev/kvm" /> |
| 24 | <!-- Kernel has vhost-vsock enabled. --> |
| 25 | <option name="run-command" value="ls /dev/vhost-vsock" /> |
| 26 | <!-- CrosVM is installed. --> |
Andrew Walbran | 3049fdf | 2020-12-23 12:46:30 +0000 | [diff] [blame] | 27 | <option name="run-command" value="ls /apex/com.android.virt/bin/crosvm" /> |
| 28 | <!-- Virt Manager is installed. --> |
| 29 | <option name="run-command" value="which virtmanager" /> |
David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 30 | </target_preparer> |
| 31 | |
| 32 | <!-- Push test binaries to the device. --> |
| 33 | <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> |
| 34 | <option name="cleanup" value="true" /> |
| 35 | <option name="abort-on-push-failure" value="true" /> |
Jiyong Park | 978b1e3 | 2021-02-04 20:23:40 +0900 | [diff] [blame] | 36 | <option name="push-file" key="vm_config.json" value="/data/local/tmp/virt-test/vm_config.json" /> |
| 37 | <option name="push-file" key="virt_hostside_tests_kernel" value="/data/local/tmp/virt-test/kernel" /> |
| 38 | <option name="push-file" key="virt_hostside_tests_initramfs.img" value="/data/local/tmp/virt-test/initramfs" /> |
| 39 | <option name="push-file" key="vsock_server" value="/data/local/tmp/virt-test/vsock_server" /> |
David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 40 | </target_preparer> |
| 41 | |
| 42 | <!-- Root currently needed to run CrosVM. |
| 43 | TODO: Give sufficient permissions to the adb shell user (b/171240450). --> |
| 44 | <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> |
| 45 | |
| 46 | <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" > |
| 47 | <option name="jar" value="VirtualizationHostTestCases.jar" /> |
| 48 | <option name="runtime-hint" value="2m" /> |
| 49 | </test> |
| 50 | </configuration> |