Restore ASN.1 Element tests after move to plugin

When SSL backends were broken out as plugins, various tests were
suppressed since the code they test is now in a plugin, no longer part
of the network libraries.

The ASN.1 test is, however, fairly self-contained, so just compile it
with the relevant plugin sources (which are likewise self-contained)
and brute-force the paths to line up for the test.

Task-number: QTBUG-46843
Change-Id: I778489e68b7361a7fd55c88d2a35257ad6a58c46
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Edward Welbourne 2023-11-09 17:21:39 +01:00
parent 0e528f2976
commit 4f05ffeb41
3 changed files with 7 additions and 2 deletions

View File

@ -13,7 +13,7 @@ if(QT_FEATURE_private_tests AND QT_FEATURE_ssl)
add_subdirectory(qsslsocket)
add_subdirectory(qsslsocket_onDemandCertificates_member)
add_subdirectory(qsslsocket_onDemandCertificates_static)
# add_subdirectory(qasn1element)
add_subdirectory(qasn1element)
add_subdirectory(qssldiffiehellmanparameters)
add_subdirectory(qsslserver)
endif()

View File

@ -14,7 +14,12 @@ endif()
qt_internal_add_test(tst_qasn1element
SOURCES
tst_qasn1element.cpp
../../../../../src/plugins/tls/shared/qasn1element_p.h
../../../../../src/plugins/tls/shared/qasn1element.cpp
INCLUDE_DIRECTORIES
../../../../../src/plugins/tls/shared
LIBRARIES
Qt::Core
Qt::Network
Qt::NetworkPrivate
BUNDLE_ANDROID_OPENSSL_LIBS

View File

@ -1,7 +1,7 @@
// Copyright (C) 2014 Jeremy Lainé <jeremy.laine@m4x.org>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "private/qasn1element_p.h"
#include "qasn1element_p.h"
#include <QTest>