summaryrefslogtreecommitdiff
path: root/test/boot/bootstd_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/boot/bootstd_common.c')
-rw-r--r--test/boot/bootstd_common.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/test/boot/bootstd_common.c b/test/boot/bootstd_common.c
index 724e3d9bdd2..052c0fe5cc6 100644
--- a/test/boot/bootstd_common.c
+++ b/test/boot/bootstd_common.c
@@ -13,7 +13,6 @@
#include <mmc.h>
#include <usb.h>
#include <linux/log2.h>
-#include <test/suites.h>
#include <test/ut.h>
#include <u-boot/crc.h>
#include "bootstd_common.h"
@@ -21,8 +20,14 @@
/* tracks whether bootstd_setup_for_tests() has been run yet */
bool vbe_setup_done;
-/* set up MMC for VBE tests */
-int bootstd_setup_for_tests(void)
+/**
+ * bootstd_setup_for_tests() - Set up MMC data for VBE tests
+ *
+ * Some data is needed for VBE tests to work. This function sets that up.
+ *
+ * @return 0 if OK, -ve on error
+ */
+static int bootstd_setup_for_tests(struct unit_test_state *uts)
{
ALLOC_CACHE_ALIGN_BUFFER(u8, buf, MMC_MAX_BLOCK_LEN);
struct udevice *mmc;
@@ -55,6 +60,7 @@ int bootstd_setup_for_tests(void)
return 0;
}
+BOOTSTD_TEST_INIT(bootstd_setup_for_tests, 0);
int bootstd_test_drop_bootdev_order(struct unit_test_state *uts)
{
@@ -93,20 +99,3 @@ void bootstd_reset_usb(void)
{
usb_started = false;
}
-
-int do_ut_bootstd(struct unit_test_state *uts, struct cmd_tbl *cmdtp, int flag,
- int argc, char *const argv[])
-{
- 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();
- if (ret) {
- printf("Failed to set up for bootstd tests (err=%d)\n", ret);
- return CMD_RET_FAILURE;
- }
-
- return cmd_ut_category(uts, "bootstd", "bootstd_",
- tests, n_ents, argc, argv);
-}