ANDROID: kselftests: Use KernelTargetTest and handle skip exit code

kselftests use exit code 4 when skipping tests.  Use KernelTargetTest to
handle this correctly.

Bug: 291147200
Change-Id: I6a8dfb67b29b04f6e54b2ca9a42c138a2d6b65f6
Signed-off-by: Edward Liaw <edliaw@google.com>
This commit is contained in:
Edward Liaw
2023-12-01 18:37:11 +00:00
committed by Treehugger Robot
parent a2ebe396f9
commit 93dd59141d
2 changed files with 6 additions and 2 deletions
@@ -22,7 +22,9 @@
<option name="post-push" value='chmod -R 755 /data/selftests; find /data/selftests; -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.ExecutableTargetTest" >
<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="kselftest_binderfs_binderfs_test" value="/data/selftests/arm64/kselftest_binderfs_binderfs_test" />
<option name="test-command-line" key="kselftest_breakpoints_breakpoint_test" value="/data/selftests/arm64/kselftest_breakpoints_breakpoint_test" />
<option name="test-command-line" key="kselftest_breakpoints_step_after_suspend_test" value="/data/selftests/arm64/kselftest_breakpoints_step_after_suspend_test" />
@@ -22,7 +22,9 @@
<option name="post-push" value='chmod -R 755 /data/selftests; find /data/selftests; -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.ExecutableTargetTest" >
<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="kselftest_binderfs_binderfs_test" value="/data/selftests/x86_64/kselftest_binderfs_binderfs_test" />
<option name="test-command-line" key="kselftest_breakpoints_breakpoint_test" value="/data/selftests/x86_64/kselftest_breakpoints_breakpoint_test" />
<option name="test-command-line" key="kselftest_breakpoints_step_after_suspend_test" value="/data/selftests/x86_64/kselftest_breakpoints_step_after_suspend_test" />