Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/ci/host_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ for i in ../../libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient \
../../libraries/ESP8266WebServer/examples/HelloServer/HelloServer \
../../libraries/SD/examples/Files/Files \
../../libraries/LittleFS/examples/LittleFS_Timestamp/LittleFS_Timestamp \
../../libraries/LittleFS/examples/SpeedTest/SpeedTest ; do
../../libraries/LittleFS/examples/SpeedTest/SpeedTest \
../../libraries/DNSServer/examples/DNSServer/DNSServer ; do
make -j2 D=1 FORCE32=0 $i
valgrind --leak-check=full --track-origins=yes --error-limit=no --show-leak-kinds=all --error-exitcode=999 bin/$(basename $i)/$(basename $i) -1
done
Expand Down
1 change: 1 addition & 0 deletions tests/host/common/ArduinoMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ static struct option options[] = {

void cleanup()
{
mock_stop_udp();
mock_stop_spiffs();
mock_stop_littlefs();
mock_stop_uart();
Expand Down
7 changes: 6 additions & 1 deletion tests/host/common/ArduinoMainUdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <poll.h>
#include <map>

std::map<int, UdpContext*> udps;
static std::map<int, UdpContext*> udps;

void register_udp(int sock, UdpContext* udp)
{
Expand All @@ -58,3 +58,8 @@ void check_incoming_udp()
}
}
}

void mock_stop_udp()
{
udps.clear();
}
1 change: 1 addition & 0 deletions tests/host/common/mock.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ void mockUDPSwallow(size_t copied, char* ccinbuf, size_t& ccinbufsize);

class UdpContext;
void register_udp(int sock, UdpContext* udp = nullptr);
void mock_stop_udp();

//

Expand Down