tst_QCryptographicHashBigData: skip Sha1 tests on ASAN CI builds

The SHA-1 test has started to time out in CI ASAN builds recently, so
skip it there. Keep it on non-CI or non-ASAN builds, though.

Amends c6e092a5f84b7fc72556897b50c7697152967925.

Pick-to: 6.9 6.8 6.5 6.2
Change-Id: I8d653c2a8304cfae290befafda570d5c49dd4536
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Marc Mutz 2025-02-19 09:40:44 +01:00
parent 90247966a7
commit 929466ba64

View File

@ -54,8 +54,17 @@ void tst_QCryptographicHashBigData::moreThan4GiBOfData_data()
// these are reasonably fast (O(secs))
row(QCryptographicHash::Md4);
row(QCryptographicHash::Md5);
row(QCryptographicHash::Sha1);
if (!qgetenv("QTEST_ENVIRONMENT").split(' ').contains("ci")) {
const bool runsOnCI = qgetenv("QTEST_ENVIRONMENT").split(' ').contains("ci");
const bool runsUnderASan =
#ifdef QT_ASAN_ENABLED
true
#else
false
#endif
;
if (!runsOnCI || !runsUnderASan)
row(QCryptographicHash::Sha1);
if (!runsOnCI) {
// This is important but so slow (O(minute)) that, on CI, it tends to time out.
// Retain it for manual runs, all the same, as most dev machines will be fast enough.
row(QCryptographicHash::Sha512);