ANDROID: Fix kselftest local testing flow.
Now that we no longer rely on copy_file, the directory structure is no longer maintained below bazel-bin/common. Create a pkg_install rule that installs the test to the correct place, then start from there. Bug: 312798837 Test: run kselftest.sh Change-Id: I4d49d25fe3a2395c184db4b2edea5ae879c30e45 Signed-off-by: HONG Yifan <elsk@google.com>
This commit is contained in:
+12
@@ -2267,6 +2267,18 @@ pkg_filegroup(
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
pkg_install(
|
||||
name = "kselftest_tests_x86_64_install",
|
||||
srcs = [":kselftest_tests_x86_64_pkg_filegroup"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
pkg_install(
|
||||
name = "kselftest_tests_arm64_install",
|
||||
srcs = [":kselftest_tests_arm64_pkg_filegroup"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
pkg_zip(
|
||||
name = "tests_zip_x86_64",
|
||||
srcs = [
|
||||
|
||||
@@ -5,7 +5,7 @@ BAZEL=tools/bazel
|
||||
BIN_DIR=common/tools/testing/android/bin
|
||||
ACLOUD=$BIN_DIR/acloudb.sh
|
||||
TRADEFED=prebuilts/tradefed/filegroups/tradefed/tradefed.sh
|
||||
TESTSDIR=bazel-bin/common/
|
||||
TESTSDIR=/tmp/kselftests
|
||||
LOG_DIR=$PWD/out/test_logs/$(date +%Y%m%d_%H%M%S)
|
||||
JDK_PATH=prebuilts/jdk/jdk11/linux-x86
|
||||
|
||||
@@ -165,10 +165,10 @@ ABI=$(adb -s $SERIAL_NUMBER shell getprop ro.product.cpu.abi)
|
||||
echo "Building kselftests according to device $SERIAL_NUMBER ro.product.cpu.abi $ABI ..."
|
||||
case $ABI in
|
||||
arm64*)
|
||||
$BAZEL build //common:kselftest_tests_arm64
|
||||
$BAZEL run //common:kselftest_tests_arm64_install -- --destdir $TESTSDIR
|
||||
;;
|
||||
x86_64*)
|
||||
$BAZEL build //common:kselftest_tests_x86_64
|
||||
$BAZEL run //common:kselftest_tests_x86_64_install -- --destdir $TESTSDIR
|
||||
;;
|
||||
*)
|
||||
echo "$ABI not supported"
|
||||
|
||||
Reference in New Issue
Block a user