diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index c02e57448..08d5d421d 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -8,8 +8,7 @@ if [ -n "$1" ]; then fi cd ../tests/autotests -($QMAKE DEFINES+=NO_SYSTEM_DATAPATH && make) || exit 1 -cd ../../bin +($QMAKE && make) || exit 1 ./autotests exit $? diff --git a/tests/autotests/autotests b/tests/autotests/autotests new file mode 100755 index 000000000..3fce64076 Binary files /dev/null and b/tests/autotests/autotests differ diff --git a/tests/autotests/autotests.pro b/tests/autotests/autotests.pro index 881f7aa99..c57850044 100644 --- a/tests/autotests/autotests.pro +++ b/tests/autotests/autotests.pro @@ -12,10 +12,10 @@ TARGET = autotests !unix|mac: LIBS += -L$$PWD/../../bin -lQupZilla !mac:unix: LIBS += $$PWD/../../bin/libQupZilla.so -unix:contains(DEFINES, "NO_SYSTEM_DATAPATH"): QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}\\$\$ORIGIN +QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}$$PWD/../../bin # KWallet plugin -exists($$PWD/../../bin/plugins/libKWalletPasswords.so) { +isEqual(QT_MAJOR_VERSION, 4):exists($$PWD/../../bin/plugins/libKWalletPasswords.so) { LIBS += $$PWD/../../bin/plugins/libKWalletPasswords.so DEFINES += HAVE_KDE_PASSWORDS_PLUGIN } @@ -27,7 +27,7 @@ exists($$PWD/../../bin/plugins/libGnomeKeyringPasswords.so) { } -DESTDIR = $$PWD/../../bin +DESTDIR = OBJECTS_DIR = build MOC_DIR = build RCC_DIR = build diff --git a/tests/benchmarks/adblockparserule/.gitignore b/tests/benchmarks/adblockparserule/.gitignore new file mode 100644 index 000000000..c21ac8d53 --- /dev/null +++ b/tests/benchmarks/adblockparserule/.gitignore @@ -0,0 +1 @@ +adblockparserule diff --git a/tests/benchmarks/adblockparserule/adblockparserule b/tests/benchmarks/adblockparserule/adblockparserule deleted file mode 100755 index 351e9e230..000000000 Binary files a/tests/benchmarks/adblockparserule/adblockparserule and /dev/null differ diff --git a/tests/benchmarks/adblockparserule/adblockparserule.cpp b/tests/benchmarks/adblockparserule/adblockparserule.cpp index dc3ceb343..fb32f2d02 100644 --- a/tests/benchmarks/adblockparserule/adblockparserule.cpp +++ b/tests/benchmarks/adblockparserule/adblockparserule.cpp @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2013 David Rosca +* Copyright (C) 2014 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ void AdBlockParseRule::parseEasyList() { QBENCHMARK { AdBlockSubscription* subscription = new AdBlockSubscription("EasyList", this); - subscription->setFilePath("easylist.txt"); + subscription->setFilePath("../files/easylist.txt"); subscription->loadSubscription(QStringList()); } } diff --git a/tests/benchmarks/benchmarks.pri b/tests/benchmarks/benchmarks.pri index 809be4077..9a791274e 100644 --- a/tests/benchmarks/benchmarks.pri +++ b/tests/benchmarks/benchmarks.pri @@ -10,19 +10,7 @@ isEqual(QT_MAJOR_VERSION, 5) { !unix|mac: LIBS += -L$$PWD/../../bin -lQupZilla !mac:unix: LIBS += $$PWD/../../bin/libQupZilla.so -unix:contains(DEFINES, "NO_SYSTEM_DATAPATH"): QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}$$PWD/../../bin - -# 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 -} +QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}$$PWD/../../bin DESTDIR = OBJECTS_DIR = build diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index c69d768a5..87cb72de8 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -1,7 +1,5 @@ TEMPLATE = subdirs -include(benchmarks.pri) - defineTest(addSubdir) { for(subdir, 1) { entries = $$files($$subdir/*) @@ -17,4 +15,4 @@ defineTest(addSubdir) { export (SUBDIRS) } -addSubdir($$PWD) \ No newline at end of file +addSubdir($$PWD) diff --git a/tests/benchmarks/adblockparserule/easylist.txt b/tests/benchmarks/files/easylist.txt similarity index 100% rename from tests/benchmarks/adblockparserule/easylist.txt rename to tests/benchmarks/files/easylist.txt