summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/corelib/io')
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp5
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp5
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp5
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp26
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qprocess/testProcessLoopback/.prev_CMakeLists.txt13
-rw-r--r--tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt11
-rw-r--r--tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro1
8 files changed, 17 insertions, 53 deletions
diff --git a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
index 0b831f6625..d1aba9fa5f 100644
--- a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
+++ b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
@@ -163,12 +163,7 @@ private slots:
wcscat(appendedPath, L"\\*");
WIN32_FIND_DATA fd;
-#ifndef Q_OS_WINRT
HANDLE hSearch = FindFirstFileW(appendedPath, &fd);
-#else
- HANDLE hSearch = FindFirstFileEx(appendedPath, FindExInfoStandard, &fd,
- FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH);
-#endif
QVERIFY(hSearch != INVALID_HANDLE_VALUE);
QBENCHMARK {
diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
index 5b10a4a689..367913338f 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
@@ -95,12 +95,7 @@ static int posix_helper(const wchar_t *dirpath, size_t length)
Q_ASSERT(MAX_PATH > length + 3);
wcsncpy(appendedPath, dirpath, length);
wcscpy(appendedPath + length, L"\\*");
-#ifndef Q_OS_WINRT
hSearch = FindFirstFile(appendedPath, &fd);
-#else
- hSearch = FindFirstFileEx(appendedPath, FindExInfoStandard, &fd,
- FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH);
-#endif
if (hSearch == INVALID_HANDLE_VALUE) {
qWarning("FindFirstFile failed");
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
index 6ee8b4e93b..21018920f7 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
@@ -221,12 +221,7 @@ void QFileSystemIteratorPrivate::pushSubDirectory(const QByteArray &path)
const int end = QString::fromLatin1(path + "\\*").toWCharArray(szSearchPath);
Q_ASSERT(end < MAX_PATH);
szSearchPath[end] = L'\0';
-#ifndef Q_OS_WINRT
HANDLE dir = FindFirstFile(szSearchPath, &m_fileSearchResult);
-#else
- HANDLE dir = FindFirstFileEx(szSearchPath, FindExInfoStandard, &m_fileSearchResult,
- FindExSearchLimitToDirectories, NULL, FIND_FIRST_EX_LARGE_FETCH);
-#endif
m_bFirstSearchResult = true;
#else
DIR *dir = ::opendir(path.constData());
diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp
index 1966b30773..73b3ba8c48 100644
--- a/tests/benchmarks/corelib/io/qfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qfile/main.cpp
@@ -297,11 +297,7 @@ void tst_qfile::readBigFile()
// ensure we don't account string conversion
wchar_t* cfilename = (wchar_t*)filename.utf16();
-#ifndef Q_OS_WINRT
hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
-#else
- hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0);
-#endif
Q_ASSERT(hndl);
wchar_t* nativeBuffer = new wchar_t[BUFSIZE];
DWORD numberOfBytesRead;
@@ -310,12 +306,7 @@ void tst_qfile::readBigFile()
do {
ReadFile(hndl, nativeBuffer, blockSize, &numberOfBytesRead, NULL);
} while(numberOfBytesRead != 0);
-#ifndef Q_OS_WINRT
SetFilePointer(hndl, 0, NULL, FILE_BEGIN);
-#else
- LARGE_INTEGER offset = { 0 };
- SetFilePointerEx(hndl, offset, NULL, FILE_BEGIN);
-#endif
}
delete[] nativeBuffer;
CloseHandle(hndl);
@@ -396,20 +387,11 @@ void tst_qfile::seek()
// ensure we don't account string conversion
wchar_t* cfilename = (wchar_t*)filename.utf16();
-#ifndef Q_OS_WINRT
hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
-#else
- hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0);
-#endif
Q_ASSERT(hndl);
QBENCHMARK {
i=(i+1)%sp_size;
-#ifndef Q_OS_WINRT
SetFilePointer(hndl, seekpos[i], NULL, 0);
-#else
- LARGE_INTEGER offset = { seekpos[i] };
- SetFilePointerEx(hndl, offset, NULL, FILE_BEGIN);
-#endif
}
CloseHandle(hndl);
#else
@@ -494,11 +476,7 @@ void tst_qfile::open()
wchar_t* cfilename = (wchar_t*)filename.utf16();
QBENCHMARK {
-#ifndef Q_OS_WINRT
hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
-#else
- hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0);
-#endif
Q_ASSERT(hndl);
CloseHandle(hndl);
}
@@ -702,11 +680,7 @@ void tst_qfile::readSmallFiles()
// ensure we don't account string conversion
wchar_t* cfilename = (wchar_t*)filename.utf16();
-#ifndef Q_OS_WINRT
hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
-#else
- hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0);
-#endif
Q_ASSERT(hndl);
wchar_t* nativeBuffer = new wchar_t[BUFSIZE];
DWORD numberOfBytesRead;
diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
index 6cc96777a1..f4c4f815da 100644
--- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp
+++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
@@ -41,7 +41,7 @@ class qfileinfo : public QObject
private slots:
void existsTemporary();
void existsStatic();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN)
void symLinkTargetPerformanceLNK();
void symLinkTargetPerformanceMounpoint();
#endif
@@ -71,7 +71,7 @@ void qfileinfo::existsStatic()
QBENCHMARK { QFileInfo::exists(appPath); }
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN)
void qfileinfo::symLinkTargetPerformanceLNK()
{
QVERIFY(QFile::link("file","link.lnk"));
diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/.prev_CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..59806127fe
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/.prev_CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from testProcessLoopback.pro.
+
+#####################################################################
+## testProcessLoopback Binary:
+#####################################################################
+
+add_qt_executable(testProcessLoopback
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt
index 44b18a4826..b5a7fe83f5 100644
--- a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt
+++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt
@@ -4,18 +4,11 @@
## testProcessLoopback Binary:
#####################################################################
-add_qt_benchmark(testProcessLoopback
+# add_qt_executable(testProcessLoopback # special case
+add_qt_benchmark(testProcessLoopback # special case
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
SOURCES
main.cpp
PUBLIC_LIBRARIES
Qt::Gui
)
-
-## Scopes:
-#####################################################################
-
-extend_target(testProcessLoopback CONDITION WINRT
- LINK_OPTIONS
- "/ENTRY:mainCRTStartup"
-)
diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
index 1f56ad6ee6..a5fe146e80 100644
--- a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
+++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
@@ -1,7 +1,6 @@
CONFIG += benchmark
CONFIG -= qt
CONFIG += cmdline
-winrt: QMAKE_LFLAGS += /ENTRY:mainCRTStartup
SOURCES = main.cpp
DESTDIR = ./