summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfile
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-08-12 13:55:40 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-08-15 10:57:01 +0000
commit7947032e2d1d68b2c0f79874db7adcf560851f29 (patch)
tree47e3c7283402cdedfb3124cbb1e929012e23fae3 /tests/auto/corelib/io/qfile
parent4572ded8b32ea8883a0414f0cd65b9634feb5b5b (diff)
Regenerate coreliob/io tests
With a few special cases to make the tests pass. Biggest one is the qlockfile_test_helper. Also a few tests have some problems and have not been ported yet: qfileselector, qresourceengine, qprocess. Change-Id: I91a5210b13e7a0697774d909449a71f46af0a0ba Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qfile')
-rw-r--r--tests/auto/corelib/io/qfile/.prev_CMakeLists.txt78
-rw-r--r--tests/auto/corelib/io/qfile/CMakeLists.txt46
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt5
3 files changed, 114 insertions, 15 deletions
diff --git a/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt b/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..57824a82c7
--- /dev/null
+++ b/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt
@@ -0,0 +1,78 @@
+# Generated from qfile.pro.
+
+#####################################################################
+## tst_qfile Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "BLACKLIST")
+list(APPEND test_data "dosfile.txt")
+list(APPEND test_data "noendofline.txt")
+list(APPEND test_data "testfile.txt")
+list(APPEND test_data "testlog.txt")
+list(APPEND test_data "two.dots.file")
+list(APPEND test_data "tst_qfile.cpp")
+list(APPEND test_data "Makefile")
+list(APPEND test_data "forCopying.txt")
+list(APPEND test_data "forRenaming.txt")
+list(APPEND test_data "resources/file1.ext1")
+
+add_qt_test(tst_qfile
+ GUI
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qfile.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+add_qt_resource(tst_qfile "qfile"
+ PREFIX
+ "/tst_qfileinfo/"
+ FILES
+ "resources/"
+)
+add_qt_resource(tst_qfile "rename-fallback"
+ PREFIX
+ "/"
+ FILES
+ "rename-fallback.qrc"
+)
+add_qt_resource(tst_qfile "copy-fallback"
+ PREFIX
+ "/"
+ FILES
+ "copy-fallback.qrc"
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qfile CONDITION TARGET Qt::Network
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+extend_target(tst_qfile CONDITION NOT TARGET Qt::Network
+ DEFINES
+ QT_NO_NETWORK
+)
+
+extend_target(tst_qfile CONDITION CONFIG___contains___builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
+
+extend_target(tst_qfile CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ ole32
+ uuid
+)
+if(NOT WINRT)
+ add_subdirectory(stdinprocess)
+endif()
diff --git a/tests/auto/corelib/io/qfile/CMakeLists.txt b/tests/auto/corelib/io/qfile/CMakeLists.txt
index dcc9c85f5d..d4fd6e48cf 100644
--- a/tests/auto/corelib/io/qfile/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfile/CMakeLists.txt
@@ -4,7 +4,21 @@
## tst_qfile Test:
#####################################################################
+# Collect test data
+list(APPEND test_data "BLACKLIST")
+list(APPEND test_data "dosfile.txt")
+list(APPEND test_data "noendofline.txt")
+list(APPEND test_data "testfile.txt")
+list(APPEND test_data "testlog.txt")
+list(APPEND test_data "two.dots.file")
+list(APPEND test_data "tst_qfile.cpp")
+# list(APPEND test_data "Makefile") # special case remove
+list(APPEND test_data "forCopying.txt")
+list(APPEND test_data "forRenaming.txt")
+list(APPEND test_data "resources/file1.ext1")
+
add_qt_test(tst_qfile
+ GUI
SOURCES
../../../../shared/emulationdetector.h
tst_qfile.cpp
@@ -12,20 +26,29 @@ add_qt_test(tst_qfile
../../../../shared
LIBRARIES
Qt::CorePrivate
+ TESTDATA ${test_data}
)
# Resources:
-add_qt_resource(tst_qfile "qfile" PREFIX "/tst_qfileinfo/" FILES
- resources/)
-add_qt_resource(tst_qfile "rename-fallback" FILES
- rename-fallback.qrc)
-add_qt_resource(tst_qfile "copy-fallback" FILES
- copy-fallback.qrc)
-
+add_qt_resource(tst_qfile "qfile"
+ PREFIX
+ "/tst_qfileinfo/"
+ FILES
+ "resources/"
+)
+add_qt_resource(tst_qfile "rename-fallback"
+ PREFIX
+ "/"
+ FILES
+ "rename-fallback.qrc"
+)
+add_qt_resource(tst_qfile "copy-fallback"
+ PREFIX
+ "/"
+ FILES
+ "copy-fallback.qrc"
+)
-#### Keys ignored in scope 3:.:.:test.pro:<TRUE>:
-# CONFIG = "testcase"
-# TESTDATA = "BLACKLIST" "dosfile.txt" "noendofline.txt" "testfile.txt" "testlog.txt" "two.dots.file" "tst_qfile.cpp" "Makefile" "forCopying.txt" "forRenaming.txt" "resources/file1.ext1"
## Scopes:
#####################################################################
@@ -35,7 +58,7 @@ extend_target(tst_qfile CONDITION TARGET Qt::Network
Qt::Network
)
-extend_target(tst_qfile CONDITION NOT (TARGET Qt::Network)
+extend_target(tst_qfile CONDITION NOT TARGET Qt::Network
DEFINES
QT_NO_NETWORK
)
@@ -50,7 +73,6 @@ extend_target(tst_qfile CONDITION WIN32 AND NOT WINRT
ole32
uuid
)
-
if(NOT WINRT)
add_subdirectory(stdinprocess)
endif()
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt b/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt
index 508e16ecc4..9f12295c9d 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt
@@ -1,11 +1,10 @@
# Generated from stdinprocess.pro.
#####################################################################
-## stdinprocess Binary:
+## stdinprocess_helper Binary:
#####################################################################
-add_qt_executable(stdinprocess
- GUI
+add_qt_test_helper(stdinprocess_helper
SOURCES
main.cpp
)