unit-test-app: don't print the list of tests by default
This reduces unit-test-app startup time when there are a lot of tests included, speeding up unit tests in CI.
This commit is contained in:
parent
024e4c4337
commit
5117364c13
1 changed files with 14 additions and 1 deletions
|
@ -257,9 +257,22 @@ static int print_test_menu(void)
|
||||||
return test_counter;
|
return test_counter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int get_test_count(void)
|
||||||
|
{
|
||||||
|
int test_counter = 0;
|
||||||
|
for (const struct test_desc_t* test = s_unity_tests_first;
|
||||||
|
test != NULL;
|
||||||
|
test = test->next)
|
||||||
|
{
|
||||||
|
++test_counter;
|
||||||
|
}
|
||||||
|
return test_counter;
|
||||||
|
}
|
||||||
|
|
||||||
void unity_run_menu()
|
void unity_run_menu()
|
||||||
{
|
{
|
||||||
int test_count = print_test_menu();
|
unity_printf("\n\nPress ENTER to see the list of tests.\n");
|
||||||
|
int test_count = get_test_count();
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
char cmdline[256] = { 0 };
|
char cmdline[256] = { 0 };
|
||||||
|
|
Loading…
Reference in a new issue