tests: app_kernel: Simplify benchmark control loop

Eliminates the loop surrounding the execution of the benchmark
components as it was not doing anything.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit is contained in:
Peter Mitsis 2023-10-17 17:54:50 -04:00 committed by Carles Cufí
commit 77cedbf630

View file

@ -57,61 +57,30 @@ K_PIPE_DEFINE(PIPE_SMALLBUFF, 256, 4);
K_PIPE_DEFINE(PIPE_BIGBUFF, 4096, 4); K_PIPE_DEFINE(PIPE_BIGBUFF, 4096, 4);
/** /**
* @brief Check for keypress * @brief Perform all benchmarks
*
* @return 1 when a keyboard key is pressed, or 0 if no keyboard support
*/
int kbhit(void)
{
return 0;
}
/**
* @brief Close output for the test
*
*/
void output_close(void)
{
}
/* no need to wait for user key press when using console */
#define WAIT_FOR_USER() {}
/**
* @brief Perform all selected benchmarks
* see config.h to select or to unselect
*
*/ */
int main(void) int main(void)
{ {
int continuously = 0;
bench_test_init(); bench_test_init();
PRINT_STRING("\n"); PRINT_STRING("\n");
do { PRINT_STRING(dashline);
PRINT_STRING(dashline); PRINT_STRING("| S I M P L E S E R V I C E "
PRINT_STRING("| S I M P L E S E R V I C E " "M E A S U R E M E N T S | nsec |\n");
"M E A S U R E M E N T S | nsec |\n"); PRINT_STRING(dashline);
PRINT_STRING(dashline); queue_test();
queue_test(); sema_test();
sema_test(); mutex_test();
mutex_test(); memorymap_test();
memorymap_test(); mailbox_test();
mailbox_test(); pipe_test();
pipe_test(); PRINT_STRING("| END OF TESTS "
PRINT_STRING("| END OF TESTS " " |\n");
" |\n"); PRINT_STRING(dashline);
PRINT_STRING(dashline); PRINT_STRING("PROJECT EXECUTION SUCCESSFUL\n");
PRINT_STRING("PROJECT EXECUTION SUCCESSFUL\n"); TC_PRINT_RUNID;
TC_PRINT_RUNID;
} while (continuously && !kbhit());
WAIT_FOR_USER();
k_thread_abort(RECVTASK); k_thread_abort(RECVTASK);
output_close();
return 0; return 0;
} }