Cygwin: try a horrible hack to fix integration test with unix sockets

This commit is contained in:
Alexey Sokolov
2025-04-21 15:47:21 +01:00
parent 2af8cef4c2
commit ce0a1584ba
5 changed files with 126 additions and 1 deletions
+7 -1
View File
@@ -17,6 +17,7 @@
#include <QRegularExpression>
#include <QProcess>
#include "znctest.h"
#include "cygwin.h"
#ifndef ZNC_BIN_DIR
#define ZNC_BIN_DIR ""
@@ -76,7 +77,12 @@ Socket ZNCTest::ConnectIRCd() {
Socket ZNCTest::ConnectClient() {
m_clients.emplace_back();
QLocalSocket& sock = m_clients.back();
sock.connectToServer(m_dir.path() + "/inttest.znc");
sock.setServerName(m_dir.path() + "/inttest.znc");
#ifdef __CYGWIN__
znc_inttest_cygwin::CygwinWorkaroundLocalConnect(sock);
#else
sock.connectToServer();
#endif
[&] {
ASSERT_TRUE(sock.waitForConnected())
<< sock.errorString().toStdString();