mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
[Autotests] Correctly link to KDE/Gnome password plugins
Also make PACTest pass by fixing qupzilla.com IP.
This commit is contained in:
parent
91f0c40691
commit
865fd034a3
@ -10,17 +10,23 @@ TARGET = autotests
|
|||||||
!unix|mac: LIBS += -L$$PWD/../../bin -lQupZilla
|
!unix|mac: LIBS += -L$$PWD/../../bin -lQupZilla
|
||||||
!mac:unix: LIBS += $$PWD/../../bin/libQupZilla.so
|
!mac:unix: LIBS += $$PWD/../../bin/libQupZilla.so
|
||||||
|
|
||||||
# Link plugins for PasswordBackends
|
|
||||||
!win32 {
|
|
||||||
!unix|mac: LIBS += -L$$PWD/../../bin/plugins -lGnomeKeyringPasswords -lKWalletPasswords
|
|
||||||
!mac:unix: LIBS += $$PWD/../../bin/plugins/libGnomeKeyringPasswords.so \
|
|
||||||
$$PWD/../../bin/plugins/libKWalletPasswords.so
|
|
||||||
}
|
|
||||||
|
|
||||||
unix:contains(DEFINES, "NO_SYSTEM_DATAPATH"): QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}\\$\$ORIGIN
|
unix:contains(DEFINES, "NO_SYSTEM_DATAPATH"): QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}\\$\$ORIGIN
|
||||||
|
|
||||||
include($$PWD/../../src/defines.pri)
|
include($$PWD/../../src/defines.pri)
|
||||||
|
|
||||||
|
# KWallet plugin
|
||||||
|
exists($$PWD/../../bin/plugins/libKWalletPasswords.so) {
|
||||||
|
LIBS += $$PWD/../../bin/plugins/libKWalletPasswords.so
|
||||||
|
DEFINES += HAVE_KDE_PASSWORDS_PLUGIN
|
||||||
|
}
|
||||||
|
|
||||||
|
# GnomeKeyring plugin
|
||||||
|
exists($$PWD/../../bin/plugins/libGnomeKeyringPasswords.so) {
|
||||||
|
LIBS += $$PWD/../../bin/plugins/libGnomeKeyringPasswords.so
|
||||||
|
DEFINES += HAVE_GNOME_PASSWORDS_PLUGIN
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DESTDIR = $$PWD/../../bin
|
DESTDIR = $$PWD/../../bin
|
||||||
OBJECTS_DIR = build
|
OBJECTS_DIR = build
|
||||||
MOC_DIR = build
|
MOC_DIR = build
|
||||||
|
@ -49,8 +49,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
RUN_TEST(DatabasePasswordBackendTest)
|
RUN_TEST(DatabasePasswordBackendTest)
|
||||||
RUN_TEST(DatabaseEncryptedPasswordBackendTest)
|
RUN_TEST(DatabaseEncryptedPasswordBackendTest)
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
|
#ifdef HAVE_KDE_PASSWORDS_PLUGIN
|
||||||
RUN_TEST(KWalletPasswordBackendTest)
|
RUN_TEST(KWalletPasswordBackendTest)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_GNOME_PASSWORDS_PLUGIN
|
||||||
RUN_TEST(GnomeKeyringPasswordBackendTest)
|
RUN_TEST(GnomeKeyringPasswordBackendTest)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -135,9 +135,9 @@ void PacTest::isInNetTest_data()
|
|||||||
QTest::newRow("doc2-3") << "128.94.249.79" << "198.95.0.0" << "255.255.0.0" << false;
|
QTest::newRow("doc2-3") << "128.94.249.79" << "198.95.0.0" << "255.255.0.0" << false;
|
||||||
QTest::newRow("doc2-3") << "23.94.249.79" << "198.95.0.0" << "255.255.0.0" << false;
|
QTest::newRow("doc2-3") << "23.94.249.79" << "198.95.0.0" << "255.255.0.0" << false;
|
||||||
|
|
||||||
// is true if the IP address of host matches 88.208.118.* (qupzilla.com)
|
// is true if the IP address of host matches 85.118.128.* (qupzilla.com)
|
||||||
// if host is passed as hostname, the function needs to resolve it
|
// if host is passed as hostname, the function needs to resolve it
|
||||||
QTest::newRow("resolve1") << "qupzilla.com" << "88.208.118.158" << "255.255.255.0" << true;
|
QTest::newRow("resolve1") << "qupzilla.com" << "85.118.128.38" << "255.255.255.0" << true;
|
||||||
QTest::newRow("resolve1-2") << "yahoo.com" << "173.194.70.0" << "255.255.255.0" << false;
|
QTest::newRow("resolve1-2") << "yahoo.com" << "173.194.70.0" << "255.255.255.0" << false;
|
||||||
QTest::newRow("resolve1-3") << "netscape.com" << "173.194.70.0" << "255.255.255.0" << false;
|
QTest::newRow("resolve1-3") << "netscape.com" << "173.194.70.0" << "255.255.255.0" << false;
|
||||||
QTest::newRow("resolve1-4") << "mozilla.com" << "173.194.70.0" << "255.255.255.0" << false;
|
QTest::newRow("resolve1-4") << "mozilla.com" << "173.194.70.0" << "255.255.255.0" << false;
|
||||||
@ -160,7 +160,7 @@ void PacTest::dnsResolveTest_data()
|
|||||||
QTest::addColumn<QString>("result");
|
QTest::addColumn<QString>("result");
|
||||||
|
|
||||||
QTest::newRow("localhost") << "localhost" << "127.0.0.1";
|
QTest::newRow("localhost") << "localhost" << "127.0.0.1";
|
||||||
QTest::newRow("qz") << "qupzilla.com" << "88.208.118.158"; // This may change...
|
QTest::newRow("qz") << "qupzilla.com" << "85.118.128.38"; // This may change...
|
||||||
}
|
}
|
||||||
|
|
||||||
void PacTest::dnsResolveTest()
|
void PacTest::dnsResolveTest()
|
||||||
|
@ -267,15 +267,16 @@ void DatabaseEncryptedPasswordBackendTest::cleanup()
|
|||||||
QSqlDatabase::removeDatabase(QSqlDatabase::database().databaseName());
|
QSqlDatabase::removeDatabase(QSqlDatabase::database().databaseName());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef Q_OS_WIN
|
#ifdef HAVE_KDE_PASSWORDS_PLUGIN
|
||||||
// KWalletPassswordBackendTest
|
// KWalletPassswordBackendTest
|
||||||
void KWalletPasswordBackendTest::reloadBackend()
|
void KWalletPasswordBackendTest::reloadBackend()
|
||||||
{
|
{
|
||||||
delete m_backend;
|
delete m_backend;
|
||||||
m_backend = new KWalletPasswordBackend;
|
m_backend = new KWalletPasswordBackend;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_GNOME_PASSWORDS_PLUGIN
|
||||||
// GnomeKeyringPassswordBackendTest
|
// GnomeKeyringPassswordBackendTest
|
||||||
void GnomeKeyringPasswordBackendTest::reloadBackend()
|
void GnomeKeyringPasswordBackendTest::reloadBackend()
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ protected:
|
|||||||
void cleanup();
|
void cleanup();
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef Q_OS_WIN
|
#ifdef HAVE_KDE_PASSWORDS_PLUGIN
|
||||||
#include "../../src/plugins/KWalletPasswords/kwalletpasswordbackend.h"
|
#include "../../src/plugins/KWalletPasswords/kwalletpasswordbackend.h"
|
||||||
|
|
||||||
class KWalletPasswordBackendTest : public PasswordBackendTest
|
class KWalletPasswordBackendTest : public PasswordBackendTest
|
||||||
@ -85,7 +85,9 @@ class KWalletPasswordBackendTest : public PasswordBackendTest
|
|||||||
protected:
|
protected:
|
||||||
void reloadBackend();
|
void reloadBackend();
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_GNOME_PASSWORDS_PLUGIN
|
||||||
#include "../../src/plugins/GnomeKeyringPasswords/gnomekeyringpasswordbackend.h"
|
#include "../../src/plugins/GnomeKeyringPasswords/gnomekeyringpasswordbackend.h"
|
||||||
|
|
||||||
class GnomeKeyringPasswordBackendTest : public PasswordBackendTest
|
class GnomeKeyringPasswordBackendTest : public PasswordBackendTest
|
||||||
|
Loading…
Reference in New Issue
Block a user