[PATCH 00/21] test: Tidy up the test/ directory

Simon Glass sjg at chromium.org
Mon Oct 28 13:41:05 CET 2024


Some tests do not use the unit-test framework. Others are in a suite of
their own, for no obvious reason.

This series tidies this up.


Simon Glass (21):
  bloblist: test: Move test into common
  bloblist: test: Drop global_data declarations
  bloblist: test: doc: Move into the common suite
  test: Drop test-trace.sh and common.sh
  compression: test: Move test into lib
  compression: test: Move into the lib suite
  command_ut: test: Move test into lib
  command: test: Move into the cmd suite
  test: Update command test to use unit-test functions
  bootm: test: Move test into boot
  test: Move print_ut test into common
  test: Move print_ut into the common suite
  test: Move str_ut test into lib
  str: test: Move into the lib suite
  test: Move unicode_ut test into lib
  test: Move unicode tests into the lib suite
  test: Move time_ut test into lib
  test: Move time tests into the lib suite
  test: Update time tests to use unit-test asserts
  test: Correct display of failing test
  test: Quote test names

 doc/usage/cmd/ut.rst                 |  29 +++++--
 include/test/compression.h           |  16 ----
 test/Makefile                        |  10 ---
 test/boot/Makefile                   |   1 +
 test/{ => boot}/bootm.c              |   0
 test/cmd/Makefile                    |   1 +
 test/cmd/command.c                   | 108 +++++++++++++++++++++++++++
 test/cmd_ut.c                        |  30 +-------
 test/command_ut.c                    | 104 --------------------------
 test/common.sh                       |  20 -----
 test/common/Makefile                 |   4 +
 test/{ => common}/bloblist.c         |  47 ++++--------
 test/{print_ut.c => common/print.c}  |  27 ++-----
 test/lib/Makefile                    |   6 ++
 test/{ => lib}/compression.c         |  39 ++++------
 test/{str_ut.c => lib/str.c}         |  31 +++-----
 test/{time_ut.c => lib/time.c}       |  60 +++++----------
 test/{unicode_ut.c => lib/unicode.c} |  70 +++++++----------
 test/test-main.c                     |   8 +-
 test/trace/test-trace.sh             |  64 ----------------
 20 files changed, 240 insertions(+), 435 deletions(-)
 delete mode 100644 include/test/compression.h
 rename test/{ => boot}/bootm.c (100%)
 create mode 100644 test/cmd/command.c
 delete mode 100644 test/command_ut.c
 delete mode 100644 test/common.sh
 rename test/{ => common}/bloblist.c (93%)
 rename test/{print_ut.c => common/print.c} (94%)
 rename test/{ => lib}/compression.c (95%)
 rename test/{str_ut.c => lib/str.c} (93%)
 rename test/{time_ut.c => lib/time.c} (56%)
 rename test/{unicode_ut.c => lib/unicode.c} (92%)
 delete mode 100755 test/trace/test-trace.sh

-- 
2.43.0



More information about the U-Boot mailing list