diff mbox series

[v4,10/42] test: Rename test-main.c to test-dm.c

Message ID 20210304135118.643277-10-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show
Series test: Refactor tests to have a single test runner | expand

Commit Message

Simon Glass March 4, 2021, 1:50 p.m. UTC
This is the main test function for driver model but not for other tests.
Rename the file and the function so this is clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 arch/sandbox/cpu/spl.c             | 2 +-
 include/test/test.h                | 4 ++--
 test/dm/Makefile                   | 2 +-
 test/dm/{test-main.c => test-dm.c} | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
 rename test/dm/{test-main.c => test-dm.c} (98%)
diff mbox series

Patch

diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 6926e244ca2..3779d58c3fe 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -65,7 +65,7 @@  void spl_board_init(void)
 	if (state->run_unittests) {
 		int ret;
 
-		ret = dm_test_main(state->select_unittests);
+		ret = dm_test_run(state->select_unittests);
 		/* continue execution into U-Boot */
 	}
 }
diff --git a/include/test/test.h b/include/test/test.h
index 27585507d8c..d282cb2362d 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -106,7 +106,7 @@  enum {
 struct udevice *testbus_get_clear_removed(void);
 
 /**
- * dm_test_main() - Run driver model tests
+ * dm_test_run() - Run driver model tests
  *
  * Run all the available driver model tests, or a selection
  *
@@ -114,6 +114,6 @@  struct udevice *testbus_get_clear_removed(void);
  *	"fdt_pre_reloc"), or NULL to run all
  * @return 0 if all tests passed, 1 if not
  */
-int dm_test_main(const char *test_name);
+int dm_test_run(const char *test_name);
 
 #endif /* __TEST_TEST_H */
diff --git a/test/dm/Makefile b/test/dm/Makefile
index fd1455109d4..f5cc5540e8a 100644
--- a/test/dm/Makefile
+++ b/test/dm/Makefile
@@ -2,7 +2,7 @@ 
 #
 # Copyright (c) 2013 Google, Inc
 
-obj-$(CONFIG_UT_DM) += test-main.o
+obj-$(CONFIG_UT_DM) += test-dm.o
 
 # Tests for particular subsystems - when enabling driver model for a new
 # subsystem you must add sandbox tests here.
diff --git a/test/dm/test-main.c b/test/dm/test-dm.c
similarity index 98%
rename from test/dm/test-main.c
rename to test/dm/test-dm.c
index 560f8d63ec6..71e9cf6e5da 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-dm.c
@@ -146,7 +146,7 @@  static bool test_matches(const char *test_name, const char *find_name)
 	return false;
 }
 
-int dm_test_main(const char *test_name)
+int dm_test_run(const char *test_name)
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test, dm_test);
 	const int n_ents = ll_entry_count(struct unit_test, dm_test);
@@ -226,5 +226,5 @@  int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	if (argc > 1)
 		test_name = argv[1];
 
-	return dm_test_main(test_name);
+	return dm_test_run(test_name);
 }