ANDROID: kselftests: choose build from the target device's abi

Use getprop to retrieve the test device's abi and select the build to
run.

Bug: 291147200
Change-Id: I79aadbc8a4a4a1bfd3f6c933bdee0e62d1d6d90a
Signed-off-by: Edward Liaw <edliaw@google.com>
This commit is contained in:
Edward Liaw
2023-12-07 01:54:49 +00:00
parent 0f5a47770d
commit c072379879
+13 -1
View File
@@ -65,7 +65,19 @@ if $LAUNCH_CVD; then
fi
echo "Building selftests..."
$BAZEL build //common:kselftest_tests_x86_64
ABI=$(adb shell getprop ro.product.cpu.abi)
case $ABI in
arm64*)
$BAZEL build //common:kselftest_tests_arm64
;;
x86_64*)
$BAZEL build //common:kselftest_tests_x86_64
;;
*)
echo "$ABI not supported"
exit 1
;;
esac
$TRADEFED run commandAndExit template/local_min --template:map test=suite/test_mapping_suite \
--include-filter selftests --tests-dir=$TESTSDIR --primary-abi-only