Add prints for CI (#670)

* Add prints for CI markers

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
Gaurav-Aggarwal-AWS 2021-07-28 10:44:52 -07:00 committed by GitHub
parent 5c9ab8dcce
commit 5f21507703
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1008 additions and 1015 deletions

View file

@ -72,6 +72,7 @@
#define FREERTOS_CONFIG_H
#include "clock_config.h"
#include "fsl_debug_console.h"
/*-----------------------------------------------------------
* Application specific definitions.
@ -148,5 +149,7 @@ header file. */
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
#define configKERNEL_INTERRUPT_PRIORITY 7
/* Map to the platform printf function. */
#define configPRINT_STRING( pcString ) PRINTF( pcString )
#endif /* FREERTOS_CONFIG_H */

View file

@ -175,7 +175,6 @@ unsigned long ulReceivedValue;
const unsigned long ulExpectedValue = 100UL;
const char * const pcPassMessage = "Blink\r\n";
const char * const pcFailMessage = "Unexpected value received\r\n";
extern void vSendString( const char * const pcString );
extern void vToggleLED( void );
/* Remove compiler warning about unused parameter. */
@ -192,13 +191,13 @@ extern void vToggleLED( void );
is it the expected value? If it is, toggle the LED. */
if( ulReceivedValue == ulExpectedValue )
{
vSendString( pcPassMessage );
configPRINT_STRING( pcPassMessage );
vToggleLED();
ulReceivedValue = 0U;
}
else
{
vSendString( pcFailMessage );
configPRINT_STRING( pcFailMessage );
}
}
}

View file

@ -112,6 +112,8 @@ stack. */
/* Size of the stacks to allocated for the register check tasks. */
#define mainREG_TEST_STACK_SIZE_WORDS 150
/* Success output messages. This is used by the CI - do not change. */
#define mainDEMO_SUCCESS_MESSAGE "FreeRTOS Demo SUCCESS\r\n"
/*-----------------------------------------------------------*/
/*
@ -217,17 +219,15 @@ static void prvCheckTask( void *pvParameters )
TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;
TickType_t xLastExecutionTime;
uint32_t ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;
char * const pcPassMessage = ".";
char * const pcPassMessage = mainDEMO_SUCCESS_MESSAGE;
char * pcStatusMessage = pcPassMessage;
extern void vSendString( const char * const pcString );
extern void vToggleLED( void );
/* Just to stop compiler warnings. */
( void ) pvParameters;
/* Output "pass", then an additional '.' character for each successful
loop. */
vSendString( "Pass" );
/* Demo start marker. */
configPRINT_STRING( "FreeRTOS Demo Start\r\n" );
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
works correctly. */
@ -248,86 +248,86 @@ extern void vToggleLED( void );
that they are all still running, and that none have detected an error. */
if( xAreDynamicPriorityTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Dynamic priority demo/tests.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Dynamic priority demo/tests.\r\n";
}
if( xAreBlockTimeTestTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Block time demo/tests.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Block time demo/tests.\r\n";
}
if( xAreGenericQueueTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Generic queue demo/tests.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Generic queue demo/tests.\r\n";
}
if( xAreRecursiveMutexTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Recursive mutex demo/tests.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Recursive mutex demo/tests.\r\n";
}
if( xAreTimerDemoTasksStillRunning( ( TickType_t ) xDelayPeriod ) == pdFALSE )
{
pcStatusMessage = "ERROR: Timer demo/tests.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Timer demo/tests.\r\n";
}
if( xAreEventGroupTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Event group demo/tests.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Event group demo/tests.\r\n";
}
if( xAreTaskNotificationTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Task notification demo/tests.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Task notification demo/tests.\r\n";
}
if( xAreAbortDelayTestTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Abort delay.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Abort delay.\r\n";
}
if( xAreCountingSemaphoreTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Counting semaphores.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Counting semaphores.\r\n";
}
if( xIsCreateTaskStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Suicide tasks.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Suicide tasks.\r\n";
}
if( xAreMessageBufferTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Message buffer.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Message buffer.\r\n";
}
if( xAreStreamBufferTasksStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Stream buffer.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Stream buffer.\r\n";
}
if( xIsInterruptStreamBufferDemoStillRunning() == pdFALSE )
{
pcStatusMessage = "ERROR: Stream buffer interrupt.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Stream buffer interrupt.\r\n";
}
/* Check that the register test 1 task is still running. */
if( ulLastRegTest1Value == ulRegTest1LoopCounter )
{
pcStatusMessage = "ERROR: Register test 1.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Register test 1.\r\n";
}
ulLastRegTest1Value = ulRegTest1LoopCounter;
/* Check that the register test 2 task is still running. */
if( ulLastRegTest2Value == ulRegTest2LoopCounter )
{
pcStatusMessage = "ERROR: Register test 2.\r\n";
pcStatusMessage = "FreeRTOS Demo ERROR: Register test 2.\r\n";
}
ulLastRegTest2Value = ulRegTest2LoopCounter;
/* Write the status message to the UART. */
vToggleLED();
vSendString( pcStatusMessage );
configPRINT_STRING( pcStatusMessage );
/* If an error has been found then increase the LED toggle rate by
increasing the cycle frequency. */

View file

@ -89,9 +89,6 @@ void vApplicationTickHook( void );
/* Prepare hardware to run the demo. */
static void prvSetupHardware( void );
/* Send a message to the UART initialised in prvSetupHardware. */
void vSendString( const char * const pcString );
/*-----------------------------------------------------------*/
void main( void )
@ -134,12 +131,6 @@ void vToggleLED( void )
}
/*-----------------------------------------------------------*/
void vSendString( const char * const pcString )
{
PRINTF( pcString );
}
/*-----------------------------------------------------------*/
void vApplicationMallocFailedHook( void )
{
/* vApplicationMallocFailedHook() will only be called if