blob: ed4d00cefef78e764fbb8879b9303c7563972434 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configuration description="Config for Virtualization tests">
<!-- Basic checks that the device has all the prerequisites. -->
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<option name="throw-if-cmd-fail" value="true" />
<!-- Kernel has KVM enabled. -->
<option name="run-command" value="ls /dev/kvm" />
<!-- Kernel has vhost-vsock enabled. -->
<option name="run-command" value="ls /dev/vhost-vsock" />
<!-- CrosVM is installed. -->
<option name="run-command" value="ls /apex/com.android.virt/bin/crosvm" />
<!-- Virt Manager is installed. -->
<option name="run-command" value="ls /apex/com.android.virt/bin/virtmanager" />
</target_preparer>
<!-- Push test binaries to the device. -->
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="abort-on-push-failure" value="true" />
<option name="push-file" key="VirtualizationTestCases" value="/data/local/tmp/virt-test/VirtualizationTestCases" />
<option name="push-file" key="virt_test_kernel" value="/data/local/tmp/virt-test/kernel" />
<option name="push-file" key="virt_test_initramfs.img" value="/data/local/tmp/virt-test/initramfs" />
<option name="push-file" key="vsock_config.json" value="/data/local/tmp/virt-test/vsock_config.json" />
</target_preparer>
<!-- Root currently needed to run CrosVM.
TODO: Give sufficient permissions to the adb shell user (b/171240450). -->
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
<!-- Run Virt Manager for the duration of the test.
TODO: Run Virt Manager as a system service. -->
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<option name="throw-if-cmd-fail" value="true" />
<option name="run-command" value="start virtmanager" />
</target_preparer>
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp/virt-test" />
<option name="module-name" value="VirtualizationTestCases" />
<!-- test-timeout unit is ms, value = 2 minutes -->
<option name="native-test-timeout" value="120000" />
</test>
</configuration>