diff options
author | Maurice Kalinowski <maurice.kalinowski@digia.com> | 2013-11-11 15:37:49 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-11 20:13:12 +0100 |
commit | 0de83705316d82273e0d445119ab1d4ee1c2f980 (patch) | |
tree | 0c025112d7bf9c7eeaefa16e50aa2ad913fac5de /tests | |
parent | 459fb114818eaf6a209e80ff7d59ccefeee881e3 (diff) |
Enable qfile tests for platforms without network
Currently network is only required to gather the host info for one
test case. That does not justify to disable all other tests, which can
provide useful information on the state when doing a port. Hence
disable that testcase if no network is available.
Change-Id: I202ef49b3e07ae69ec85ee0432ae0a771a90e816
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/io.pro | 1 | ||||
-rw-r--r-- | tests/auto/corelib/io/qfile/test/test.pro | 5 | ||||
-rw-r--r-- | tests/auto/corelib/io/qfile/tst_qfile.cpp | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro index 11815c6160..259463f976 100644 --- a/tests/auto/corelib/io/io.pro +++ b/tests/auto/corelib/io/io.pro @@ -43,7 +43,6 @@ SUBDIRS=\ qsettings !qtHaveModule(network): SUBDIRS -= \ - qfile \ qiodevice \ qprocess \ qtextstream diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro index e282bd091c..03863e9943 100644 --- a/tests/auto/corelib/io/qfile/test/test.pro +++ b/tests/auto/corelib/io/qfile/test/test.pro @@ -1,7 +1,10 @@ CONFIG += testcase CONFIG += parallel_test CONFIG -= app_bundle debug_and_release_target -QT = core-private core network testlib +QT = core-private core testlib +qtHaveModule(network): QT += network +else: DEFINES += QT_NO_NETWORK + TARGET = ../tst_qfile SOURCES = ../tst_qfile.cpp wince*: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 78cb27ee30..77ac4bcd86 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -59,7 +59,7 @@ extern Q_CORE_EXPORT int qt_ntfs_permission_lookup; QT_END_NAMESPACE #endif -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(QT_NO_NETWORK) #include <QHostInfo> #endif #include <QProcess> @@ -2245,7 +2245,7 @@ void tst_QFile::writeLargeDataBlock_data() QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd; QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(QT_NO_NETWORK) // Some semi-randomness to avoid collisions. QTest::newRow("unc file") << QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt") |