ANDROID: Add kunit installation rules

Use pkg_install to create installation rules for kunit test modules. To
build and install kunit test modules into /tmp/kunit_tests directory run:

$ tools/bazel run -- //common:kunit_tests_x86_64_dist -v \
    --destdir /tmp/kunit_tests

Also updated the kunit Android README to use this rule instead of
creating tests.zip and unzipping it.

Bug: 324907235

Change-Id: I1e611cf8cc2836cb213526aa270da6fd422f7352
Signed-off-by: Joe Fradley <joefradley@google.com>
This commit is contained in:
Joe Fradley
2024-03-27 12:22:33 -07:00
parent 1d752a8547
commit fe0f4e33f6
2 changed files with 19 additions and 7 deletions
+3 -6
View File
@@ -49,16 +49,13 @@ View test results
....
Run ACK KUnit tests via tradefed
* Build ACK KUnit tests:
$ tools/bazel build //common:tests_zip_arm64_dist
* Unzip tests.zip (e.g. in local tmp directory):
$ unzip bazel-bin/common/arm64/tests.zip -d tmp
* Build ACK KUnit tests and install (e.g. /tmp/kunit_tests):
$ tools/bazel run -- //common:kunit_tests_x86_64_install -v --destdir /tmp/kunit_tests
* With device connected and accessible via adb run the tests:
$ prebuilts/tradefed/filegroups/tradefed/tradefed.sh run commandAndExit \
template/local_min --template:map test=suite/test_mapping_suite \
--include-filter kunit --tests-dir=tmp/testcases --primary-abi-only
--include-filter kunit --tests-dir=/tmp/kunit_tests --primary-abi-only
....
=======================================================
=============== Summary ===============