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,40 +57,13 @@ K_PIPE_DEFINE(PIPE_SMALLBUFF, 256, 4);
K_PIPE_DEFINE(PIPE_BIGBUFF, 4096, 4);
/**
* @brief Check for keypress
*
* @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
*
* @brief Perform all benchmarks
*/
int main(void)
{
int continuously = 0;
bench_test_init();
PRINT_STRING("\n");
do {
PRINT_STRING(dashline);
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");
@ -106,12 +79,8 @@ int main(void)
PRINT_STRING(dashline);
PRINT_STRING("PROJECT EXECUTION SUCCESSFUL\n");
TC_PRINT_RUNID;
} while (continuously && !kbhit());
WAIT_FOR_USER();
k_thread_abort(RECVTASK);
output_close();
return 0;
}