Android: don't run test function for fd leakage, make test pass

It is sufficient to run this test on systems where we don't need to
set up dependencies and satisfy other assumptions the test makes. It is
safe to assume that if this test passes on regular Unix, then
QTemporaryFile will behave as expected on Android as well.

Change-Id: Iaf9a67d7c12b3acfd0992bab591c3f906b073d9e
Fixes: QTBUG-73564
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Volker Hilsheimer 2019-06-19 00:01:14 +02:00
parent 6275e037bf
commit b877285694

View File

@ -569,13 +569,7 @@ void tst_QTemporaryFile::rename()
void tst_QTemporaryFile::renameFdLeak()
{
#ifdef Q_OS_UNIX
# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
ChdirOnReturn cor(QDir::currentPath());
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
# endif
#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID)
const QByteArray sourceFile = QFile::encodeName(QFINDTESTDATA(__FILE__));
QVERIFY(!sourceFile.isEmpty());
// Test this on Unix only