mirror of
https://github.com/espressif/esp-lwip.git
synced 2025-08-06 18:23:42 +08:00
fix the poll define and run standard lwip unit tests
This commit is contained in:
32
.gitlab-ci.yml
Normal file
32
.gitlab-ci.yml
Normal file
@ -0,0 +1,32 @@
|
||||
stages:
|
||||
- host_test
|
||||
image: ${CI_DOCKER_REGISTRY}/esp32-ci-env
|
||||
|
||||
variables:
|
||||
# tag in lwip-contrib repo, which supports our esp-lwip branch (and it's cherry-picked commits from release branches)
|
||||
LWIP_CONTRIB_TAG: STABLE-2_1_0_RELEASE
|
||||
# test timeout is seconds
|
||||
TEST_TIMEOUT: 200
|
||||
|
||||
before_script:
|
||||
# Use CI Tools
|
||||
- curl -sSL ${CIT_LOADER_URL} | sh
|
||||
- source citools/import_functions
|
||||
|
||||
run_lwip_unittests:
|
||||
stage: host_test
|
||||
tags:
|
||||
- host_test
|
||||
dependencies: []
|
||||
script:
|
||||
# have to clone lwip-contrib repo, as it contains unit test infrastructure
|
||||
- cit_add_ssh_key "${GITLAB_KEY}" "$(cit_parse_url_host ${LWIP_CONTRIB_MIRROR})" "$(cit_parse_url_port ${LWIP_CONTRIB_MIRROR})"
|
||||
- git clone "${LWIP_CONTRIB_MIRROR}" lwip-contrib && cd lwip-contrib && git checkout tags/${LWIP_CONTRIB_TAG}
|
||||
- cd ports/unix/check/
|
||||
# updating environment
|
||||
- export LWIPDIR=../../../../src && export CK_DEFAULT_TIMEOUT=${TEST_TIMEOUT}
|
||||
- export TESTFILES=`find $LWIPDIR/../test/unit -name '*.c' | tr '\n' ' '`
|
||||
- export CFLAGS=-I$LWIPDIR/../test/unit/esp
|
||||
# build and run tests
|
||||
- make "TESTFILES=$TESTFILES" check
|
||||
|
@ -40,7 +40,7 @@
|
||||
#define LWIP_HDR_SOCKETS_H
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "sys/poll.h"
|
||||
#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/ip_addr.h"
|
||||
@ -503,6 +503,7 @@ typedef struct fd_set
|
||||
#define POLLWRNORM 0x80
|
||||
#define POLLWRBAND 0x100
|
||||
#define POLLHUP 0x200
|
||||
#ifdef NO_POLLFD
|
||||
typedef unsigned int nfds_t;
|
||||
struct pollfd
|
||||
{
|
||||
@ -510,6 +511,7 @@ struct pollfd
|
||||
short events;
|
||||
short revents;
|
||||
};
|
||||
#endif/* NO_POLLFD*/
|
||||
#endif
|
||||
|
||||
/** LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided
|
||||
|
Reference in New Issue
Block a user