summaryrefslogtreecommitdiffstats
path: root/tests/baseline/widgets/CMakeLists.txt
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-11-11 20:29:22 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-11-18 03:36:24 +0000
commit79b2a43585cb409fea3699dff472ff48f058af5a (patch)
tree770d56ffc3d6305808d1b98cbcb34676249e4cf0 /tests/baseline/widgets/CMakeLists.txt
parent3b84187cd14b55f1456ebd9b195c7aeeb4ec7ef4 (diff)
Add baseline test that allows comparing the rendering of widgets
Provide basic boiler plate that sets up the baseline (aka lancelot) framework specifically for comparing the appearance of widgets, and implement test functions for QSlider and QPushButton. Widgets should always look the same if the QPA platform, the OS version, and certain UI-impacting attributes are identical. Ie. on any macOS 10.15 machine that runs in "Light" mode, widgets look the same. On a macOS 11 machine, they might look different. On an OpenSUSE machine using the fusion style things might look different from a Ubuntu machine. The helper function removes DPR differences - images are always scaled to a DPR of 1.0, which allows us to compare the image\ content and not get distracted by them having different dimensions (and the fuzzy comparison of images might make the system tolerate scaling artefacts). Note: For now, this test is meant to be run locally, either when testing changes to style code, or when checking how QWidget based UIs would look on newer version of an operating system. In CI the test is run, but then skipped in CI as the baseline server is not configured. Change-Id: Ie33a9d979d934f0df6883757333ce2c5e2f7ef84 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/baseline/widgets/CMakeLists.txt')
-rw-r--r--tests/baseline/widgets/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/baseline/widgets/CMakeLists.txt b/tests/baseline/widgets/CMakeLists.txt
new file mode 100644
index 0000000000..eac3ca6753
--- /dev/null
+++ b/tests/baseline/widgets/CMakeLists.txt
@@ -0,0 +1,12 @@
+qt_internal_add_test(tst_baseline_widgets
+ SOURCES
+ ../shared/baselineprotocol.cpp ../shared/baselineprotocol.h ../shared/lookup3.cpp
+ ../shared/qbaselinetest.cpp ../shared/qbaselinetest.h
+ tst_baseline_widgets.cpp
+ INCLUDE_DIRECTORIES
+ ../shared
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ Qt::Network
+)