mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-10 13:45:07 -05:00
Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083)
* Use new version of CI-CD Actions, checkout@v3 instead of checkout@v2 on all jobs * Use cSpell spell check, and use ubuntu-20.04 for formatting check * Add in bot formatting action * Update freertos_demo.yml and freertos_plus_demo.yml files to increase github log readability * Add in a Qemu demo onto the workflows.
This commit is contained in:
parent
537007d96c
commit
3a2f6646f0
1036 changed files with 134568 additions and 127281 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS+TCP V2.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _FREERTOS_TCP_TEST_ACCESS_DECLARE_H_
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS+TCP V2.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS+TCP V2.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS+TCP V2.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
|
|
@ -344,18 +345,18 @@ TEST( Full_FREERTOS_TCP, UDPPacketLength )
|
|||
uint16_t usPort = 65535;
|
||||
NetworkBufferDescriptor_t xNetworkBuffer;
|
||||
|
||||
/* This test fails now since there is an assert
|
||||
/* This test fails now since there is an assert
|
||||
* checking for NULL pucEthernetBuffer. Also, the
|
||||
* next tests do not run and this whole test case
|
||||
* is scrapped.
|
||||
|
||||
xNetworkBuffer.pucEthernetBuffer = NULL;
|
||||
xNetworkBuffer.xDataLength = 0;
|
||||
|
||||
xReturn = xProcessReceivedUDPPacket( &xNetworkBuffer, usPort );
|
||||
TEST_ASSERT_EQUAL_UINT32_MESSAGE( pdFAIL, xReturn, "Failed to parse 0 size packet" );
|
||||
*
|
||||
* xNetworkBuffer.pucEthernetBuffer = NULL;
|
||||
* xNetworkBuffer.xDataLength = 0;
|
||||
*
|
||||
* xReturn = xProcessReceivedUDPPacket( &xNetworkBuffer, usPort );
|
||||
* TEST_ASSERT_EQUAL_UINT32_MESSAGE( pdFAIL, xReturn, "Failed to parse 0 size packet" );
|
||||
*/
|
||||
|
||||
|
||||
|
||||
xNetworkBuffer.pucEthernetBuffer = ucBadUdpPacketA;
|
||||
xNetworkBuffer.xDataLength = sizeof( ucBadUdpPacketA );
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
@ -19,16 +19,17 @@
|
|||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file aws_test_runner.c
|
||||
* @brief The function to be called to run all the tests.
|
||||
*/
|
||||
/**
|
||||
* @file aws_test_runner.c
|
||||
* @brief The function to be called to run all the tests.
|
||||
*/
|
||||
|
||||
/* Test runner interface includes. */
|
||||
/* Test runner interface includes. */
|
||||
#include "test_runner.h"
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
|
|
@ -39,7 +40,7 @@
|
|||
#include "unity_fixture.h"
|
||||
#include "unity_internals.h"
|
||||
|
||||
char cBuffer[testrunnerBUFFER_SIZE];
|
||||
char cBuffer[ testrunnerBUFFER_SIZE ];
|
||||
|
||||
/* Heap leak variables. */
|
||||
unsigned int xHeapBefore;
|
||||
|
|
@ -50,16 +51,16 @@ unsigned int xHeapAfter;
|
|||
* do not change the signature of it. You could, however, add or remove
|
||||
* RUN_TEST_GROUP statements.
|
||||
*/
|
||||
static void RunTests(void)
|
||||
static void RunTests( void )
|
||||
{
|
||||
RUN_TEST_GROUP(Full_FREERTOS_TCP);
|
||||
RUN_TEST_GROUP( Full_FREERTOS_TCP );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void TEST_RUNNER_RunTests_task(void* pvParameters)
|
||||
void TEST_RUNNER_RunTests_task( void * pvParameters )
|
||||
{
|
||||
/* Disable unused parameter warning. */
|
||||
(void)pvParameters;
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Initialize unity. */
|
||||
UnityFixture.Verbose = 1;
|
||||
|
|
@ -70,39 +71,39 @@ void TEST_RUNNER_RunTests_task(void* pvParameters)
|
|||
UNITY_BEGIN();
|
||||
|
||||
/* Give the print buffer time to empty */
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
vTaskDelay( pdMS_TO_TICKS( 500 ) );
|
||||
/* Measure the heap size before any tests are run. */
|
||||
#if ( testrunnerFULL_MEMORYLEAK_ENABLED == 1 )
|
||||
xHeapBefore = xPortGetFreeHeapSize();
|
||||
#endif
|
||||
#if ( testrunnerFULL_MEMORYLEAK_ENABLED == 1 )
|
||||
xHeapBefore = xPortGetFreeHeapSize();
|
||||
#endif
|
||||
|
||||
RunTests();
|
||||
|
||||
#if ( testrunnerFULL_MEMORYLEAK_ENABLED == 1 )
|
||||
#if ( testrunnerFULL_MEMORYLEAK_ENABLED == 1 )
|
||||
|
||||
/* Measure the heap size after tests are done running.
|
||||
* This test must run last. */
|
||||
/* Measure the heap size after tests are done running.
|
||||
* This test must run last. */
|
||||
|
||||
/* Perform any global resource cleanup necessary to avoid memory leaks. */
|
||||
#ifdef testrunnerMEMORYLEAK_CLEANUP
|
||||
testrunnerMEMORYLEAK_CLEANUP();
|
||||
#endif
|
||||
/* Perform any global resource cleanup necessary to avoid memory leaks. */
|
||||
#ifdef testrunnerMEMORYLEAK_CLEANUP
|
||||
testrunnerMEMORYLEAK_CLEANUP();
|
||||
#endif
|
||||
|
||||
/* Give the print buffer time to empty */
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
xHeapAfter = xPortGetFreeHeapSize();
|
||||
RUN_TEST_GROUP(Full_MemoryLeak);
|
||||
#endif /* if ( testrunnerFULL_MEMORYLEAK_ENABLED == 1 ) */
|
||||
/* Give the print buffer time to empty */
|
||||
vTaskDelay( pdMS_TO_TICKS( 500 ) );
|
||||
xHeapAfter = xPortGetFreeHeapSize();
|
||||
RUN_TEST_GROUP( Full_MemoryLeak );
|
||||
#endif /* if ( testrunnerFULL_MEMORYLEAK_ENABLED == 1 ) */
|
||||
|
||||
/* Currently disabled. Will be enabled after cleanup. */
|
||||
UNITY_END();
|
||||
|
||||
#ifdef CODE_COVERAGE
|
||||
exit(0);
|
||||
#endif
|
||||
#ifdef CODE_COVERAGE
|
||||
exit( 0 );
|
||||
#endif
|
||||
|
||||
/* This task has finished. FreeRTOS does not allow a task to run off the
|
||||
* end of its implementing function, so the task must be deleted. */
|
||||
vTaskDelete(NULL);
|
||||
vTaskDelete( NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
@ -19,42 +19,43 @@
|
|||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file aws_test_runner.h
|
||||
* @brief The function to be called to run all the tests.
|
||||
*/
|
||||
/**
|
||||
* @file aws_test_runner.h
|
||||
* @brief The function to be called to run all the tests.
|
||||
*/
|
||||
|
||||
#ifndef _TEST_RUNNER_H_
|
||||
#define _TEST_RUNNER_H_
|
||||
|
||||
#include "test_runner_config.h"
|
||||
|
||||
/*
|
||||
* @brief If set to 1, will run DQP_FR tests only.
|
||||
*/
|
||||
/*
|
||||
* @brief If set to 1, will run DQP_FR tests only.
|
||||
*/
|
||||
#ifdef testrunnerAFQP_ENABLED
|
||||
#define testrunnerTEST_FILTER "AFQP"
|
||||
#define testrunnerTEST_FILTER "AFQP"
|
||||
#else
|
||||
#define testrunnerTEST_FILTER 0
|
||||
#define testrunnerTEST_FILTER 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Size of shared array.
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @brief Size of shared array.
|
||||
*
|
||||
*/
|
||||
#define testrunnerBUFFER_SIZE ( 4000 )
|
||||
|
||||
/**
|
||||
* @brief Buffer used for all tests.
|
||||
*
|
||||
* Since tests are run in series, they can use the same memory array.
|
||||
* This makes significant heap savings.
|
||||
*/
|
||||
extern char cBuffer[testrunnerBUFFER_SIZE];
|
||||
/**
|
||||
* @brief Buffer used for all tests.
|
||||
*
|
||||
* Since tests are run in series, they can use the same memory array.
|
||||
* This makes significant heap savings.
|
||||
*/
|
||||
extern char cBuffer[ testrunnerBUFFER_SIZE ];
|
||||
|
||||
/**
|
||||
* @brief FreeRTOS heap measurement taken before tests are run.
|
||||
|
|
@ -70,7 +71,7 @@ extern unsigned int xHeapAfter;
|
|||
/**
|
||||
* @brief Runs all the tests.
|
||||
*/
|
||||
void TEST_RUNNER_RunTests_task(void* pvParameters);
|
||||
void TEST_RUNNER_RunTests_task( void * pvParameters );
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,38 +1,38 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef AWS_TEST_RUNNER_CONFIG_H
|
||||
#define AWS_TEST_RUNNER_CONFIG_H
|
||||
|
||||
/* Uncomment this line if you want to run DQP_FR tests only. */
|
||||
/* #define testrunnerAFQP_ENABLED */
|
||||
/* Uncomment this line if you want to run DQP_FR tests only. */
|
||||
/* #define testrunnerAFQP_ENABLED */
|
||||
|
||||
#define testrunnerUNSUPPORTED 0
|
||||
|
||||
#define FREERTOS_ENABLE_UNIT_TESTS 1
|
||||
#define FREERTOS_ENABLE_UNIT_TESTS 1
|
||||
|
||||
/* Unsupported tests. */
|
||||
#define testrunnerFULL_WIFI_ENABLED testrunnerUNSUPPORTED
|
||||
|
|
@ -69,8 +69,8 @@
|
|||
/* On systems using FreeRTOS+TCP (such as this one) the TCP segments must be
|
||||
* cleaned up before running the memory leak check. */
|
||||
#if ( testrunnerFULL_MEMORYLEAK_ENABLED == 1 )
|
||||
extern void vTCPSegmentCleanup();
|
||||
#define testrunnerMEMORYLEAK_CLEANUP() vTCPSegmentCleanup()
|
||||
extern void vTCPSegmentCleanup();
|
||||
#define testrunnerMEMORYLEAK_CLEANUP() vTCPSegmentCleanup()
|
||||
#endif
|
||||
|
||||
#endif /* AWS_TEST_RUNNER_CONFIG_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue