Add Project for running integration tests v2 (#80)

* Project for integration tests

* relative paths in project files

* relative paths in project files-1

* relative paths in project files-2

* addressed comments

* addressed comments v2

Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
This commit is contained in:
Aniruddha Kanhere
2020-06-02 15:09:25 -07:00
committed by GitHub
co-authored by Yuhui Zheng
parent 0eb5909fb0
commit 6efc39f44b
42 changed files with 12888 additions and 15 deletions
@@ -1766,6 +1766,6 @@ BaseType_t xReturn;
/*-----------------------------------------------------------*/
/* Provide access to private members for testing. */
#ifdef AMAZON_FREERTOS_ENABLE_UNIT_TESTS
#include "iot_freertos_tcp_test_access_dns_define.h"
#ifdef FREERTOS_ENABLE_UNIT_TESTS
#include "freertos_tcp_test_access_dns_define.h"
#endif
@@ -3494,8 +3494,8 @@ const ListItem_t *pxEndTCP = ipPOINTER_CAST( const ListItem_t *, listGET_END_MAR
#endif /* ipconfigUSE_TCP == 1 */
/* Provide access to private members for testing. */
#ifdef AMAZON_FREERTOS_ENABLE_UNIT_TESTS
#include "iot_freertos_tcp_test_access_tcp_define.h"
#ifdef FREERTOS_ENABLE_UNIT_TESTS
#include "freertos_tcp_test_access_tcp_define.h"
#endif
/* Provide access to private members for verification. */
@@ -23,8 +23,14 @@
* http://www.FreeRTOS.org
*/
#ifndef _AWS_FREERTOS_TCP_TEST_ACCESS_DECLARE_H_
#define _AWS_FREERTOS_TCP_TEST_ACCESS_DECLARE_H_
#ifndef _FREERTOS_TCP_TEST_ACCESS_DECLARE_H_
#define _FREERTOS_TCP_TEST_ACCESS_DECLARE_H_
#include <stdint.h>
#include "FreeRTOS.h"
#include "FreeRTOS_IP_Private.h"
#include "FreeRTOS_IP.h"
#include "portmacro.h"
uint32_t TEST_FreeRTOS_TCP_prvParseDNSReply( uint8_t * pucUDPPayloadBuffer,
size_t xBufferLength,
@@ -35,4 +41,4 @@ void TEST_FreeRTOS_TCP_prvCheckOptions( FreeRTOS_Socket_t * pxSocket,
void TEST_FreeRTOS_TCP_prvTCPCreateWindow( FreeRTOS_Socket_t * pxSocket );
#endif /* ifndef _AWS_FREERTOS_TCP_TEST_ACCESS_DECLARE_H_ */
#endif /* ifndef _FREERTOS_TCP_TEST_ACCESS_DECLARE_H_ */
@@ -30,10 +30,10 @@
* Needed for testing private functions.
*/
#ifndef _AWS_FREERTOS_TCP_TEST_ACCESS_DNS_DEFINE_H_
#define _AWS_FREERTOS_TCP_TEST_ACCESS_DNS_DEFINE_H_
#ifndef _FREERTOS_TCP_TEST_ACCESS_DNS_DEFINE_H_
#define _FREERTOS_TCP_TEST_ACCESS_DNS_DEFINE_H_
#include "iot_freertos_tcp_test_access_declare.h"
#include "freertos_tcp_test_access_declare.h"
/*-----------------------------------------------------------*/
@@ -30,10 +30,10 @@
* Needed for testing private functions.
*/
#ifndef _AWS_FREERTOS_TCP_TEST_ACCESS_TCP_DEFINE_H_
#define _AWS_FREERTOS_TCP_TEST_ACCESS_TCP_DEFINE_H_
#ifndef _FREERTOS_TCP_TEST_ACCESS_TCP_DEFINE_H_
#define _FREERTOS_TCP_TEST_ACCESS_TCP_DEFINE_H_
#include "iot_freertos_tcp_test_access_declare.h"
#include "freertos_tcp_test_access_declare.h"
/*-----------------------------------------------------------*/
@@ -38,7 +38,7 @@
/* Test includes. */
#include "unity_fixture.h"
#include "unity.h"
#include "iot_freertos_tcp_test_access_declare.h"
#include "freertos_tcp_test_access_declare.h"
/**
* @brief Configuration for this test group.
@@ -93,7 +93,7 @@ TEST( Full_FREERTOS_TCP, prvParseDnsResponse )
0x23, 0x00, 0x04, 0x22, 0xd7, 0xe6, 0xa4, 0xc0, 0x72, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
0x23, 0x00, 0x04, 0x36, 0x95, 0x5e, 0x45
};
const uint32_t ulExpectedAddress = 0xdb41d322;
const uint32_t ulExpectedAddress = 0xf0f5d622;
uint8_t ucBadDnsResponseA[] =
{
0x3b, 0x6a, 0x81, 0x83, 0x01, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x09, 0x69, 0x6e, 0x73,
@@ -344,11 +344,18 @@ TEST( Full_FREERTOS_TCP, UDPPacketLength )
uint16_t usPort = 65535;
NetworkBufferDescriptor_t xNetworkBuffer;
/* 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 = ucBadUdpPacketA;
xNetworkBuffer.xDataLength = sizeof( ucBadUdpPacketA );