mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-13 22:32:27 +00:00
Include log messages in unit tests (#5666)
* Include log messages in unit tests * Provide an initial time value --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
18
test/TestUtil.cpp
Normal file
18
test/TestUtil.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "SerialConsole.h"
|
||||
#include "concurrency/OSThread.h"
|
||||
#include "gps/RTC.h"
|
||||
|
||||
#include "TestUtil.h"
|
||||
|
||||
void initializeTestEnvironment()
|
||||
{
|
||||
concurrency::hasBeenSetup = true;
|
||||
consoleInit();
|
||||
#if ARCH_PORTDUINO
|
||||
struct timeval tv;
|
||||
tv.tv_sec = time(NULL);
|
||||
tv.tv_usec = 0;
|
||||
perhapsSetRTC(RTCQualityNTP, &tv);
|
||||
#endif
|
||||
concurrency::OSThread::setup();
|
||||
}
|
||||
Reference in New Issue
Block a user