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"> |
David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 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. --> |
Jiyong Park | 8d1eb7e | 2021-02-16 13:23:00 +0900 | [diff] [blame] | 29 | <option name="run-command" value="ls /apex/com.android.virt/bin/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" /> |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 36 | <option name="push-file" key="VirtualizationTestCases" value="/data/local/tmp/virt-test/VirtualizationTestCases" /> |
| 37 | <option name="push-file" key="virt_test_kernel" value="/data/local/tmp/virt-test/kernel" /> |
| 38 | <option name="push-file" key="virt_test_initramfs.img" value="/data/local/tmp/virt-test/initramfs" /> |
| 39 | <option name="push-file" key="vsock_config.json" value="/data/local/tmp/virt-test/vsock_config.json" /> |
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 | |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 46 | <!-- Run Virt Manager for the duration of the test. |
| 47 | TODO: Run Virt Manager as a system service. --> |
| 48 | <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
| 49 | <option name="throw-if-cmd-fail" value="true" /> |
Andrew Walbran | 2c7e459 | 2021-03-29 17:08:48 +0000 | [diff] [blame] | 50 | <option name="run-command" value="start virtmanager" /> |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 51 | </target_preparer> |
| 52 | |
| 53 | <test class="com.android.tradefed.testtype.GTest" > |
| 54 | <option name="native-test-device-path" value="/data/local/tmp/virt-test" /> |
| 55 | <option name="module-name" value="VirtualizationTestCases" /> |
| 56 | <!-- test-timeout unit is ms, value = 2 minutes --> |
| 57 | <option name="native-test-timeout" value="120000" /> |
David Brazdil | 1267a28 | 2020-10-15 12:33:20 +0000 | [diff] [blame] | 58 | </test> |
| 59 | </configuration> |