summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2022-02-09 16:24:24 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2022-02-11 21:54:44 +0100
commitfdf5d11ff6f3f5034d7d7f7664f4cc76deb26ef5 (patch)
tree22e1c4b93f718930b8c40c2ab68f1b2bc790f97e /tests/auto/widgets/kernel
parent52492ff7209d2c91cbd0d549282459b58fbf3b0f (diff)
CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test
Multiple tests use qt_internal_add_resource that copies the functionality that is already implemented inside the qt_internal_add_test function. Simplify these test by replacing the qt_internal_add_resource call with the new BUILTIN_TESTDATA option. Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel')
-rw-r--r--tests/auto/widgets/kernel/qwidget/CMakeLists.txt26
1 files changed, 10 insertions, 16 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/CMakeLists.txt b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt
index d04db40e87..e2370a011a 100644
--- a/tests/auto/widgets/kernel/qwidget/CMakeLists.txt
+++ b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt
@@ -4,6 +4,14 @@
## tst_qwidget Test:
#####################################################################
+# Resources:
+set(qwidget_resource_files
+ "geometry-fullscreen.dat"
+ "geometry-maximized.dat"
+ "geometry.dat"
+ "hellotr_la.qm"
+)
+
qt_internal_add_test(tst_qwidget
SOURCES
tst_qwidget.cpp
@@ -14,24 +22,10 @@ qt_internal_add_test(tst_qwidget
Qt::TestPrivate
Qt::Widgets
Qt::WidgetsPrivate
+ TESTDATA ${qwidget_resource_files}
+ BUILTIN_TESTDATA
)
-# Resources:
-set(qwidget_resource_files
- "geometry-fullscreen.dat"
- "geometry-maximized.dat"
- "geometry.dat"
- "hellotr_la.qm"
-)
-
-qt_internal_add_resource(tst_qwidget "qwidget"
- PREFIX
- "/"
- FILES
- ${qwidget_resource_files}
-)
-
-
#### Keys ignored in scope 1:.:.:qwidget.pro:<TRUE>:
# testcase.timeout = "600"