diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2021-05-13 07:32:10 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2021-05-27 06:41:26 +0200 |
commit | 810e755c180212892dbd5a8784ffe9c99258862a (patch) | |
tree | fe60a5381fe24b4b3a210404e9dd07873aa2a9de /tests/auto/network/ssl/qdtls | |
parent | 71d242c6d38dad420bc01b14adde433146c02401 (diff) |
Fix auto-tests that are fooled by the presence of more than one plugin
It's possible that Qt is built with OpenSSL and some other backend.
The ifdefs generated are not mutually exclusive anymore, as it was
in the past. So tests should rely on the actual backend they have
working at runtime.
In the process of fixing the auto-tests, modernized feature #if-ery and
some associated compilation issues.
Fixes: QTBUG-92875
Change-Id: I2be1b924d506fd36dc4e2c6c9158b5023ff87f32
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/network/ssl/qdtls')
-rw-r--r-- | tests/auto/network/ssl/qdtls/tst_qdtls.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/network/ssl/qdtls/tst_qdtls.cpp b/tests/auto/network/ssl/qdtls/tst_qdtls.cpp index 1d9812d262..d11fc6e99a 100644 --- a/tests/auto/network/ssl/qdtls/tst_qdtls.cpp +++ b/tests/auto/network/ssl/qdtls/tst_qdtls.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -47,6 +47,8 @@ #include <QtCore/qstring.h> #include <QtCore/qlist.h> +#include "../shared/tlshelpers.h" + #include <algorithm> QT_BEGIN_NAMESPACE @@ -169,6 +171,9 @@ QT_BEGIN_NAMESPACE void tst_QDtls::initTestCase() { + if (!TlsAux::activeBackendSupportsDtls()) + QSKIP("The active TLS backend does not support DTLS"); + certDirPath = QFileInfo(QFINDTESTDATA("certs")).absolutePath(); QVERIFY(certDirPath.size() > 0); certDirPath += QDir::separator() + QStringLiteral("certs") + QDir::separator(); |