diff options
| author | Lee Jones <lee@kernel.org> | 2025-04-24 15:45:38 +0100 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2025-05-14 09:25:02 +0100 |
| commit | 5039a33fed8851fcf384fae2bcb8fd4858edd597 (patch) | |
| tree | a069d34c30dbf238063a45f0c67d955d0c73020d /drivers/leds/Makefile | |
| parent | d1d3205730735b652303a82ba49fcfef7c20510d (diff) | |
| download | linux-5039a33fed8851fcf384fae2bcb8fd4858edd597.tar.gz linux-5039a33fed8851fcf384fae2bcb8fd4858edd597.tar.bz2 linux-5039a33fed8851fcf384fae2bcb8fd4858edd597.zip | |
leds: Provide skeleton KUnit testing for the LEDs framework
Apply a very basic implementation of KUnit LED testing.
More tests / use-cases will be added steadily over time.
CMD:
tools/testing/kunit/kunit.py run --kunitconfig drivers/leds
OUTPUT:
[15:34:19] Configuring KUnit Kernel ...
[15:34:19] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=20
[15:34:22] Starting KUnit Kernel (1/1)...
[15:34:22] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[15:34:23] ===================== led (1 subtest) ======================
[15:34:23] [PASSED] led_test_class_register
[15:34:23] ======================= [PASSED] led =======================
[15:34:23] ============================================================
[15:34:23] Testing complete. Ran 1 tests: passed: 1
[15:34:23] Elapsed time: 4.268s total, 0.001s configuring, 3.048s building, 1.214s running
Link: https://lore.kernel.org/r/20250424144544.1438584-1-lee@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds/Makefile')
| -rw-r--r-- | drivers/leds/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index 2f170d69dcbf..9a0333ec1a86 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_LEDS_CLASS) += led-class.o obj-$(CONFIG_LEDS_CLASS_FLASH) += led-class-flash.o obj-$(CONFIG_LEDS_CLASS_MULTICOLOR) += led-class-multicolor.o obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o +obj-$(CONFIG_LEDS_KUNIT_TEST) += led-test.o # LED Platform Drivers (keep this sorted, M-| sort) obj-$(CONFIG_LEDS_88PM860X) += leds-88pm860x.o |
