Skip to content

Commit

Permalink
common: an option to run all tests from command line (debbuger)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Feb 27, 2024
1 parent bbe8082 commit f04cc47
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/unittest/unittest.h
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,16 @@ TEST_CASE_PROCESS(int argc, char *argv[],
if (argc < 2)
UT_FATAL("usage: %s <test case> [<args>]", argv[0]);

if (strcmp("ALL", argv[1]) == 0) {
for (size_t i = 0; i < ntests; i++) {
int ret = test_cases[i].func(&test_cases[i], 0, NULL);
if (ret < 0)
UT_FATAL("Test %s return negative result",
test_cases[i].name);
}
return;
}

for (int i = 1; i < argc; i++) {
char *str_test = argv[i];
const int args_off = i + 1;
Expand Down

0 comments on commit f04cc47

Please sign in to comment.