test: Rename test suites to match their linker-list name

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>
This commit is contained in:
Simon Glass 2025-01-20 14:25:29 -07:00 committed by Tom Rini
parent ea2bb8e20f
commit 4d31a3bd33
10 changed files with 11 additions and 14 deletions

View 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__ */

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}