Skip to content

Commit dd9b37b

Browse files
committedSep 26, 2015
[auth] Skip unit tests if qca-ossl plugin is missing
1 parent 05a28b8 commit dd9b37b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎tests/src/core/testqgsauthconfig.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <QStringList>
2020

2121
#include "qgsapplication.h"
22+
#include "qgsauthcrypto.h"
2223
#include "qgsauthconfig.h"
2324

2425
/** \ingroup UnitTests
@@ -50,6 +51,8 @@ void TestQgsAuthConfig::initTestCase()
5051
{
5152
QgsApplication::init();
5253
QgsApplication::initQgis();
54+
if ( QgsAuthCrypto::isDisabled() )
55+
QSKIP( "QCA's qca-ossl plugin is missing, skipping test case", SkipAll );
5356
}
5457

5558
void TestQgsAuthConfig::cleanupTestCase()

‎tests/src/core/testqgsauthcrypto.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ void TestQgsAuthCrypto::initTestCase()
8282
{
8383
QgsApplication::init();
8484
QgsApplication::initQgis();
85-
QVERIFY2( !QgsAuthCrypto::isDisabled(), "QCA's qca-ossl plugin is missing, skipping test" );
85+
if ( QgsAuthCrypto::isDisabled() )
86+
QSKIP( "QCA's qca-ossl plugin is missing, skipping test case", SkipAll );
8687
}
8788

8889
void TestQgsAuthCrypto::cleanupTestCase()

0 commit comments

Comments
 (0)
Please sign in to comment.