blob: ed4d00cefef78e764fbb8879b9303c7563972434 [file] [log] [blame]
David Brazdil1267a282020-10-15 12:33:20 +00001<?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 Brazdil49f8a4d2021-03-04 09:57:33 +000017<configuration description="Config for Virtualization tests">
David Brazdil1267a282020-10-15 12:33:20 +000018
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 Walbran3049fdf2020-12-23 12:46:30 +000027 <option name="run-command" value="ls /apex/com.android.virt/bin/crosvm" />
28 <!-- Virt Manager is installed. -->
Jiyong Park8d1eb7e2021-02-16 13:23:00 +090029 <option name="run-command" value="ls /apex/com.android.virt/bin/virtmanager" />
David Brazdil1267a282020-10-15 12:33:20 +000030 </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 Brazdil49f8a4d2021-03-04 09:57:33 +000036 <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 Brazdil1267a282020-10-15 12:33:20 +000040 </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 Brazdil49f8a4d2021-03-04 09:57:33 +000046 <!-- 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 Walbran2c7e4592021-03-29 17:08:48 +000050 <option name="run-command" value="start virtmanager" />
David Brazdil49f8a4d2021-03-04 09:57:33 +000051 </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 Brazdil1267a282020-10-15 12:33:20 +000058 </test>
59</configuration>