blob: 12f3734fa67ea1969f2ebac76523ca6b071e64ad [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.
-->
<!DOCTYPE configuration [
<!ENTITY ltp_root "/data/local/tmp/ltp">
<!ENTITY ltp_dir "/data/local/tmp/ltp/DATA/nativetest{nativetest_bit_path}/ltp">
<!ENTITY ltp_bin_dir "&ltp_dir;/testcases/bin">
<!ENTITY env_setup_cmd "export TMP=&ltp_dir;/tmp LTPTMP=&ltp_dir;/tmp/ltptemp PATH=/system/bin:&ltp_dir;/testcases/bin LTP_DEV_FS_TYPE=ext4 TMPBASE=&ltp_dir;/tmp/tmpbase TMPDIR=&ltp_dir;/tmp/tmpdir LTPROOT=&ltp_dir; ">
]>
<configuration description="Runs vts_ltp_test.">
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
<target_preparer class="com.android.tradefed.targetprep.StopServicesSetup"/>
<object type="module_controller" class="com.android.tradefed.testtype.suite.module.KernelTestModuleController" >
{module_controller_option}
</object>
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<!-- LTP tests must be pushed to `/data/local/tmp/ltp` which has the right security context setting.
Any other directory might not work. -->
<option name="push" value="vts_kernel_tests->&ltp_root;" />
</target_preparer>
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<option name="run-command" value='find &ltp_dir; -type f | xargs grep -l -e "bin/sh" -e "bin/bash" | xargs sed -i -e "s?/bin/echo?echo?" -i -e "s?#!/bin/sh?#!/system/bin/sh?" -i -e "s?#!/bin/bash?#!/system/bin/sh?" -i -e "s?bs=1M?#bs=1m?"' />
<option name="run-command" value='mkdir -p &ltp_dir;/tmp; chmod 777 &ltp_dir;/tmp' />
<option name="run-command" value='mkdir -p &ltp_dir;/tmp/tmpbase; chmod 777 &ltp_dir;/tmp/tmpbase' />
<option name="run-command" value='mkdir -p &ltp_dir;/tmp/ltptemp; chmod 777 &ltp_dir;/tmp/ltptemp' />
<option name="run-command" value='mkdir -p &ltp_dir;/tmp/tmpdir; chmod 777 &ltp_dir;/tmp/tmpdir' />
<!-- Apply the right security context for kernel tests to work. -->
<option name="run-command" value='restorecon -F -R &ltp_root;' />
<option name="teardown-command" value="rm -rf &ltp_dir;/tmp" />
</target_preparer>
<!-- Mandatory tests (must pass and cannot skip). -->
<test class="com.android.tradefed.testtype.binary.KernelTargetTest">
<option name="skip-binary-check" value="true" />
<!-- Set binary timeout to be 18 min which is greater than the default 5 min timeout. Otherwise TF will retry to the command and attempt to do device recovery. -->
<option name="per-binary-timeout" value="1080000" />
{mandatory_test_cases}
</test>
<test class="com.android.tradefed.testtype.binary.KernelTargetTest">
<!-- Identify LTP's TCONF code (incompatible configuration) as a skip. -->
<option name="exit-code-skip" value="32" />
<option name="skip-binary-check" value="true" />
<!-- Set binary timeout to be 18 min which is greater than the default 5 min timeout. Otherwise TF will retry to the command and attempt to do device recovery. -->
<option name="per-binary-timeout" value="1080000" />
{skippable_test_cases}
</test>
</configuration>