From 4ad4edfe77fce829c54d9a804e037923e7474451 Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Tue, 17 Dec 2019 19:07:04 +0100 Subject: cmd_ut: add a parameter prefix to the function cmd_ut_category There is black magic in the file conftest.py that list all the test unit. Then, all those test unit are called in pytest. This call is done with the end of the name (for example checksum if the full name is bloblist_test_checksum). The result is that only test for dm are really executed. by pytest, all others tests are listed but never executed. This behaviour happens because the dm test unit only check the end of the name and others tests checks the full name. To fix this issue, I've added a prefix to the function cmd_ut_category, and this prefix is removed when looking for the unit test. Signed-off-by: Philippe Reynes Tested-by: Heinrich Schuchardt --- test/lib/cmd_ut_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/lib') diff --git a/test/lib/cmd_ut_lib.c b/test/lib/cmd_ut_lib.c index eb90e53914..c73e8d7b05 100644 --- a/test/lib/cmd_ut_lib.c +++ b/test/lib/cmd_ut_lib.c @@ -16,5 +16,5 @@ int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) struct unit_test *tests = ll_entry_start(struct unit_test, lib_test); const int n_ents = ll_entry_count(struct unit_test, lib_test); - return cmd_ut_category("lib", tests, n_ents, argc, argv); + return cmd_ut_category("lib", "lib_test_", tests, n_ents, argc, argv); } -- cgit v1.2.3