mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Merge PR #3295: Disable SRV tests when running on Wine
This commit is contained in:
commit
820ee72eca
21
src/PlatformCheck.cpp
Normal file
21
src/PlatformCheck.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright 2005-2018 The Mumble Developers. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license
|
||||
// that can be found in the LICENSE file at the root of the
|
||||
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
#include "murmur_pch.h"
|
||||
|
||||
#include <QtCore/QLibrary>
|
||||
|
||||
#include "PlatformCheck.h"
|
||||
|
||||
bool PlatformCheck::IsWine() {
|
||||
#ifdef Q_OS_WIN
|
||||
// Detect if we're running under Wine.
|
||||
// For more info, see https://wiki.winehq.org/Developer_FAQ#How_can_I_detect_Wine.3F
|
||||
if (QLibrary::resolve(QLatin1String("ntdll.dll"), "wine_get_version") != NULL) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
16
src/PlatformCheck.h
Normal file
16
src/PlatformCheck.h
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2005-2018 The Mumble Developers. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license
|
||||
// that can be found in the LICENSE file at the root of the
|
||||
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
#ifndef MUMBLE_PLATFORMCHECK_H_
|
||||
#define MUMBLE_PLATFORMCHECK_H_
|
||||
|
||||
/// PlatformCheck performs platform checks.
|
||||
class PlatformCheck {
|
||||
public:
|
||||
/// IsWine returns true when running under Wine.
|
||||
static bool IsWine();
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -8,5 +8,5 @@ include(../test.pri)
|
||||
QT *= network
|
||||
|
||||
TARGET = TestCrypt
|
||||
HEADERS = SSL.h SSLLocks.h Timer.h CryptState.h
|
||||
SOURCES = SSL.cpp SSLLocks.cpp TestCrypt.cpp CryptState.cpp Timer.cpp
|
||||
HEADERS *= SSL.h SSLLocks.h Timer.h CryptState.h
|
||||
SOURCES *= SSL.cpp SSLLocks.cpp TestCrypt.cpp CryptState.cpp Timer.cpp
|
||||
|
||||
@ -8,5 +8,5 @@ include(../test.pri)
|
||||
QT += network
|
||||
|
||||
TARGET = TestCryptographicHash
|
||||
SOURCES = SSL.cpp SSLLocks.cpp TestCryptographicHash.cpp CryptographicHash.cpp
|
||||
HEADERS = SSL.h SSLLocks.h CryptographicHash.h
|
||||
SOURCES *= SSL.cpp SSLLocks.cpp TestCryptographicHash.cpp CryptographicHash.cpp
|
||||
HEADERS *= SSL.h SSLLocks.h CryptographicHash.h
|
||||
|
||||
@ -8,8 +8,8 @@ include(../test.pri)
|
||||
QT += network
|
||||
|
||||
TARGET = TestCryptographicRandom
|
||||
SOURCES = SSL.cpp SSLLocks.cpp TestCryptographicRandom.cpp CryptographicRandom.cpp arc4random_uniform.cpp
|
||||
HEADERS = SSL.h SSLLocks.h CryptographicHash.h
|
||||
SOURCES *= SSL.cpp SSLLocks.cpp TestCryptographicRandom.cpp CryptographicRandom.cpp arc4random_uniform.cpp
|
||||
HEADERS *= SSL.h SSLLocks.h CryptographicHash.h
|
||||
|
||||
VPATH *= ../../../3rdparty/arc4random-src
|
||||
INCLUDEPATH *= ../../../3rdparty/arc4random-src
|
||||
|
||||
@ -16,5 +16,5 @@ QT += network
|
||||
}
|
||||
|
||||
TARGET = TestFFDHE
|
||||
SOURCES = SSL.cpp SSLLocks.cpp FFDHE.cpp TestFFDHE.cpp
|
||||
HEADERS = SSL.h SSLLocks.h FFDHE.h FFDHETable.h
|
||||
SOURCES *= SSL.cpp SSLLocks.cpp FFDHE.cpp TestFFDHE.cpp
|
||||
HEADERS *= SSL.h SSLLocks.h FFDHE.h FFDHETable.h
|
||||
|
||||
@ -8,4 +8,4 @@ include(../test.pri)
|
||||
QT *= network
|
||||
|
||||
TARGET = TestPacketDataStream
|
||||
SOURCES = TestPacketDataStream.cpp
|
||||
SOURCES *= TestPacketDataStream.cpp
|
||||
|
||||
@ -8,8 +8,8 @@ include(../test.pri)
|
||||
QT += network
|
||||
|
||||
TARGET = TestPasswordGenerator
|
||||
SOURCES = SSL.cpp SSLLocks.cpp TestPasswordGenerator.cpp PasswordGenerator.cpp CryptographicRandom.cpp arc4random_uniform.cpp
|
||||
HEADERS = SSL.h SSLLocks.h PasswordGenerator.h CryptographicHash.h
|
||||
SOURCES *= SSL.cpp SSLLocks.cpp TestPasswordGenerator.cpp PasswordGenerator.cpp CryptographicRandom.cpp arc4random_uniform.cpp
|
||||
HEADERS *= SSL.h SSLLocks.h PasswordGenerator.h CryptographicHash.h
|
||||
|
||||
VPATH *= ../../../3rdparty/arc4random-src
|
||||
INCLUDEPATH *= ../../../3rdparty/arc4random-src
|
||||
|
||||
@ -8,5 +8,5 @@ include(../test.pri)
|
||||
QT += network
|
||||
|
||||
TARGET = TestSSLLocks
|
||||
SOURCES = SSL.cpp SSLLocks.cpp TestSSLLocks.cpp
|
||||
HEADERS = SSL.h SSLLocks.h
|
||||
SOURCES *= SSL.cpp SSLLocks.cpp TestSSLLocks.cpp
|
||||
HEADERS *= SSL.h SSLLocks.h
|
||||
|
||||
@ -9,5 +9,5 @@ include(../../../qmake/qt.pri)
|
||||
QT *= network
|
||||
|
||||
TARGET = TestSelfSignedCertificate
|
||||
SOURCES = SSL.cpp SSLLocks.cpp TestSelfSignedCertificate.cpp SelfSignedCertificate.cpp
|
||||
HEADERS = SSL.h SSLLocks.h SelfSignedCertificate.h
|
||||
SOURCES *= SSL.cpp SSLLocks.cpp TestSelfSignedCertificate.cpp SelfSignedCertificate.cpp
|
||||
HEADERS *= SSL.h SSLLocks.h SelfSignedCertificate.h
|
||||
|
||||
@ -8,5 +8,5 @@ include(../test.pri)
|
||||
QT += network
|
||||
|
||||
TARGET = TestServerAddress
|
||||
SOURCES = TestServerAddress.cpp ServerAddress.cpp HostAddress.cpp
|
||||
HEADERS = ServerAddress.h HostAddress.h
|
||||
SOURCES *= TestServerAddress.cpp ServerAddress.cpp HostAddress.cpp
|
||||
HEADERS *= ServerAddress.h HostAddress.h
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#include <QSignalSpy>
|
||||
|
||||
#include "ServerResolver.h"
|
||||
#include "PlatformCheck.h"
|
||||
|
||||
void signalSpyWait(QSignalSpy &spy) {
|
||||
// We increase the timeout from 5s to 8s because travis builds could fail otherwise (slow network response).
|
||||
@ -36,6 +37,12 @@ void TestServerResolver::simpleSrv() {
|
||||
return;
|
||||
#endif
|
||||
|
||||
// Qt 5's SRV resolver does not work in Wine.
|
||||
// For more info, see https://bugs.winehq.org/show_bug.cgi?id=44296
|
||||
if (PlatformCheck::IsWine()) {
|
||||
return;
|
||||
}
|
||||
|
||||
ServerResolver r;
|
||||
QSignalSpy spy(&r, SIGNAL(resolved()));
|
||||
|
||||
@ -83,6 +90,12 @@ void TestServerResolver::srvCustomPort() {
|
||||
return;
|
||||
#endif
|
||||
|
||||
// Qt 5's SRV resolver does not work in Wine.
|
||||
// For more info, see https://bugs.winehq.org/show_bug.cgi?id=44296
|
||||
if (PlatformCheck::IsWine()) {
|
||||
return;
|
||||
}
|
||||
|
||||
ServerResolver r;
|
||||
QSignalSpy spy(&r, SIGNAL(resolved()));
|
||||
|
||||
|
||||
@ -9,8 +9,8 @@ include(../../../qmake/qt.pri)
|
||||
QT *= network
|
||||
|
||||
TARGET = TestServerResolver
|
||||
SOURCES = TestServerResolver.cpp HostAddress.cpp ServerResolver_qt5.cpp ServerResolverRecord.cpp
|
||||
HEADERS = HostAddress.h ServerResolver.h ServerResolverRecord.h
|
||||
SOURCES *= TestServerResolver.cpp HostAddress.cpp ServerResolver_qt5.cpp ServerResolverRecord.cpp
|
||||
HEADERS *= HostAddress.h ServerResolver.h ServerResolverRecord.h
|
||||
|
||||
isEqual(QT_MAJOR_VERSION, 4) {
|
||||
CONFIG *= no-srv
|
||||
|
||||
@ -6,4 +6,4 @@
|
||||
include(../test.pri)
|
||||
|
||||
TARGET = TestStdAbs
|
||||
SOURCES = TestStdAbs.cpp
|
||||
SOURCES *= TestStdAbs.cpp
|
||||
|
||||
@ -6,5 +6,5 @@
|
||||
include(../test.pri)
|
||||
|
||||
TARGET = TestTimer
|
||||
SOURCES = TestTimer.cpp Timer.cpp
|
||||
HEADERS = Timer.h
|
||||
SOURCES *= TestTimer.cpp Timer.cpp
|
||||
HEADERS *= Timer.h
|
||||
|
||||
@ -6,5 +6,5 @@
|
||||
include(../test.pri)
|
||||
|
||||
TARGET = TestUnresolvedServerAddress
|
||||
SOURCES = TestUnresolvedServerAddress.cpp UnresolvedServerAddress.cpp
|
||||
HEADERS = UnresolvedServerAddress.h
|
||||
SOURCES *= TestUnresolvedServerAddress.cpp UnresolvedServerAddress.cpp
|
||||
HEADERS *= UnresolvedServerAddress.h
|
||||
|
||||
@ -6,5 +6,5 @@
|
||||
include(../test.pri)
|
||||
|
||||
TARGET = TestXMLTools
|
||||
HEADERS = XMLTools.h
|
||||
SOURCES = TestXMLTools.cpp XMLTools.cpp
|
||||
HEADERS *= XMLTools.h
|
||||
SOURCES *= TestXMLTools.cpp XMLTools.cpp
|
||||
|
||||
@ -27,6 +27,9 @@ LANGUAGE = C++
|
||||
VPATH *= ../.. ../../murmur ../../mumble
|
||||
INCLUDEPATH *= ../.. ../../murmur ../../mumble
|
||||
|
||||
SOURCES += PlatformCheck.cpp
|
||||
HEADERS += PlatformCheck.h
|
||||
|
||||
# We have to depend on OpenSSL in all tests
|
||||
# for no-pch builds to work. Our PCH headers
|
||||
# include OpenSSL, and if the headers aren't
|
||||
|
||||
Loading…
Reference in New Issue
Block a user