test: Drop the _test suffix on linker lists
Most test suites have a _test suffix. This is not necessary as there is
also a ut_ prefix.
Drop the suffix so that (with future work) the suite name can be used as
the linker-list name.
Remove the suffix from the pytest regex as well, moving it to the top of
the file, as it is a constant.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/boot/bootm.c b/test/boot/bootm.c
index 9455f44..6e78c3e 100644
--- a/test/boot/bootm.c
+++ b/test/boot/bootm.c
@@ -13,7 +13,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#define BOOTM_TEST(_name, _flags) UNIT_TEST(_name, _flags, bootm_test)
+#define BOOTM_TEST(_name, _flags) UNIT_TEST(_name, _flags, bootm)
enum {
BUF_SIZE = 1024,
@@ -252,8 +252,8 @@
int do_ut_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- struct unit_test *tests = UNIT_TEST_SUITE_START(bootm_test);
- const int n_ents = UNIT_TEST_SUITE_COUNT(bootm_test);
+ struct unit_test *tests = UNIT_TEST_SUITE_START(bootm);
+ const int n_ents = UNIT_TEST_SUITE_COUNT(bootm);
return cmd_ut_category("bootm", "bootm_test_", tests, n_ents,
argc, argv);
diff --git a/test/boot/bootstd_common.c b/test/boot/bootstd_common.c
index ff8ed23..6bd9bb6 100644
--- a/test/boot/bootstd_common.c
+++ b/test/boot/bootstd_common.c
@@ -96,8 +96,8 @@
int do_ut_bootstd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- struct unit_test *tests = UNIT_TEST_SUITE_START(bootstd_test);
- const int n_ents = UNIT_TEST_SUITE_COUNT(bootstd_test);
+ struct unit_test *tests = UNIT_TEST_SUITE_START(bootstd);
+ const int n_ents = UNIT_TEST_SUITE_COUNT(bootstd);
int ret;
ret = bootstd_setup_for_tests();
@@ -106,6 +106,6 @@
return CMD_RET_FAILURE;
}
- return cmd_ut_category("bootstd", "bootstd_test_",
- tests, n_ents, argc, argv);
+ return cmd_ut_category("bootstd", "bootstd_", tests, n_ents,
+ argc, argv);
}
diff --git a/test/boot/bootstd_common.h b/test/boot/bootstd_common.h
index e29036c..ea3ecd1 100644
--- a/test/boot/bootstd_common.h
+++ b/test/boot/bootstd_common.h
@@ -12,8 +12,7 @@
#include <version_string.h>
/* Declare a new bootdev test */
-#define BOOTSTD_TEST(_name, _flags) \
- UNIT_TEST(_name, _flags, bootstd_test)
+#define BOOTSTD_TEST(_name, _flags) UNIT_TEST(_name, _flags, bootstd)
#define NVDATA_START_BLK ((0x400 + 0x400) / MMC_MAX_BLOCK_LEN)
#define VERSION_START_BLK ((0x400 + 0x800) / MMC_MAX_BLOCK_LEN)
diff --git a/test/boot/measurement.c b/test/boot/measurement.c
index 29be495..018e8af 100644
--- a/test/boot/measurement.c
+++ b/test/boot/measurement.c
@@ -14,7 +14,7 @@
#include <asm/io.h>
#define MEASUREMENT_TEST(_name, _flags) \
- UNIT_TEST(_name, _flags, measurement_test)
+ UNIT_TEST(_name, _flags, measurement)
static int measure(struct unit_test_state *uts)
{
@@ -57,8 +57,8 @@
int do_ut_measurement(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- struct unit_test *tests = UNIT_TEST_SUITE_START(measurement_test);
- const int n_ents = UNIT_TEST_SUITE_COUNT(measurement_test);
+ struct unit_test *tests = UNIT_TEST_SUITE_START(measurement);
+ const int n_ents = UNIT_TEST_SUITE_COUNT(measurement);
return cmd_ut_category("measurement", "measurement_test_", tests,
n_ents, argc, argv);
diff --git a/test/boot/upl.c b/test/boot/upl.c
index ef65cf3..2c9b8bc 100644
--- a/test/boot/upl.c
+++ b/test/boot/upl.c
@@ -16,7 +16,7 @@
#include "bootstd_common.h"
/* Declare a new upl test */
-#define UPL_TEST(_name, _flags) UNIT_TEST(_name, _flags, upl_test)
+#define UPL_TEST(_name, _flags) UNIT_TEST(_name, _flags, upl)
static int add_region(struct unit_test_state *uts, struct alist *lst,
ulong base, ulong size)
@@ -429,8 +429,8 @@
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);
+ struct unit_test *tests = UNIT_TEST_SUITE_START(upl);
+ const int n_ents = UNIT_TEST_SUITE_COUNT(upl);
return cmd_ut_category("upl", "cmd_upl_", tests, n_ents, argc, argv);
}