test: Drop the function for running cmd tests
authorSimon Glass <sjg@chromium.org>
Mon, 20 Jan 2025 21:25:35 +0000 (14:25 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 24 Jan 2025 20:34:40 +0000 (14:34 -0600)
Use the new suite-runner to run these tests instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/test/suites.h
test/cmd/Makefile
test/cmd/cmd_ut_cmd.c [deleted file]
test/cmd_ut.c

index b6af929..2115869 100644 (file)
@@ -37,7 +37,6 @@ int do_ut_bootstd(struct cmd_tbl *cmdtp, int flag, int argc,
                  char *const argv[]);
 int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc,
                   char *const argv[]);
-int do_ut_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 int do_ut_common(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
index 583e7c2..f83c536 100644 (file)
@@ -3,8 +3,6 @@
 # Copyright (c) 2013 Google, Inc
 # Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
 
-obj-y += cmd_ut_cmd.o
-
 obj-$(CONFIG_$(XPL_)CMDLINE) += command.o
 ifdef CONFIG_HUSH_PARSER
 obj-$(CONFIG_CONSOLE_RECORD) += test_echo.o
diff --git a/test/cmd/cmd_ut_cmd.c b/test/cmd/cmd_ut_cmd.c
deleted file mode 100644 (file)
index ad19256..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright 2023 Google LLC
- * Written by Simon Glass <sjg@chromium.org>
- *
- * Unit tests for command functions
- */
-
-#include <command.h>
-#include <test/cmd.h>
-#include <test/suites.h>
-#include <test/ut.h>
-
-int do_ut_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
-{
-       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 bbd3299..0953830 100644 (file)
@@ -129,7 +129,7 @@ static struct suite suites[] = {
        SUITE_CMD(bootstd, do_ut_bootstd),
 #endif
 #ifdef CONFIG_CMDLINE
-       SUITE_CMD(cmd, do_ut_cmd),
+       SUITE(cmd),
 #endif
        SUITE_CMD(common, do_ut_common),
 #if defined(CONFIG_UT_DM)