Test speedup (#1678)

* Tests: Speed up AutoType testing

Decrease default autotype delay to 1 to improve test suite speed by
seconds. This shaves multiple seconds off the whole test suite. In some
cases, the largest part.

Also, initialize config just creating the test instance, just in case
that it ever depends on the configuration values at that point already.

* Tests: Speed up Kdbx4 testing

This speeds up the Kdbx4 tests by using parameters optimized for speed
for the key derivation functions. On an i7-6700K the tests run close to
50% faster with this change (about 1.5s vs. 3s).
This commit is contained in:
Thomas Luzat 2018-03-08 10:20:25 +01:00 committed by Janek Bevendorff
parent aa6327716f
commit 46e8e3dbbc
3 changed files with 27 additions and 8 deletions

View file

@ -35,8 +35,9 @@ void TestAutoType::initTestCase()
{
QVERIFY(Crypto::init());
Config::createTempFileInstance();
AutoType::createTestInstance();
config()->set("AutoTypeDelay", 1);
config()->set("security/autotypeask", false);
AutoType::createTestInstance();
QPluginLoader loader(filePath()->pluginPath("keepassx-autotype-test"));
loader.setLoadHints(QLibrary::ResolveAllSymbolsHint);