54 lines
3.3 KiB
XML
54 lines
3.3 KiB
XML
<?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{}/ltp">
|
|
<!ENTITY ltp_bin_dir "<p_dir;/testcases/bin">
|
|
<!ENTITY env_setup_cmd "export TMP=<p_dir;/tmp LTPTMP=<p_dir;/tmp/ltptemp PATH=/system/bin:<p_dir;/testcases/bin LTP_DEV_FS_TYPE=ext4 TMPBASE=<p_dir;/tmp/tmpbase TMPDIR=<p_dir;/tmp/tmpdir LTPROOT=<p_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" >
|
|
{}
|
|
</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-><p_root;" />
|
|
</target_preparer>
|
|
|
|
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
|
|
<option name="run-command" value='find <p_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 <p_dir;/tmp; chmod 777 <p_dir;/tmp' />
|
|
<option name="run-command" value='mkdir -p <p_dir;/tmp/tmpbase; chmod 777 <p_dir;/tmp/tmpbase' />
|
|
<option name="run-command" value='mkdir -p <p_dir;/tmp/ltptemp; chmod 777 <p_dir;/tmp/ltptemp' />
|
|
<option name="run-command" value='mkdir -p <p_dir;/tmp/tmpdir; chmod 777 <p_dir;/tmp/tmpdir' />
|
|
<!-- Apply the right security context for kernel tests to work. -->
|
|
<option name="run-command" value='restorecon -F -R <p_root;' />
|
|
<option name="teardown-command" value="rm -rf <p_dir;/tmp" />
|
|
</target_preparer>
|
|
|
|
<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="ignore-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" />
|
|
{}
|
|
</test>
|
|
</configuration>
|