Skip to content

test: Complete the suite migration

Simon Glass u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest29 patches 1 replyIn review
  2. v128 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Add new patch to drop sandbox_set_enable_memio() from mux-cmd test
- Use strsep() instead, in case tests use strtok()

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/29test: Drop sandbox_set_enable_memio() from mux-cmd testtest/dm/mux-cmd.c+0 -60 replies
2/29test: Fix a stray asterisk in ut_run_list()test/test-main.c+1 -10 replies
3/29test: Add up the number of tests manuallytest/cmd_ut.c+8 -20 replies
4/29test: Keep track of suite durationdrivers/timer/sandbox_timer.c include/test/test.h include/time.h +2 more+48 -20 replies
5/29test: Show the average time per testinclude/test/test.h test/cmd_ut.c test/test-main.c+43 -30 replies
6/29test: Leave out the prefix when printing test namestest/cmd_ut.c test/py/tests/test_suite.py test/test-main.c+15 -90 replies
7/29test: Support an init/uninit functions for test suitesinclude/test/test.h test/test-main.c+22 -10 replies
8/29test: Tweak FDT-overlay testsMakefile include/test/fdt_overlay.h include/test/suites.h +9 more+39 -380 replies
9/29test: Move env-test rule into test/Makefile test/Makefile+1 -10 replies
10/29test: Move optee-test rule into test/Makefile test/Makefile+1 -10 replies
11/29test: Move fdt-overlay-test rule into test/Makefile test/Makefile+1 -10 replies
12/29test: Make all tests depend on UNIT_TESTtest/Kconfig test/dm/Kconfig test/env/Kconfig +2 more+9 -120 replies
13/29test: Move fdt_overlay init into a functiontest/fdt_overlay/cmd_ut_fdt_overlay.c+57 -560 replies
14/29test: Update fdt_overlay test to use fdtdec functionstest/fdt_overlay/cmd_ut_fdt_overlay.c+22 -510 replies
15/29test: Update fdt_overlay to do init from testsinclude/test/fdt_overlay.h test/fdt_overlay/cmd_ut_fdt_overlay.c+5 -10 replies
16/29test: Drop the function for running fdt_overlay testsinclude/test/suites.h test/cmd_ut.c test/fdt_overlay/cmd_ut_fdt_overlay.c+1 -200 replies
17/29test: Update bootstd to do init from teststest/boot/bootstd_common.c test/boot/bootstd_common.h test/boot/vbe_simple.c+10 -210 replies
18/29test: Drop the function for running bootstd testsinclude/test/suites.h test/boot/bootstd_common.c test/cmd_ut.c+1 -150 replies
19/29test: Update optee to do init and uninit from testsinclude/test/optee.h test/optee/cmd_ut_optee.c+38 -210 replies
20/29test: Split optee tests into three functionstest/optee/cmd_ut_optee.c+40 -170 replies
21/29test: Drop the function for running optee testsinclude/test/suites.h test/cmd_ut.c test/optee/cmd_ut_optee.c+1 -190 replies
22/29test: Rename optee test-filetest/optee/Makefile test/optee/optee.c+1 -10 replies
23/29test: Drop support for test commandsinclude/test/suites.h test/cmd_ut.c+12 -360 replies
24/29test: Make cmd_ut_category() staticinclude/test/suites.h test/cmd_ut.c+3 -250 replies
25/29test: Drop suites.hinclude/test/suites.h test/boot/bootdev.c test/boot/bootflow.c +28 more+0 -400 replies
26/29test: Allow running a selection of suitestest/cmd_ut.c test/py/tests/test_suite.py test/test-main.c+26 -130 replies
27/29test: Move code out of cmd_ut_category()test/cmd_ut.c+25 -370 replies
28/29test: Do flag-processing in the correct placetest/cmd_ut.c test/py/tests/test_suite.py+66 -470 replies
29/29test: Update documentationdoc/develop/tests_writing.rst doc/usage/cmd/ut.rst test/cmd_ut.c+149 -600 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/29] test: Complete the suite migration

This series completes the removal of test commands for suites. With this it is possible to declare a suite (including init and uninit functions) without needing to write a command.

It also adds timing for test suites, so we can keep track of how long things take.

Changes in v2:
- Add new patch to drop sandbox_set_enable_memio() from mux-cmd test
- Use strsep() instead, in case tests use strtok()

