| <?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 ktest_dir "/data/local/tmp/{MODULE}"> |
| ]> |
| <configuration description="Configuration for {MODULE} test"> |
| <option name="test-suite-tag" value="vts" /> |
| <option name="config-descriptor:metadata" key="component" value="kselftests" /> |
| |
| <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" /> |
| <target_preparer class="com.android.tradefed.targetprep.StopServicesSetup" /> |
| |
| <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> |
| <option name="cleanup" value="true" /> |
| <option name="push-file" key="{MODULE}" value="&ktest_dir;" /> |
| <option name="post-push" value='chmod -R 755 &ktest_dir;; find &ktest_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?" || echo "There were no files to process"' /> |
| </target_preparer> |
| |
| <test class="com.android.tradefed.testtype.binary.KernelTargetTest" > |
| <option name="exit-code-skip" value="4" /> |
| <option name="skip-binary-check" value="true" /> |
| <option name="test-command-line" key="{MODULE}" value='if [ -d &ktest_dir;/*/. ]; then cd &ktest_dir;/*/.; ./{MODULE}; else echo "{MODULE} skipped"; exit 4; fi' /> |
| </test> |
| </configuration> |
| |