cmake: add widgets/kernel tests
Fixes: QTBUG-78230 Change-Id: Ia59f531f92e1f8499a8e814ff48c36f65984ff2a Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
This commit is contained in:
parent
3e5e7b8201
commit
79c384ebb0
@ -2,7 +2,7 @@
|
||||
|
||||
add_subdirectory(qaction)
|
||||
add_subdirectory(qactiongroup)
|
||||
# add_subdirectory(qapplication) # FIXME: Enable this!
|
||||
add_subdirectory(qapplication)
|
||||
add_subdirectory(qboxlayout)
|
||||
add_subdirectory(qdesktopwidget)
|
||||
add_subdirectory(qformlayout)
|
||||
@ -18,10 +18,6 @@ add_subdirectory(qwidgetsvariant)
|
||||
add_subdirectory(qwindowcontainer)
|
||||
add_subdirectory(qshortcut)
|
||||
add_subdirectory(qsizepolicy)
|
||||
if(OFF)
|
||||
add_subdirectory(qsound)
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
add_subdirectory(qgesturerecognizer)
|
||||
endif()
|
||||
|
@ -1,6 +1,16 @@
|
||||
add_qt_test("tst_qaction" SOURCES tst_qaction.cpp
|
||||
# Generated from qaction.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qaction Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qaction
|
||||
SOURCES
|
||||
tst_qaction.cpp
|
||||
LIBRARIES
|
||||
Qt::GuiPrivate
|
||||
Qt::CorePrivate
|
||||
Qt::GuiPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1 +1,13 @@
|
||||
add_qt_test("tst_qactiongroup" SOURCES tst_qactiongroup.cpp LIBRARIES Qt::Widgets)
|
||||
# Generated from qactiongroup.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qactiongroup Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qactiongroup
|
||||
SOURCES
|
||||
tst_qactiongroup.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
7
tests/auto/widgets/kernel/qapplication/CMakeLists.txt
Normal file
7
tests/auto/widgets/kernel/qapplication/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
||||
# Generated from qapplication.pro.
|
||||
|
||||
add_subdirectory(test)
|
||||
if(NOT WINRT)
|
||||
add_subdirectory(desktopsettingsaware)
|
||||
add_subdirectory(modal)
|
||||
endif()
|
@ -0,0 +1,19 @@
|
||||
# Generated from desktopsettingsaware.pro.
|
||||
|
||||
#####################################################################
|
||||
## desktopsettingsaware Binary:
|
||||
#####################################################################
|
||||
|
||||
add_qt_executable(desktopsettingsaware_helper # special case
|
||||
GUI
|
||||
SOURCES
|
||||
main.cpp
|
||||
OUTPUT_DIRECTORY # special case
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.. # special case
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
20
tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt
Normal file
20
tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
# Generated from modal.pro.
|
||||
|
||||
#####################################################################
|
||||
## modal Binary:
|
||||
#####################################################################
|
||||
|
||||
add_qt_executable(modal_helper # special case
|
||||
GUI
|
||||
SOURCES
|
||||
base.cpp base.h
|
||||
main.cpp
|
||||
OUTPUT_DIRECTORY # special case
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.. # special case
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
44
tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
Normal file
44
tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
Normal file
@ -0,0 +1,44 @@
|
||||
# Generated from test.pro.
|
||||
|
||||
#####################################################################
|
||||
## test Test:
|
||||
#####################################################################
|
||||
|
||||
# Collect test data
|
||||
list(APPEND test_data "../test/test.pro")
|
||||
list(APPEND test_data "../tmp/README")
|
||||
list(APPEND test_data "../modal")
|
||||
|
||||
add_qt_test(tst_qapplication
|
||||
SOURCES
|
||||
../tst_qapplication.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::GuiPrivate
|
||||
Qt::WidgetsPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
TESTDATA ${test_data}
|
||||
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." # special case
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
extend_target(tst_qapplication CONDITION builtin_testdata # special case
|
||||
DEFINES
|
||||
BUILTIN_TESTDATA
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID AND NOT WINRT:
|
||||
# SUBPROGRAMS = "desktopsettingsaware" "modal"
|
||||
|
||||
#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
|
||||
# TEST_HELPER_INSTALLS = "../debug/helper"
|
||||
|
||||
#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID AND NOT WINRT:
|
||||
# TEST_HELPER_INSTALLS = "../release/helper"
|
||||
|
||||
#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID AND NOT WINRT:
|
||||
# TEST_HELPER_INSTALLS = "../helper"
|
@ -1 +1,15 @@
|
||||
add_qt_test("tst_qboxlayout" SOURCES tst_qboxlayout.cpp LIBRARIES Qt::Widgets Qt::TestPrivate)
|
||||
# Generated from qboxlayout.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qboxlayout Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qboxlayout
|
||||
SOURCES
|
||||
tst_qboxlayout.cpp
|
||||
LIBRARIES
|
||||
Qt::TestPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1 +1,13 @@
|
||||
add_qt_test("tst_qdesktopwidget" SOURCES tst_qdesktopwidget.cpp LIBRARIES Qt::Widgets)
|
||||
# Generated from qdesktopwidget.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qdesktopwidget Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qdesktopwidget
|
||||
SOURCES
|
||||
tst_qdesktopwidget.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1,6 +1,16 @@
|
||||
add_qt_test("tst_qgesturerecognizer" SOURCES tst_qgesturerecognizer.cpp
|
||||
# Generated from qgesturerecognizer.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qgesturerecognizer Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qgesturerecognizer
|
||||
SOURCES
|
||||
tst_qgesturerecognizer.cpp
|
||||
LIBRARIES
|
||||
Qt::Widgets
|
||||
Qt::GuiPrivate
|
||||
Qt::CorePrivate
|
||||
Qt::GuiPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -19,6 +19,3 @@ add_qt_test(tst_qgridlayout
|
||||
ENABLE_AUTOGEN_TOOLS
|
||||
uic
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:qgridlayout.pro:<TRUE>:
|
||||
# CONFIG = "testcase"
|
||||
|
@ -1,3 +1,40 @@
|
||||
add_qt_test("tst_qlayout" SOURCES tst_qlayout.cpp LIBRARIES Qt::WidgetsPrivate Qt::TestPrivate)
|
||||
# Generated from qlayout.pro.
|
||||
|
||||
extend_target("tst_qlayout" CONDITION ANDROID AND NOT ANDROID_EMBEDDED SOURCES testdata.qrc)
|
||||
#####################################################################
|
||||
## tst_qlayout Test:
|
||||
#####################################################################
|
||||
|
||||
# Collect test data
|
||||
file(GLOB_RECURSE test_data_glob
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
baseline/*)
|
||||
list(APPEND test_data ${test_data_glob})
|
||||
|
||||
add_qt_test(tst_qlayout
|
||||
SOURCES
|
||||
tst_qlayout.cpp
|
||||
LIBRARIES
|
||||
Qt::TestPrivate
|
||||
Qt::WidgetsPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
TESTDATA ${test_data}
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
if(ANDROID AND NOT ANDROID_EMBEDDED)
|
||||
# Resources:
|
||||
set(testdata_resource_files
|
||||
"baseline/smartmaxsize"
|
||||
)
|
||||
|
||||
add_qt_resource(tst_qlayout "testdata"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${testdata_resource_files}
|
||||
)
|
||||
endif()
|
||||
|
@ -1 +1,15 @@
|
||||
add_qt_test("tst_qshortcut" SOURCES tst_qshortcut.cpp LIBRARIES Qt::Widgets)
|
||||
# Generated from qshortcut.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qshortcut Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qshortcut
|
||||
SOURCES
|
||||
tst_qshortcut.cpp
|
||||
INCLUDE_DIRECTORIES
|
||||
..
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1 +1,18 @@
|
||||
add_qt_test("tst_qsizepolicy" SOURCES tst_qsizepolicy.cpp LIBRARIES Qt::WidgetsPrivate)
|
||||
# Generated from qsizepolicy.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qsizepolicy Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qsizepolicy
|
||||
SOURCES
|
||||
tst_qsizepolicy.cpp
|
||||
LIBRARIES
|
||||
Qt::WidgetsPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
@ -1 +1,13 @@
|
||||
add_qt_test("tst_qstackedlayout" SOURCES tst_qstackedlayout.cpp LIBRARIES Qt::Widgets)
|
||||
# Generated from qstackedlayout.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qstackedlayout Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qstackedlayout
|
||||
SOURCES
|
||||
tst_qstackedlayout.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1 +1,13 @@
|
||||
add_qt_test("tst_qtooltip" SOURCES tst_qtooltip.cpp LIBRARIES Qt::Widgets)
|
||||
# Generated from qtooltip.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qtooltip Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qtooltip
|
||||
SOURCES
|
||||
tst_qtooltip.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -5,7 +5,6 @@
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qwidget
|
||||
GUI
|
||||
SOURCES
|
||||
tst_qwidget.cpp
|
||||
LIBRARIES
|
||||
@ -19,23 +18,31 @@ add_qt_test(tst_qwidget
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(qwidget_resource_files
|
||||
"geometry-fullscreen.dat"
|
||||
"geometry-maximized.dat"
|
||||
"geometry.dat"
|
||||
)
|
||||
|
||||
add_qt_resource(tst_qwidget "qwidget"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
geometry-fullscreen.dat
|
||||
geometry-maximized.dat
|
||||
geometry.dat
|
||||
${qwidget_resource_files}
|
||||
)
|
||||
|
||||
|
||||
#### Keys ignored in scope 1:.:.:qwidget.pro:<TRUE>:
|
||||
# CONFIG = "testcase" "x11inc"
|
||||
# testcase.timeout = "600"
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
extend_target(tst_qwidget CONDITION AIX
|
||||
COMPILE_OPTIONS
|
||||
-fpermissive
|
||||
)
|
||||
|
||||
extend_target(tst_qwidget CONDITION APPLE
|
||||
SOURCES
|
||||
tst_qwidget_mac_helpers.mm
|
||||
|
@ -1,7 +1,17 @@
|
||||
add_qt_test("tst_qwidget_window" SOURCES tst_qwidget_window.cpp
|
||||
# Generated from qwidget_window.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qwidget_window Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qwidget_window
|
||||
SOURCES
|
||||
tst_qwidget_window.cpp
|
||||
LIBRARIES
|
||||
Qt::Widgets
|
||||
Qt::CorePrivate
|
||||
Qt::GuiPrivate
|
||||
Qt::TestPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1 +1,15 @@
|
||||
add_qt_test("tst_qwidgetaction" SOURCES tst_qwidgetaction.cpp LIBRARIES Qt::Widgets Qt::TestPrivate)
|
||||
# Generated from qwidgetaction.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qwidgetaction Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qwidgetaction
|
||||
SOURCES
|
||||
tst_qwidgetaction.cpp
|
||||
LIBRARIES
|
||||
Qt::TestPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1 +1,13 @@
|
||||
add_qt_test("tst_qwidgetmetatype" SOURCES tst_qwidgetmetatype.cpp LIBRARIES Qt::Widgets)
|
||||
# Generated from qwidgetmetatype.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qwidgetmetatype Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qwidgetmetatype
|
||||
SOURCES
|
||||
tst_qwidgetmetatype.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1,8 +1,15 @@
|
||||
add_qt_test("tst_qwidgetsvariant"
|
||||
# Generated from qwidgetsvariant.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qwidgetsvariant Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qwidgetsvariant
|
||||
SOURCES
|
||||
tst_qwidgetsvariant.cpp
|
||||
INCLUDE_DIRECTORIES
|
||||
./../../../other/qvariant_common
|
||||
LIBRARIES
|
||||
../../../other/qvariant_common
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
@ -1 +1,13 @@
|
||||
add_qt_test("tst_qwindowcontainer" SOURCES tst_qwindowcontainer.cpp LIBRARIES Qt::Widgets)
|
||||
# Generated from qwindowcontainer.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qwindowcontainer Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qwindowcontainer
|
||||
SOURCES
|
||||
tst_qwindowcontainer.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user