Mercurial > trustbridge
diff ui/tests/nsstest.cpp @ 371:6b78a89c1e17
Fix NSS test in release build and add verify's to avoid segfault with invalid list.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 15 Apr 2014 11:04:34 +0200 |
parents | a54925d41056 |
children | 17e1c8f37d72 |
line wrap: on
line diff
--- a/ui/tests/nsstest.cpp Tue Apr 15 10:49:41 2014 +0200 +++ b/ui/tests/nsstest.cpp Tue Apr 15 11:04:34 2014 +0200 @@ -62,7 +62,11 @@ QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); /* use system default */ /* Set up a temporary list */ +#ifdef RELEASE_BUILD + QFile res(":/list-valid-signed-release.txt"); +#else QFile res(":/list-valid-signed.txt"); +#endif res.open(QIODevice::ReadOnly); validListFile.open(); validListFile.write(res.readAll()); @@ -73,6 +77,8 @@ validList = CertificateList(validListFile.fileName().toLocal8Bit().data()); + QVERIFY(validList.isValid()); + /* Create the profiles.ini `s set environment variables*/ // fakeHome.setAutoRemove(false); #ifndef WIN32 @@ -134,6 +140,7 @@ cert.base64Line().size() - 2); } QVERIFY((size_t) instList.size() == strv_length(to_install)); + QVERIFY(strv_length(to_install) != 0); QVERIFY(write_stores_nss(to_install, to_remove) == 0);