From db07b9d659ae41eefdb71c29fca90e35dbe6c7a8 Mon Sep 17 00:00:00 2001 From: Weijia He Date: Tue, 28 Nov 2023 02:49:24 +0000 Subject: [PATCH] ANDROID: Fix selftest x86_64 config and add --skip-cvd-kill option to kselftest.sh Change-Id: I9c661f8958eecd3d3a3870295a9e2acd6b199590 Signed-off-by: Weijia He Bug: 291147200 --- tools/testing/android/bin/kselftest.sh | 8 +++++++- tools/testing/selftests/android/config_x86_64.xml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testing/android/bin/kselftest.sh b/tools/testing/android/bin/kselftest.sh index 723ed512e3b4..cd6c11c49f88 100755 --- a/tools/testing/android/bin/kselftest.sh +++ b/tools/testing/android/bin/kselftest.sh @@ -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 diff --git a/tools/testing/selftests/android/config_x86_64.xml b/tools/testing/selftests/android/config_x86_64.xml index 6ab3f9d12988..4ba4d12ed2ac 100644 --- a/tools/testing/selftests/android/config_x86_64.xml +++ b/tools/testing/selftests/android/config_x86_64.xml @@ -34,4 +34,5 @@