test: Rename test suites to match their linker-list name
authorSimon Glass <sjg@chromium.org>
Mon, 20 Jan 2025 21:25:29 +0000 (14:25 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 24 Jan 2025 20:34:40 +0000 (14:34 -0600)
Some suites have a different name from that used in the linker list.
That makes it hard to programmatically match the name printed when the
suite runs to the linker-list name it has.

Update the names so they are the same.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/test/cmd.h
test/boot/upl.c
test/cmd/addrmap.c
test/cmd/cmd_ut_cmd.c
test/cmd/exit.c
test/cmd/mem.c
test/cmd/pci_mps.c
test/cmd/setexpr.c
test/dm/test-dm.c
test/env/cmd_ut_env.c

index c200570..3d1e3e3 100644 (file)
@@ -10,6 +10,6 @@
 #include <test/test.h>
 
 /* Declare a new command test */
-#define CMD_TEST(_name, _flags) UNIT_TEST(_name, _flags, cmd_test)
+#define CMD_TEST(_name, _flags) UNIT_TEST(_name, _flags, cmd)
 
 #endif /* __TEST_CMD_H__ */
index 99f02b7..ef65cf3 100644 (file)
@@ -432,6 +432,5 @@ int do_ut_upl(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        struct unit_test *tests = UNIT_TEST_SUITE_START(upl_test);
        const int n_ents = UNIT_TEST_SUITE_COUNT(upl_test);
 
-       return cmd_ut_category("cmd_upl", "cmd_upl_", tests, n_ents, argc,
-                              argv);
+       return cmd_ut_category("upl", "cmd_upl_", tests, n_ents, argc, argv);
 }
index b34be89..4389761 100644 (file)
@@ -30,6 +30,6 @@ int do_ut_addrmap(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        struct unit_test *tests = UNIT_TEST_SUITE_START(addrmap_test);
        const int n_ents = UNIT_TEST_SUITE_COUNT(addrmap_test);
 
-       return cmd_ut_category("cmd_addrmap", "cmd_addrmap_", tests, n_ents,
+       return cmd_ut_category("addrmap", "cmd_addrmap_", tests, n_ents,
                               argc, argv);
 }
index e77fa1c..ad19256 100644 (file)
@@ -13,8 +13,8 @@
 
 int do_ut_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-       struct unit_test *tests = UNIT_TEST_SUITE_START(cmd_test);
-       const int n_ents = UNIT_TEST_SUITE_COUNT(cmd_test);
+       struct unit_test *tests = UNIT_TEST_SUITE_START(cmd);
+       const int n_ents = UNIT_TEST_SUITE_COUNT(cmd);
 
        return cmd_ut_category("cmd", "cmd_test_", tests, n_ents, argc, argv);
 }
index af58a57..cf65c05 100644 (file)
@@ -116,6 +116,6 @@ int do_ut_exit(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        struct unit_test *tests = UNIT_TEST_SUITE_START(exit_test);
        const int n_ents = UNIT_TEST_SUITE_COUNT(exit_test);
 
-       return cmd_ut_category("cmd_exit", "exit_test_", tests, n_ents,
+       return cmd_ut_category("exit", "exit_test_", tests, n_ents,
                               argc, argv);
 }
index f1bbab6..d6f2544 100644 (file)
@@ -14,6 +14,6 @@ int do_ut_mem(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        struct unit_test *tests = UNIT_TEST_SUITE_START(mem_test);
        const int n_ents = UNIT_TEST_SUITE_COUNT(mem_test);
 
-       return cmd_ut_category("cmd_mem", "mem_test_", tests, n_ents, argc,
+       return cmd_ut_category("mem", "mem_test_", tests, n_ents, argc,
                               argv);
 }
index a265105..0c57d15 100644 (file)
@@ -35,6 +35,6 @@ int do_ut_pci_mps(struct cmd_tbl *cmdtp, int flag, int argc,
        struct unit_test *tests = UNIT_TEST_SUITE_START(pci_mps_test);
        const int n = UNIT_TEST_SUITE_COUNT(pci_mps_test);
 
-       return cmd_ut_category("cmd_pci_mps", "pci_mps_test_", tests, n,
+       return cmd_ut_category("pci_mps", "pci_mps_test_", tests, n,
                               argc, argv);
 }
index 21a3268..9b3277f 100644 (file)
@@ -485,6 +485,6 @@ int do_ut_setexpr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        struct unit_test *tests = UNIT_TEST_SUITE_START(setexpr_test);
        const int n_ents = UNIT_TEST_SUITE_COUNT(setexpr_test);
 
-       return cmd_ut_category("cmd_setexpr", "setexpr_test_", tests, n_ents,
+       return cmd_ut_category("setexpr", "setexpr_test_", tests, n_ents,
                               argc, argv);
 }
index 4bc2c45..7cfbefe 100644 (file)
@@ -11,6 +11,5 @@ int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        struct unit_test *tests = UNIT_TEST_SUITE_START(dm_test);
        const int n_ents = UNIT_TEST_SUITE_COUNT(dm_test);
 
-       return cmd_ut_category("driver model", "dm_test_", tests, n_ents, argc,
-                              argv);
+       return cmd_ut_category("dm", "dm_test_", tests, n_ents, argc, argv);
 }
index 9f16a97..494b5db 100644 (file)
@@ -80,6 +80,5 @@ int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        struct unit_test *tests = UNIT_TEST_SUITE_START(env_test);
        const int n_ents = UNIT_TEST_SUITE_COUNT(env_test);
 
-       return cmd_ut_category("environment", "env_test_",
-                              tests, n_ents, argc, argv);
+       return cmd_ut_category("env", "env_test_", tests, n_ents, argc, argv);
 }