Make ZNC faster in the integration test.

This is not appropriate for normal usage.
This commit is contained in:
Alexey Sokolov
2016-10-04 01:19:34 +01:00
parent 87ca820bda
commit ac0048cc01
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -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 {
+1
View File
@@ -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)