summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-02-07 11:30:55 -0700
committerTom Rini <trini@konsulko.com>2025-02-11 20:10:59 -0600
commit854225191af5527619fcc944d38f2e2fd5d3ced1 (patch)
treea8dd5cb312494b3a48e2b2a1a31df1ca3963ea1e
parent59713c412aeb2f1cafd42a77c948ce92d387de44 (diff)
test: Make cmd_ut_category() static
This function is not used outside the cmd_ut file anymore, so make it static. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--include/test/suites.h22
-rw-r--r--test/cmd_ut.c6
2 files changed, 3 insertions, 25 deletions
diff --git a/include/test/suites.h b/include/test/suites.h
index 687a8a13e7f..f817da747c2 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -7,26 +7,4 @@
#ifndef __TEST_SUITES_H__
#define __TEST_SUITES_H__
-struct unit_test;
-struct unit_test_state;
-
-/**
- * cmd_ut_category() - Run a category of unit tests
- *
- * @uts: Unit-test state, which must be ready for use, i.e. ut_init_state()
- * has been called. The caller is responsible for calling
- * ut_uninit_state() after this function returns
- * @name: Category name
- * @prefix: Prefix of test name
- * @tests: List of tests to run
- * @n_ents: Number of tests in @tests
- * @argc: Argument count provided. Must be >= 1. If this is 1 then all
- * tests are run, otherwise only the one named @argv[1] is run.
- * @argv: Arguments: argv[1] is the test to run (if @argc >= 2)
- * Return: 0 if OK, CMD_RET_FAILURE on failure
- */
-int cmd_ut_category(struct unit_test_state *uts, const char *name,
- const char *prefix, struct unit_test *tests, int n_ents,
- int argc, char *const argv[]);
-
#endif /* __TEST_SUITES_H__ */
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index b3821a0fe68..31ded16325f 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -35,9 +35,9 @@ static int do_ut_all(struct unit_test_state *uts, struct cmd_tbl *cmdtp,
static int do_ut_info(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]);
-int cmd_ut_category(struct unit_test_state *uts, const char *name,
- const char *prefix, struct unit_test *tests, int n_ents,
- int argc, char *const argv[])
+static int cmd_ut_category(struct unit_test_state *uts, const char *name,
+ const char *prefix, struct unit_test *tests,
+ int n_ents, int argc, char *const argv[])
{
const char *test_insert = NULL;
int runs_per_text = 1;