ANDROID: Update kunit README on test_dir
it needs to be specified for the kernel/tests/tools/run_test_only.sh
script for most of the cases, since the switch to the pkg_install
method for the build and install of kunit test modules.
Fixes: fe0f4e33f6 ("ANDROID: Add kunit installation rules")
Change-Id: Ib4fbfa983ef29342119fe2ff3e939e4b8c116d49
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
This commit is contained in:
committed by
Treehugger Robot
parent
be2b192f81
commit
a53bb4b36b
@@ -6,7 +6,10 @@ Prerequisites
|
||||
"no trim" kernel (e.g. add `--notrim` to bazel build command).
|
||||
|
||||
Run tests on a physical or virtual device:
|
||||
$ kernel/tests/tools/run_test_only.sh -t kunit -s <serial_number>
|
||||
$ kernel/tests/tools/run_test_only.sh -t kunit -s <serial_number> -td <test_dir>
|
||||
|
||||
test_dir is the same directory as specified when running:
|
||||
$ tools/bazel run //common:kunit_tests_arm64 -- -v --destdir <test_dir>
|
||||
|
||||
Before the tests, you can use the following command to launch a virtual device:
|
||||
$ kernel/tests/tools/launch_cvd.sh
|
||||
@@ -37,6 +40,10 @@ Load and run a test module on Android device manually
|
||||
$ cd /data
|
||||
$ insmod kunit.ko enable=1
|
||||
|
||||
If the kunit.ko has been installed already but without enable=1 passed,
|
||||
it needs to remove it first via the rmmod command, and install again
|
||||
via the insmod command
|
||||
|
||||
* Push the KUnit test module over to the device. For example using adb:
|
||||
$ adb push kunit-example-test.ko /data
|
||||
|
||||
@@ -75,7 +82,10 @@ View test results
|
||||
|
||||
Run KUnit tests on Android Device via test automation infrastructure tradefed
|
||||
* Build ACK KUnit tests and install (e.g. /tmp/kunit_tests):
|
||||
$ tools/bazel run -- //common:kunit_tests_x86_64 -v --destdir /tmp/kunit_tests
|
||||
$ tools/bazel run -- //common:kunit_tests_x86_64 -v --destdir /tmp/kunit_tests
|
||||
Or
|
||||
$ tools/bazel run -- //common:kunit_tests_arm64 -v --destdir /tmp/kunit_tests
|
||||
|
||||
|
||||
* With device connected and accessible via adb run the tests:
|
||||
$ prebuilts/tradefed/filegroups/tradefed/tradefed.sh run commandAndExit \
|
||||
|
||||
Reference in New Issue
Block a user