mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 09:55:19 +02:00
ANDROID: Shorten the length of line in kunit/android/README.
Test: none Bug: 345309292 Signed-off-by: Betty Zhou <bettyzhou@google.com> Change-Id: I4343627fb770e9ca0b2a2cb3c292fde3f8ca5980
This commit is contained in:
parent
96533d6ac8
commit
0df607efb3
|
@ -10,8 +10,8 @@ Run test with a single shell script command:
|
||||||
$ common/tools/testing/android/bin/kunit.sh
|
$ common/tools/testing/android/bin/kunit.sh
|
||||||
|
|
||||||
By default, the script will build the kernel and launch an Android virtual
|
By default, the script will build the kernel and launch an Android virtual
|
||||||
device and then run the tests. Additional options may be passed to change
|
device and then run the tests. Additional options may be passed to change the
|
||||||
the default behavior. The following are some examples on how to use it:
|
default behavior. The following are some examples on how to use it:
|
||||||
|
|
||||||
* Build kernel, launch a virtual device, run KUnit tests:
|
* Build kernel, launch a virtual device, run KUnit tests:
|
||||||
$ common/tools/testing/android/bin/kunit.sh
|
$ common/tools/testing/android/bin/kunit.sh
|
||||||
|
@ -23,7 +23,9 @@ Run test with a single shell script command:
|
||||||
$ common/tools/testing/android/bin/kunit.sh -h
|
$ common/tools/testing/android/bin/kunit.sh -h
|
||||||
|
|
||||||
Load and run a test module on Android device manually
|
Load and run a test module on Android device manually
|
||||||
* Push the KUnit test framework module kunit.ko over to the device. For example:
|
* Push the KUnit test framework module kunit.ko over to the device. For
|
||||||
|
example:
|
||||||
|
|
||||||
$ adb push kunit.ko /data
|
$ adb push kunit.ko /data
|
||||||
|
|
||||||
* Load test module on device:
|
* Load test module on device:
|
||||||
|
@ -73,7 +75,8 @@ Run KUnit tests on Android Device via test automation infrastructure tradefed
|
||||||
* With device connected and accessible via adb run the tests:
|
* With device connected and accessible via adb run the tests:
|
||||||
$ prebuilts/tradefed/filegroups/tradefed/tradefed.sh run commandAndExit \
|
$ prebuilts/tradefed/filegroups/tradefed/tradefed.sh run commandAndExit \
|
||||||
template/local_min --template:map test=suite/test_mapping_suite \
|
template/local_min --template:map test=suite/test_mapping_suite \
|
||||||
--include-filter kunit --tests-dir=/tmp/kunit_tests --primary-abi-only
|
--include-filter kunit --tests-dir=/tmp/kunit_tests \
|
||||||
|
--primary-abi-only -s <your_device_serial_number>
|
||||||
....
|
....
|
||||||
=======================================================
|
=======================================================
|
||||||
=============== Summary ===============
|
=============== Summary ===============
|
||||||
|
@ -95,9 +98,26 @@ Check dmesg for load errors. If undefined symbol errors are shown, you're
|
||||||
likely running with a trimmed kernel where the symbols are not available.
|
likely running with a trimmed kernel where the symbols are not available.
|
||||||
Run with a "no trim" kernel.
|
Run with a "no trim" kernel.
|
||||||
|
|
||||||
|
Check the test module dependency with `modinfo <module_name>.ko` on your local
|
||||||
|
host machine or on the Android device with `adb shell modinfo <module_name.ko>`.
|
||||||
|
All dependent modules need to be installed before the test module can be
|
||||||
|
installed successfully.
|
||||||
|
|
||||||
|
Check if the module is already installed with `adb shell lsmod`. The `adb shell
|
||||||
|
rmmod` can be used to remove the already installed test module, and installing
|
||||||
|
the test module again will trigger the test rerun.
|
||||||
|
|
||||||
|
`adb shell lsmod` will also show the module dependency for your test module in
|
||||||
|
the `Used by` column. You can not remove a module with `adb shell rmmod` if it
|
||||||
|
is being used by another module. Other modules that are using it need to be
|
||||||
|
removed first.
|
||||||
|
|
||||||
2. Test module loaded but no test results
|
2. Test module loaded but no test results
|
||||||
|
|
||||||
Check dmesg for KUnit errors.
|
Check dmesg for KUnit errors.
|
||||||
$ dmesg | grep kunit
|
$ dmesg | grep kunit
|
||||||
|
|
||||||
If "kunit: disabled" is shown then `kunit.enable=1` has not been set.
|
If "kunit: disabled" is shown then kunit.ko is not installed with `enable=1`.
|
||||||
|
|
||||||
|
If kunit.ko or kunit_<*test>.ko fails to install, check for whether they are
|
||||||
|
already installed with `adb shell lsmod`.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user