ANDROID: Fix selftest x86_64 config and add --skip-cvd-kill option to kselftest.sh

Change-Id: I9c661f8958eecd3d3a3870295a9e2acd6b199590
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
This commit is contained in:
Weijia He
2023-11-28 02:49:24 +00:00
parent 81d02c2e4e
commit db07b9d659
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -14,6 +14,7 @@ print_help() {
echo "Available options:"
echo " --skip-kernel-build Skip the kernel building step"
echo " --skip-cvd-launch Skip the CVD launch step"
echo " --skip-cvd-kill Do not kill CVD launched by running this script"
echo " --dist-dir The kernel dist dir (default is /tmp/kernel_dist)"
echo " --help Display this help message and exit"
echo ""
@@ -22,6 +23,7 @@ print_help() {
BUILD_KERNEL=true
LAUNCH_CVD=true
KILL_CVD=true
DIST_DIR=/tmp/kernel_dist
for arg in "$@"; do
@@ -34,6 +36,10 @@ for arg in "$@"; do
LAUNCH_CVD=false
shift
;;
--skip-cvd-kill)
KILL_CVD=false
shift
;;
--dist-dir)
DIST_DIR="${arg#*=}"
shift
@@ -64,7 +70,7 @@ $BAZEL build //common:kselftest_tests_x86_64
$TRADEFED run commandAndExit template/local_min --template:map test=suite/test_mapping_suite \
--include-filter selftests --extra-file testsdir=$TESTSDIR --primary-abi-only
if $LAUNCH_CVD; then
if $LAUNCH_CVD && $KILL_CVD; then
echo "Test finished. Deleting cvd..."
$ACLOUD delete --instance-names $INSTANCE_NAME
fi
@@ -34,4 +34,5 @@
<option name="test-command-line" key="kselftest_vdso_vdso_test_getcpu" value="/data/selftests/x86_64/kselftest_vdso_vdso_test_getcpu" />
<option name="test-command-line" key="kselftest_vdso_vdso_test_gettimeofday" value="/data/selftests/x86_64/kselftest_vdso_vdso_test_gettimeofday" />
<option name="test-command-line" key="kselftest_size_test_get_size" value="/data/selftests/x86_64/kselftest_size_test_get_size" />
</test>
</configuration>