mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
Make ZNC faster in the integration test.
This is not appropriate for normal usage.
This commit is contained in:
@@ -104,6 +104,12 @@ CTimer::CTimer(CModule* pModule, unsigned int uInterval, unsigned int uCycles,
|
||||
: CCron(), m_pModule(pModule), m_sDescription(sDescription) {
|
||||
SetName(sLabel);
|
||||
|
||||
// Make integration test faster
|
||||
char* szDebugTimer = getenv("ZNC_DEBUG_TIMER");
|
||||
if (szDebugTimer && *szDebugTimer == '1') {
|
||||
uInterval = std::max(1u, uInterval / 4u);
|
||||
}
|
||||
|
||||
if (uCycles) {
|
||||
StartMaxCycles(uInterval, uCycles);
|
||||
} else {
|
||||
|
||||
@@ -128,6 +128,7 @@ class Process : public IO<QProcess> {
|
||||
std::function<void(QProcess*)> setup = [](QProcess*) {})
|
||||
: IO(&m_proc, true) {
|
||||
auto env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("ZNC_DEBUG_TIMER", "1");
|
||||
// Default exit codes of sanitizers upon error:
|
||||
// ASAN - 1
|
||||
// LSAN - 23 (part of ASAN, but uses a different value)
|
||||
|
||||
Reference in New Issue
Block a user