Simon Glass (29):
test: Drop sandbox_set_enable_memio() from mux-cmd test
test: Fix a stray asterisk in ut_run_list()
test: Add up the number of tests manually
test: Keep track of suite duration
test: Show the average time per test
test: Leave out the prefix when printing test names
test: Support an init/uninit functions for test suites
test: Tweak FDT-overlay tests
test: Move env-test rule into test/
test: Move optee-test rule into test/
test: Move fdt-overlay-test rule into test/
test: Make all tests depend on UNIT_TEST
test: Move fdt_overlay init into a function
test: Update fdt_overlay test to use fdtdec functions
test: Update fdt_overlay to do init from tests
test: Drop the function for running fdt_overlay tests
test: Update bootstd to do init from tests
test: Drop the function for running bootstd tests
test: Update optee to do init and uninit from tests
test: Split optee tests into three functions
test: Drop the function for running optee tests
test: Rename optee test-file
test: Drop support for test commands
test: Make cmd_ut_category() static
test: Drop suites.h
test: Allow running a selection of suites
test: Move code out of cmd_ut_category()
test: Do flag-processing in the correct place
test: Update documentation

 Makefile                                      |   3 -
 doc/develop/tests_writing.rst                 |  52 ++--
 doc/usage/cmd/ut.rst                          | 145 ++++++++---
 drivers/timer/sandbox_timer.c                 |   5 +
 include/test/fdt_overlay.h                    |  19 ++
 include/test/optee.h                          |   4 +-
 include/test/overlay.h                        |  15 --
 include/test/suites.h                         |  43 ----
 include/test/test.h                           |  28 ++
 include/time.h                                |  15 +-
 test/Kconfig                                  |  23 +-
 test/Makefile                                 |   3 +
 test/boot/bootdev.c                           |   1 -
 test/boot/bootflow.c                          |   1 -
 test/boot/bootm.c                             |   1 -
 test/boot/bootmeth.c                          |   1 -
 test/boot/bootstd_common.c                    |  29 +--
 test/boot/bootstd_common.h                    |  10 +-
 test/boot/expo.c                              |   1 -
 test/boot/image.c                             |   1 -
 test/boot/measurement.c                       |   1 -
 test/boot/upl.c                               |   1 -
 test/boot/vbe_simple.c                        |   4 -
 test/cmd/addrmap.c                            |   1 -
 test/cmd/bdinfo.c                             |   1 -
 test/cmd/exit.c                               |   1 -
 test/cmd/fdt.c                                |   1 -
 test/cmd/font.c                               |   1 -
 test/cmd/loadm.c                              |   1 -
 test/cmd/mbr.c                                |   1 -
 test/cmd/pci_mps.c                            |   1 -
 test/cmd/seama.c                              |   1 -
 test/cmd/setexpr.c                            |   1 -
 test/cmd_ut.c                                 | 243 ++++++++++--------
 test/common/bloblist.c                        |   1 -
 test/dm/Kconfig                               |   2 +-
 test/dm/mux-cmd.c                             |   6 -
 test/env/Kconfig                              |   1 -
 test/env/cmd_ut_env.c                         |   1 -
 test/{overlay => fdt_overlay}/Kconfig         |   4 +-
 test/{overlay => fdt_overlay}/Makefile        |   2 +-
 .../cmd_ut_fdt_overlay.c}                     | 221 +++++++---------
 .../test-fdt-base.dts                         |   0
 .../test-fdt-overlay-stacked.dtso             |   0
 .../test-fdt-overlay.dtso                     |   0
 test/log/cont_test.c                          |   1 -
 test/log/nolog_test.c                         |   1 -
 test/log/pr_cont_test.c                       |   1 -
 test/log/syslog_test.c                        |   1 -
 test/log/syslog_test_ndebug.c                 |   1 -
 test/optee/Kconfig                            |   2 +-
 test/optee/Makefile                           |   2 +-
 test/optee/{cmd_ut_optee.c => optee.c}        | 105 +++++---
 test/py/tests/test_suite.py                   |  34 ++-
 test/test-main.c                              |  41 ++-
 55 files changed, 587 insertions(+), 499 deletions(-)
 create mode 100644 include/test/fdt_overlay.h
 delete mode 100644 include/test/overlay.h
 delete mode 100644 include/test/suites.h
 rename test/{overlay => fdt_overlay}/Kconfig (81%)
 rename test/{overlay => fdt_overlay}/Makefile (89%)
 rename test/{overlay/cmd_ut_overlay.c => fdt_overlay/cmd_ut_fdt_overlay.c} (56%)
 rename test/{overlay => fdt_overlay}/test-fdt-base.dts (100%)
 rename test/{overlay => fdt_overlay}/test-fdt-overlay-stacked.dtso (100%)
 rename test/{overlay => fdt_overlay}/test-fdt-overlay.dtso (100%)
 rename test/optee/{cmd_ut_optee.c => optee.c} (70%)
Signature · 1 line
2.43.0