summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake3
-rw-r--r--tests/auto/other/CMakeLists.txt1
-rw-r--r--tests/baseline/CMakeLists.txt3
-rw-r--r--tests/baseline/painting/.gitignore (renamed from tests/auto/other/lancelot/.gitignore)0
-rw-r--r--tests/baseline/painting/CMakeLists.txt (renamed from tests/auto/other/lancelot/CMakeLists.txt)27
-rw-r--r--tests/baseline/painting/images.qrc (renamed from tests/auto/other/lancelot/images.qrc)0
-rw-r--r--tests/baseline/painting/images/alpha.png (renamed from tests/auto/other/lancelot/images/alpha.png)bin2422 -> 2422 bytes
-rw-r--r--tests/baseline/painting/images/alpha2x2.png (renamed from tests/auto/other/lancelot/images/alpha2x2.png)bin78 -> 78 bytes
-rw-r--r--tests/baseline/painting/images/bitmap.png (renamed from tests/auto/other/lancelot/images/bitmap.png)bin254 -> 254 bytes
-rw-r--r--tests/baseline/painting/images/border.png (renamed from tests/auto/other/lancelot/images/border.png)bin182 -> 182 bytes
-rw-r--r--tests/baseline/painting/images/borderimage.png (renamed from tests/auto/other/lancelot/images/borderimage.png)bin826 -> 826 bytes
-rw-r--r--tests/baseline/painting/images/dome_argb32.png (renamed from tests/auto/other/lancelot/images/dome_argb32.png)bin18234 -> 18234 bytes
-rw-r--r--tests/baseline/painting/images/dome_indexed.png (renamed from tests/auto/other/lancelot/images/dome_indexed.png)bin7946 -> 7946 bytes
-rw-r--r--tests/baseline/painting/images/dome_indexed_mask.png (renamed from tests/auto/other/lancelot/images/dome_indexed_mask.png)bin5411 -> 5411 bytes
-rw-r--r--tests/baseline/painting/images/dome_mono.png (renamed from tests/auto/other/lancelot/images/dome_mono.png)bin1391 -> 1391 bytes
-rw-r--r--tests/baseline/painting/images/dome_mono_128.png (renamed from tests/auto/other/lancelot/images/dome_mono_128.png)bin2649 -> 2649 bytes
-rw-r--r--tests/baseline/painting/images/dome_mono_palette.png (renamed from tests/auto/other/lancelot/images/dome_mono_palette.png)bin1404 -> 1404 bytes
-rw-r--r--tests/baseline/painting/images/dome_rgb32.png (renamed from tests/auto/other/lancelot/images/dome_rgb32.png)bin17890 -> 17890 bytes
-rw-r--r--tests/baseline/painting/images/dot.png (renamed from tests/auto/other/lancelot/images/dot.png)bin287 -> 287 bytes
-rw-r--r--tests/baseline/painting/images/face.png (renamed from tests/auto/other/lancelot/images/face.png)bin2414 -> 2414 bytes
-rw-r--r--tests/baseline/painting/images/gam030.png (renamed from tests/auto/other/lancelot/images/gam030.png)bin213 -> 213 bytes
-rw-r--r--tests/baseline/painting/images/gam045.png (renamed from tests/auto/other/lancelot/images/gam045.png)bin216 -> 216 bytes
-rw-r--r--tests/baseline/painting/images/gam056.png (renamed from tests/auto/other/lancelot/images/gam056.png)bin216 -> 216 bytes
-rw-r--r--tests/baseline/painting/images/gam100.png (renamed from tests/auto/other/lancelot/images/gam100.png)bin205 -> 205 bytes
-rw-r--r--tests/baseline/painting/images/gam200.png (renamed from tests/auto/other/lancelot/images/gam200.png)bin187 -> 187 bytes
-rw-r--r--tests/baseline/painting/images/image.png (renamed from tests/auto/other/lancelot/images/image.png)bin169554 -> 169554 bytes
-rw-r--r--tests/baseline/painting/images/mask.png (renamed from tests/auto/other/lancelot/images/mask.png)bin274 -> 274 bytes
-rw-r--r--tests/baseline/painting/images/mask_100.png (renamed from tests/auto/other/lancelot/images/mask_100.png)bin319 -> 319 bytes
-rw-r--r--tests/baseline/painting/images/masked.png (renamed from tests/auto/other/lancelot/images/masked.png)bin788 -> 788 bytes
-rw-r--r--tests/baseline/painting/images/sign.png (renamed from tests/auto/other/lancelot/images/sign.png)bin10647 -> 10647 bytes
-rw-r--r--tests/baseline/painting/images/solid.png (renamed from tests/auto/other/lancelot/images/solid.png)bin607 -> 607 bytes
-rw-r--r--tests/baseline/painting/images/solid2x2.png (renamed from tests/auto/other/lancelot/images/solid2x2.png)bin75 -> 75 bytes
-rw-r--r--tests/baseline/painting/images/struct-image-01.jpg (renamed from tests/auto/other/lancelot/images/struct-image-01.jpg)bin4751 -> 4751 bytes
-rw-r--r--tests/baseline/painting/images/struct-image-01.png (renamed from tests/auto/other/lancelot/images/struct-image-01.png)bin63238 -> 63238 bytes
-rw-r--r--tests/baseline/painting/images/zebra.png (renamed from tests/auto/other/lancelot/images/zebra.png)bin426 -> 426 bytes
-rw-r--r--tests/baseline/painting/paintcommands.cpp (renamed from tests/auto/other/lancelot/paintcommands.cpp)0
-rw-r--r--tests/baseline/painting/paintcommands.h (renamed from tests/auto/other/lancelot/paintcommands.h)0
-rw-r--r--tests/baseline/painting/scripts/aliasing.qps (renamed from tests/auto/other/lancelot/scripts/aliasing.qps)0
-rw-r--r--tests/baseline/painting/scripts/arcs.qps (renamed from tests/auto/other/lancelot/scripts/arcs.qps)0
-rw-r--r--tests/baseline/painting/scripts/arcs2.qps (renamed from tests/auto/other/lancelot/scripts/arcs2.qps)0
-rw-r--r--tests/baseline/painting/scripts/background.qps (renamed from tests/auto/other/lancelot/scripts/background.qps)0
-rw-r--r--tests/baseline/painting/scripts/background_brush.qps (renamed from tests/auto/other/lancelot/scripts/background_brush.qps)0
-rw-r--r--tests/baseline/painting/scripts/beziers.qps (renamed from tests/auto/other/lancelot/scripts/beziers.qps)0
-rw-r--r--tests/baseline/painting/scripts/bitmaps.qps (renamed from tests/auto/other/lancelot/scripts/bitmaps.qps)0
-rw-r--r--tests/baseline/painting/scripts/borderimage.qps (renamed from tests/auto/other/lancelot/scripts/borderimage.qps)0
-rw-r--r--tests/baseline/painting/scripts/brush_pens.qps (renamed from tests/auto/other/lancelot/scripts/brush_pens.qps)0
-rw-r--r--tests/baseline/painting/scripts/brushes.qps (renamed from tests/auto/other/lancelot/scripts/brushes.qps)0
-rw-r--r--tests/baseline/painting/scripts/clippath_antialiasing.qps (renamed from tests/auto/other/lancelot/scripts/clippath_antialiasing.qps)0
-rw-r--r--tests/baseline/painting/scripts/clippaths.qps (renamed from tests/auto/other/lancelot/scripts/clippaths.qps)0
-rw-r--r--tests/baseline/painting/scripts/clipping.qps (renamed from tests/auto/other/lancelot/scripts/clipping.qps)0
-rw-r--r--tests/baseline/painting/scripts/clipping_state.qps (renamed from tests/auto/other/lancelot/scripts/clipping_state.qps)0
-rw-r--r--tests/baseline/painting/scripts/cliprects.qps (renamed from tests/auto/other/lancelot/scripts/cliprects.qps)0
-rw-r--r--tests/baseline/painting/scripts/conical_gradients.qps (renamed from tests/auto/other/lancelot/scripts/conical_gradients.qps)0
-rw-r--r--tests/baseline/painting/scripts/conical_gradients_perspectives.qps (renamed from tests/auto/other/lancelot/scripts/conical_gradients_perspectives.qps)0
-rw-r--r--tests/baseline/painting/scripts/cosmetic.qps (renamed from tests/auto/other/lancelot/scripts/cosmetic.qps)0
-rw-r--r--tests/baseline/painting/scripts/dashes.qps (renamed from tests/auto/other/lancelot/scripts/dashes.qps)0
-rw-r--r--tests/baseline/painting/scripts/degeneratebeziers.qps (renamed from tests/auto/other/lancelot/scripts/degeneratebeziers.qps)0
-rw-r--r--tests/baseline/painting/scripts/deviceclipping.qps (renamed from tests/auto/other/lancelot/scripts/deviceclipping.qps)0
-rw-r--r--tests/baseline/painting/scripts/drawpoints.qps (renamed from tests/auto/other/lancelot/scripts/drawpoints.qps)0
-rw-r--r--tests/baseline/painting/scripts/ellipses.qps (renamed from tests/auto/other/lancelot/scripts/ellipses.qps)0
-rw-r--r--tests/baseline/painting/scripts/fillrect.qps (renamed from tests/auto/other/lancelot/scripts/fillrect.qps)0
-rw-r--r--tests/baseline/painting/scripts/fillrect_aa.qps (renamed from tests/auto/other/lancelot/scripts/fillrect_aa.qps)0
-rw-r--r--tests/baseline/painting/scripts/filltest.qps (renamed from tests/auto/other/lancelot/scripts/filltest.qps)0
-rw-r--r--tests/baseline/painting/scripts/glyphruns.qps (renamed from tests/auto/other/lancelot/scripts/glyphruns.qps)0
-rw-r--r--tests/baseline/painting/scripts/gradients.qps (renamed from tests/auto/other/lancelot/scripts/gradients.qps)0
-rw-r--r--tests/baseline/painting/scripts/gradientxform_device.qps (renamed from tests/auto/other/lancelot/scripts/gradientxform_device.qps)0
-rw-r--r--tests/baseline/painting/scripts/gradientxform_logical.qps (renamed from tests/auto/other/lancelot/scripts/gradientxform_logical.qps)0
-rw-r--r--tests/baseline/painting/scripts/gradientxform_object.qps (renamed from tests/auto/other/lancelot/scripts/gradientxform_object.qps)0
-rw-r--r--tests/baseline/painting/scripts/hinting.qps (renamed from tests/auto/other/lancelot/scripts/hinting.qps)0
-rw-r--r--tests/baseline/painting/scripts/image_dpr.qps (renamed from tests/auto/other/lancelot/scripts/image_dpr.qps)0
-rw-r--r--tests/baseline/painting/scripts/image_formats.qps (renamed from tests/auto/other/lancelot/scripts/image_formats.qps)0
-rw-r--r--tests/baseline/painting/scripts/images.qps (renamed from tests/auto/other/lancelot/scripts/images.qps)0
-rw-r--r--tests/baseline/painting/scripts/images2.qps (renamed from tests/auto/other/lancelot/scripts/images2.qps)0
-rw-r--r--tests/baseline/painting/scripts/join_cap_styles.qps (renamed from tests/auto/other/lancelot/scripts/join_cap_styles.qps)0
-rw-r--r--tests/baseline/painting/scripts/join_cap_styles_duplicate_control_points.qps (renamed from tests/auto/other/lancelot/scripts/join_cap_styles_duplicate_control_points.qps)0
-rw-r--r--tests/baseline/painting/scripts/linear_gradients.qps (renamed from tests/auto/other/lancelot/scripts/linear_gradients.qps)0
-rw-r--r--tests/baseline/painting/scripts/linear_gradients_perspectives.qps (renamed from tests/auto/other/lancelot/scripts/linear_gradients_perspectives.qps)0
-rw-r--r--tests/baseline/painting/scripts/linear_resolving_gradients.qps (renamed from tests/auto/other/lancelot/scripts/linear_resolving_gradients.qps)0
-rw-r--r--tests/baseline/painting/scripts/lineconsistency.qps (renamed from tests/auto/other/lancelot/scripts/lineconsistency.qps)0
-rw-r--r--tests/baseline/painting/scripts/linedashes.qps (renamed from tests/auto/other/lancelot/scripts/linedashes.qps)0
-rw-r--r--tests/baseline/painting/scripts/linedashes2.qps (renamed from tests/auto/other/lancelot/scripts/linedashes2.qps)0
-rw-r--r--tests/baseline/painting/scripts/linedashes2_aa.qps (renamed from tests/auto/other/lancelot/scripts/linedashes2_aa.qps)0
-rw-r--r--tests/baseline/painting/scripts/lines.qps (renamed from tests/auto/other/lancelot/scripts/lines.qps)0
-rw-r--r--tests/baseline/painting/scripts/lines2.qps (renamed from tests/auto/other/lancelot/scripts/lines2.qps)0
-rw-r--r--tests/baseline/painting/scripts/lines3.qps (renamed from tests/auto/other/lancelot/scripts/lines3.qps)0
-rw-r--r--tests/baseline/painting/scripts/pathfill.qps (renamed from tests/auto/other/lancelot/scripts/pathfill.qps)0
-rw-r--r--tests/baseline/painting/scripts/paths.qps (renamed from tests/auto/other/lancelot/scripts/paths.qps)0
-rw-r--r--tests/baseline/painting/scripts/paths_aa.qps (renamed from tests/auto/other/lancelot/scripts/paths_aa.qps)0
-rw-r--r--tests/baseline/painting/scripts/pens.qps (renamed from tests/auto/other/lancelot/scripts/pens.qps)0
-rw-r--r--tests/baseline/painting/scripts/pens_aa.qps (renamed from tests/auto/other/lancelot/scripts/pens_aa.qps)0
-rw-r--r--tests/baseline/painting/scripts/pens_cosmetic.qps (renamed from tests/auto/other/lancelot/scripts/pens_cosmetic.qps)0
-rw-r--r--tests/baseline/painting/scripts/perspectives.qps (renamed from tests/auto/other/lancelot/scripts/perspectives.qps)0
-rw-r--r--tests/baseline/painting/scripts/perspectives2.qps (renamed from tests/auto/other/lancelot/scripts/perspectives2.qps)0
-rw-r--r--tests/baseline/painting/scripts/pixmap_rotation.qps (renamed from tests/auto/other/lancelot/scripts/pixmap_rotation.qps)0
-rw-r--r--tests/baseline/painting/scripts/pixmap_rotation2.qps (renamed from tests/auto/other/lancelot/scripts/pixmap_rotation2.qps)0
-rw-r--r--tests/baseline/painting/scripts/pixmap_scaling.qps (renamed from tests/auto/other/lancelot/scripts/pixmap_scaling.qps)0
-rw-r--r--tests/baseline/painting/scripts/pixmap_subpixel.qps (renamed from tests/auto/other/lancelot/scripts/pixmap_subpixel.qps)0
-rw-r--r--tests/baseline/painting/scripts/pixmaps.qps (renamed from tests/auto/other/lancelot/scripts/pixmaps.qps)0
-rw-r--r--tests/baseline/painting/scripts/porter_duff.qps (renamed from tests/auto/other/lancelot/scripts/porter_duff.qps)0
-rw-r--r--tests/baseline/painting/scripts/porter_duff2.qps (renamed from tests/auto/other/lancelot/scripts/porter_duff2.qps)0
-rw-r--r--tests/baseline/painting/scripts/primitives.qps (renamed from tests/auto/other/lancelot/scripts/primitives.qps)0
-rw-r--r--tests/baseline/painting/scripts/radial_gradients.qps (renamed from tests/auto/other/lancelot/scripts/radial_gradients.qps)0
-rw-r--r--tests/baseline/painting/scripts/radial_gradients_perspectives.qps (renamed from tests/auto/other/lancelot/scripts/radial_gradients_perspectives.qps)0
-rw-r--r--tests/baseline/painting/scripts/rasterops.qps (renamed from tests/auto/other/lancelot/scripts/rasterops.qps)0
-rw-r--r--tests/baseline/painting/scripts/richtext.qps (renamed from tests/auto/other/lancelot/scripts/richtext.qps)0
-rw-r--r--tests/baseline/painting/scripts/sizes.qps (renamed from tests/auto/other/lancelot/scripts/sizes.qps)0
-rw-r--r--tests/baseline/painting/scripts/smallcaps_path.qps (renamed from tests/auto/other/lancelot/scripts/smallcaps_path.qps)0
-rw-r--r--tests/baseline/painting/scripts/statictext.qps (renamed from tests/auto/other/lancelot/scripts/statictext.qps)0
-rw-r--r--tests/baseline/painting/scripts/text.qps (renamed from tests/auto/other/lancelot/scripts/text.qps)0
-rw-r--r--tests/baseline/painting/scripts/text_perspectives.qps (renamed from tests/auto/other/lancelot/scripts/text_perspectives.qps)0
-rw-r--r--tests/baseline/painting/scripts/thinlines.qps (renamed from tests/auto/other/lancelot/scripts/thinlines.qps)0
-rw-r--r--tests/baseline/painting/scripts/tiled_pixmap.qps (renamed from tests/auto/other/lancelot/scripts/tiled_pixmap.qps)0
-rw-r--r--tests/baseline/painting/scripts/tinydashes.qps (renamed from tests/auto/other/lancelot/scripts/tinydashes.qps)0
-rw-r--r--tests/baseline/painting/tst_baseline_painting.cpp (renamed from tests/auto/other/lancelot/tst_lancelot.cpp)2
-rw-r--r--tests/baseline/shared/baselineprotocol.cpp (renamed from tests/baselineserver/shared/baselineprotocol.cpp)0
-rw-r--r--tests/baseline/shared/baselineprotocol.h (renamed from tests/baselineserver/shared/baselineprotocol.h)0
-rw-r--r--tests/baseline/shared/baselineprotocol.pri (renamed from tests/baselineserver/shared/baselineprotocol.pri)0
-rw-r--r--tests/baseline/shared/lookup3.cpp (renamed from tests/baselineserver/shared/lookup3.cpp)0
-rw-r--r--tests/baseline/shared/qbaselinetest.cpp (renamed from tests/baselineserver/shared/qbaselinetest.cpp)0
-rw-r--r--tests/baseline/shared/qbaselinetest.h (renamed from tests/baselineserver/shared/qbaselinetest.h)0
-rw-r--r--tests/baseline/shared/qbaselinetest.pri (renamed from tests/baselineserver/shared/qbaselinetest.pri)0
-rw-r--r--tests/baselineserver/.gitignore2
-rwxr-xr-xtests/baselineserver/bin/runserver13
-rw-r--r--tests/baselineserver/src/baselineserver.cpp853
-rw-r--r--tests/baselineserver/src/baselineserver.h151
-rw-r--r--tests/baselineserver/src/baselineserver.pro24
-rw-r--r--tests/baselineserver/src/baselineserver.qrc5
-rw-r--r--tests/baselineserver/src/main.cpp57
-rw-r--r--tests/baselineserver/src/report.cpp503
-rw-r--r--tests/baselineserver/src/report.h98
-rw-r--r--tests/baselineserver/src/templates/view.html84
-rw-r--r--tests/benchmarks/gui/painting/lancebench/CMakeLists.txt10
-rw-r--r--tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp2
-rw-r--r--tests/manual/lance/CMakeLists.txt64
-rw-r--r--tests/manual/lance/lance.pro2
135 files changed, 55 insertions, 1849 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index b8c41882377..632bbdc67b5 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -639,6 +639,9 @@ macro(qt_build_tests)
add_subdirectory(auto)
endif()
if(NOT QT_BUILD_MINIMAL_STATIC_TESTS)
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/baseline/CMakeLists.txt")
+ add_subdirectory(baseline)
+ endif()
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/CMakeLists.txt" AND QT_BUILD_BENCHMARKS)
add_subdirectory(benchmarks)
endif()
diff --git a/tests/auto/other/CMakeLists.txt b/tests/auto/other/CMakeLists.txt
index f0cdeec0f2b..8255406bb5a 100644
--- a/tests/auto/other/CMakeLists.txt
+++ b/tests/auto/other/CMakeLists.txt
@@ -11,7 +11,6 @@ if(TARGET Qt::Widgets)
# add_subdirectory(windowsmobile) <- does not exist # special case
endif()
if(TARGET Qt::Network AND TARGET Qt::Widgets)
- add_subdirectory(lancelot)
add_subdirectory(qnetworkaccessmanager_and_qprogressdialog)
endif()
if(MACOS AND TARGET Qt::Gui AND TARGET Qt::Widgets)
diff --git a/tests/baseline/CMakeLists.txt b/tests/baseline/CMakeLists.txt
new file mode 100644
index 00000000000..935df36ef99
--- /dev/null
+++ b/tests/baseline/CMakeLists.txt
@@ -0,0 +1,3 @@
+if(TARGET Qt::Network)
+ add_subdirectory(painting)
+endif()
diff --git a/tests/auto/other/lancelot/.gitignore b/tests/baseline/painting/.gitignore
index 0a70416d571..0a70416d571 100644
--- a/tests/auto/other/lancelot/.gitignore
+++ b/tests/baseline/painting/.gitignore
diff --git a/tests/auto/other/lancelot/CMakeLists.txt b/tests/baseline/painting/CMakeLists.txt
index a4598ab65aa..95a006da756 100644
--- a/tests/auto/other/lancelot/CMakeLists.txt
+++ b/tests/baseline/painting/CMakeLists.txt
@@ -1,7 +1,5 @@
-# Generated from lancelot.pro.
-
#####################################################################
-## tst_lancelot Test:
+## tst_baseline_painting Test:
#####################################################################
# Collect test data
@@ -10,17 +8,14 @@ file(GLOB_RECURSE test_data_glob
scripts/*)
list(APPEND test_data ${test_data_glob})
-qt_internal_add_test(tst_lancelot
+qt_internal_add_test(tst_baseline_painting
SOURCES
- ../../../baselineserver/shared/baselineprotocol.cpp ../../../baselineserver/shared/baselineprotocol.h
- ../../../baselineserver/shared/lookup3.cpp
- ../../../baselineserver/shared/qbaselinetest.cpp ../../../baselineserver/shared/qbaselinetest.h
+ ../shared/baselineprotocol.cpp ../shared/baselineprotocol.h ../shared/lookup3.cpp
+ ../shared/qbaselinetest.cpp ../shared/qbaselinetest.h
paintcommands.cpp paintcommands.h
- tst_lancelot.cpp
- DEFINES
- QMAKESPEC=\\\"\\\"
+ tst_baseline_painting.cpp
INCLUDE_DIRECTORIES
- ../../../baselineserver/shared
+ ../shared
PUBLIC_LIBRARIES
Qt::Gui
Qt::GuiPrivate
@@ -61,7 +56,7 @@ set(images_resource_files
"images/zebra.png"
)
-qt_internal_add_resource(tst_lancelot "images"
+qt_internal_add_resource(tst_baseline_painting "images"
PREFIX
"/"
FILES
@@ -72,13 +67,7 @@ qt_internal_add_resource(tst_lancelot "images"
## Scopes:
#####################################################################
-qt_internal_extend_target(tst_lancelot CONDITION QT_FEATURE_opengl
+qt_internal_extend_target(tst_baseline_painting CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::OpenGL
)
-
-#### Keys ignored in scope 4:.:../../../baselineserver/shared:../../../baselineserver/shared/qbaselinetest.pri:WIN32:
-# MKSPEC = "$$replace(QMAKESPEC, \\\\, /)"
-
-#### Keys ignored in scope 5:.:../../../baselineserver/shared:../../../baselineserver/shared/qbaselinetest.pri:else:
-# MKSPEC = "$$QMAKESPEC"
diff --git a/tests/auto/other/lancelot/images.qrc b/tests/baseline/painting/images.qrc
index 060b52c85a1..060b52c85a1 100644
--- a/tests/auto/other/lancelot/images.qrc
+++ b/tests/baseline/painting/images.qrc
diff --git a/tests/auto/other/lancelot/images/alpha.png b/tests/baseline/painting/images/alpha.png
index e465b2586dd..e465b2586dd 100644
--- a/tests/auto/other/lancelot/images/alpha.png
+++ b/tests/baseline/painting/images/alpha.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/alpha2x2.png b/tests/baseline/painting/images/alpha2x2.png
index 8e99feb4cc6..8e99feb4cc6 100644
--- a/tests/auto/other/lancelot/images/alpha2x2.png
+++ b/tests/baseline/painting/images/alpha2x2.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/bitmap.png b/tests/baseline/painting/images/bitmap.png
index d21f8f51bb2..d21f8f51bb2 100644
--- a/tests/auto/other/lancelot/images/bitmap.png
+++ b/tests/baseline/painting/images/bitmap.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/border.png b/tests/baseline/painting/images/border.png
index a3d2fed0a34..a3d2fed0a34 100644
--- a/tests/auto/other/lancelot/images/border.png
+++ b/tests/baseline/painting/images/border.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/borderimage.png b/tests/baseline/painting/images/borderimage.png
index f7f6b662275..f7f6b662275 100644
--- a/tests/auto/other/lancelot/images/borderimage.png
+++ b/tests/baseline/painting/images/borderimage.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/dome_argb32.png b/tests/baseline/painting/images/dome_argb32.png
index e3ccba0c13a..e3ccba0c13a 100644
--- a/tests/auto/other/lancelot/images/dome_argb32.png
+++ b/tests/baseline/painting/images/dome_argb32.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/dome_indexed.png b/tests/baseline/painting/images/dome_indexed.png
index beefcd514e6..beefcd514e6 100644
--- a/tests/auto/other/lancelot/images/dome_indexed.png
+++ b/tests/baseline/painting/images/dome_indexed.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/dome_indexed_mask.png b/tests/baseline/painting/images/dome_indexed_mask.png
index a62f29f40e3..a62f29f40e3 100644
--- a/tests/auto/other/lancelot/images/dome_indexed_mask.png
+++ b/tests/baseline/painting/images/dome_indexed_mask.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/dome_mono.png b/tests/baseline/painting/images/dome_mono.png
index 950c2a7494f..950c2a7494f 100644
--- a/tests/auto/other/lancelot/images/dome_mono.png
+++ b/tests/baseline/painting/images/dome_mono.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/dome_mono_128.png b/tests/baseline/painting/images/dome_mono_128.png
index 77e48aaab79..77e48aaab79 100644
--- a/tests/auto/other/lancelot/images/dome_mono_128.png
+++ b/tests/baseline/painting/images/dome_mono_128.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/dome_mono_palette.png b/tests/baseline/painting/images/dome_mono_palette.png
index dca3f592459..dca3f592459 100644
--- a/tests/auto/other/lancelot/images/dome_mono_palette.png
+++ b/tests/baseline/painting/images/dome_mono_palette.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/dome_rgb32.png b/tests/baseline/painting/images/dome_rgb32.png
index 27bc02a5450..27bc02a5450 100644
--- a/tests/auto/other/lancelot/images/dome_rgb32.png
+++ b/tests/baseline/painting/images/dome_rgb32.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/dot.png b/tests/baseline/painting/images/dot.png
index 17a7b6a0ba7..17a7b6a0ba7 100644
--- a/tests/auto/other/lancelot/images/dot.png
+++ b/tests/baseline/painting/images/dot.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/face.png b/tests/baseline/painting/images/face.png
index 4f6172d83b2..4f6172d83b2 100644
--- a/tests/auto/other/lancelot/images/face.png
+++ b/tests/baseline/painting/images/face.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/gam030.png b/tests/baseline/painting/images/gam030.png
index 904c9721bd7..904c9721bd7 100644
--- a/tests/auto/other/lancelot/images/gam030.png
+++ b/tests/baseline/painting/images/gam030.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/gam045.png b/tests/baseline/painting/images/gam045.png
index b649a8a54f2..b649a8a54f2 100644
--- a/tests/auto/other/lancelot/images/gam045.png
+++ b/tests/baseline/painting/images/gam045.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/gam056.png b/tests/baseline/painting/images/gam056.png
index e5f959dc96c..e5f959dc96c 100644
--- a/tests/auto/other/lancelot/images/gam056.png
+++ b/tests/baseline/painting/images/gam056.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/gam100.png b/tests/baseline/painting/images/gam100.png
index 6c7ba5f1ed6..6c7ba5f1ed6 100644
--- a/tests/auto/other/lancelot/images/gam100.png
+++ b/tests/baseline/painting/images/gam100.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/gam200.png b/tests/baseline/painting/images/gam200.png
index daa20fcbc4f..daa20fcbc4f 100644
--- a/tests/auto/other/lancelot/images/gam200.png
+++ b/tests/baseline/painting/images/gam200.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/image.png b/tests/baseline/painting/images/image.png
index 85d486a7902..85d486a7902 100644
--- a/tests/auto/other/lancelot/images/image.png
+++ b/tests/baseline/painting/images/image.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/mask.png b/tests/baseline/painting/images/mask.png
index c3f3b1b6cae..c3f3b1b6cae 100644
--- a/tests/auto/other/lancelot/images/mask.png
+++ b/tests/baseline/painting/images/mask.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/mask_100.png b/tests/baseline/painting/images/mask_100.png
index fc950dc7ed4..fc950dc7ed4 100644
--- a/tests/auto/other/lancelot/images/mask_100.png
+++ b/tests/baseline/painting/images/mask_100.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/masked.png b/tests/baseline/painting/images/masked.png
index 6debec534d6..6debec534d6 100644
--- a/tests/auto/other/lancelot/images/masked.png
+++ b/tests/baseline/painting/images/masked.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/sign.png b/tests/baseline/painting/images/sign.png
index 6aac7e150a7..6aac7e150a7 100644
--- a/tests/auto/other/lancelot/images/sign.png
+++ b/tests/baseline/painting/images/sign.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/solid.png b/tests/baseline/painting/images/solid.png
index 371e9c1aeef..371e9c1aeef 100644
--- a/tests/auto/other/lancelot/images/solid.png
+++ b/tests/baseline/painting/images/solid.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/solid2x2.png b/tests/baseline/painting/images/solid2x2.png
index f34562f964e..f34562f964e 100644
--- a/tests/auto/other/lancelot/images/solid2x2.png
+++ b/tests/baseline/painting/images/solid2x2.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/struct-image-01.jpg b/tests/baseline/painting/images/struct-image-01.jpg
index a74e07223bd..a74e07223bd 100644
--- a/tests/auto/other/lancelot/images/struct-image-01.jpg
+++ b/tests/baseline/painting/images/struct-image-01.jpg
Binary files differ
diff --git a/tests/auto/other/lancelot/images/struct-image-01.png b/tests/baseline/painting/images/struct-image-01.png
index 4ed08406dcf..4ed08406dcf 100644
--- a/tests/auto/other/lancelot/images/struct-image-01.png
+++ b/tests/baseline/painting/images/struct-image-01.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/zebra.png b/tests/baseline/painting/images/zebra.png
index ef35f20785b..ef35f20785b 100644
--- a/tests/auto/other/lancelot/images/zebra.png
+++ b/tests/baseline/painting/images/zebra.png
Binary files differ
diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/baseline/painting/paintcommands.cpp
index d2e48688f93..d2e48688f93 100644
--- a/tests/auto/other/lancelot/paintcommands.cpp
+++ b/tests/baseline/painting/paintcommands.cpp
diff --git a/tests/auto/other/lancelot/paintcommands.h b/tests/baseline/painting/paintcommands.h
index 15c6d3fa580..15c6d3fa580 100644
--- a/tests/auto/other/lancelot/paintcommands.h
+++ b/tests/baseline/painting/paintcommands.h
diff --git a/tests/auto/other/lancelot/scripts/aliasing.qps b/tests/baseline/painting/scripts/aliasing.qps
index 59878f9c4d3..59878f9c4d3 100644
--- a/tests/auto/other/lancelot/scripts/aliasing.qps
+++ b/tests/baseline/painting/scripts/aliasing.qps
diff --git a/tests/auto/other/lancelot/scripts/arcs.qps b/tests/baseline/painting/scripts/arcs.qps
index 8afaf73ff1b..8afaf73ff1b 100644
--- a/tests/auto/other/lancelot/scripts/arcs.qps
+++ b/tests/baseline/painting/scripts/arcs.qps
diff --git a/tests/auto/other/lancelot/scripts/arcs2.qps b/tests/baseline/painting/scripts/arcs2.qps
index a2739a8c976..a2739a8c976 100644
--- a/tests/auto/other/lancelot/scripts/arcs2.qps
+++ b/tests/baseline/painting/scripts/arcs2.qps
diff --git a/tests/auto/other/lancelot/scripts/background.qps b/tests/baseline/painting/scripts/background.qps
index d1efe5c1788..d1efe5c1788 100644
--- a/tests/auto/other/lancelot/scripts/background.qps
+++ b/tests/baseline/painting/scripts/background.qps
diff --git a/tests/auto/other/lancelot/scripts/background_brush.qps b/tests/baseline/painting/scripts/background_brush.qps
index ca1f9449641..ca1f9449641 100644
--- a/tests/auto/other/lancelot/scripts/background_brush.qps
+++ b/tests/baseline/painting/scripts/background_brush.qps
diff --git a/tests/auto/other/lancelot/scripts/beziers.qps b/tests/baseline/painting/scripts/beziers.qps
index 62d9d031a62..62d9d031a62 100644
--- a/tests/auto/other/lancelot/scripts/beziers.qps
+++ b/tests/baseline/painting/scripts/beziers.qps
diff --git a/tests/auto/other/lancelot/scripts/bitmaps.qps b/tests/baseline/painting/scripts/bitmaps.qps
index 4966490337f..4966490337f 100644
--- a/tests/auto/other/lancelot/scripts/bitmaps.qps
+++ b/tests/baseline/painting/scripts/bitmaps.qps
diff --git a/tests/auto/other/lancelot/scripts/borderimage.qps b/tests/baseline/painting/scripts/borderimage.qps
index ebd4f4d2491..ebd4f4d2491 100644
--- a/tests/auto/other/lancelot/scripts/borderimage.qps
+++ b/tests/baseline/painting/scripts/borderimage.qps
diff --git a/tests/auto/other/lancelot/scripts/brush_pens.qps b/tests/baseline/painting/scripts/brush_pens.qps
index b9a2bc0adac..b9a2bc0adac 100644
--- a/tests/auto/other/lancelot/scripts/brush_pens.qps
+++ b/tests/baseline/painting/scripts/brush_pens.qps
diff --git a/tests/auto/other/lancelot/scripts/brushes.qps b/tests/baseline/painting/scripts/brushes.qps
index 43a78436013..43a78436013 100644
--- a/tests/auto/other/lancelot/scripts/brushes.qps
+++ b/tests/baseline/painting/scripts/brushes.qps
diff --git a/tests/auto/other/lancelot/scripts/clippath_antialiasing.qps b/tests/baseline/painting/scripts/clippath_antialiasing.qps
index 193ce8b7edb..193ce8b7edb 100644
--- a/tests/auto/other/lancelot/scripts/clippath_antialiasing.qps
+++ b/tests/baseline/painting/scripts/clippath_antialiasing.qps
diff --git a/tests/auto/other/lancelot/scripts/clippaths.qps b/tests/baseline/painting/scripts/clippaths.qps
index fe8e198a17d..fe8e198a17d 100644
--- a/tests/auto/other/lancelot/scripts/clippaths.qps
+++ b/tests/baseline/painting/scripts/clippaths.qps
diff --git a/tests/auto/other/lancelot/scripts/clipping.qps b/tests/baseline/painting/scripts/clipping.qps
index 3694ff2ba73..3694ff2ba73 100644
--- a/tests/auto/other/lancelot/scripts/clipping.qps
+++ b/tests/baseline/painting/scripts/clipping.qps
diff --git a/tests/auto/other/lancelot/scripts/clipping_state.qps b/tests/baseline/painting/scripts/clipping_state.qps
index a29d3738c8b..a29d3738c8b 100644
--- a/tests/auto/other/lancelot/scripts/clipping_state.qps
+++ b/tests/baseline/painting/scripts/clipping_state.qps
diff --git a/tests/auto/other/lancelot/scripts/cliprects.qps b/tests/baseline/painting/scripts/cliprects.qps
index aa0367eccfa..aa0367eccfa 100644
--- a/tests/auto/other/lancelot/scripts/cliprects.qps
+++ b/tests/baseline/painting/scripts/cliprects.qps
diff --git a/tests/auto/other/lancelot/scripts/conical_gradients.qps b/tests/baseline/painting/scripts/conical_gradients.qps
index d6eb860f3f6..d6eb860f3f6 100644
--- a/tests/auto/other/lancelot/scripts/conical_gradients.qps
+++ b/tests/baseline/painting/scripts/conical_gradients.qps
diff --git a/tests/auto/other/lancelot/scripts/conical_gradients_perspectives.qps b/tests/baseline/painting/scripts/conical_gradients_perspectives.qps
index a9c14f1ce7d..a9c14f1ce7d 100644
--- a/tests/auto/other/lancelot/scripts/conical_gradients_perspectives.qps
+++ b/tests/baseline/painting/scripts/conical_gradients_perspectives.qps
diff --git a/tests/auto/other/lancelot/scripts/cosmetic.qps b/tests/baseline/painting/scripts/cosmetic.qps
index 3c730cf26f3..3c730cf26f3 100644
--- a/tests/auto/other/lancelot/scripts/cosmetic.qps
+++ b/tests/baseline/painting/scripts/cosmetic.qps
diff --git a/tests/auto/other/lancelot/scripts/dashes.qps b/tests/baseline/painting/scripts/dashes.qps
index 185443a292d..185443a292d 100644
--- a/tests/auto/other/lancelot/scripts/dashes.qps
+++ b/tests/baseline/painting/scripts/dashes.qps
diff --git a/tests/auto/other/lancelot/scripts/degeneratebeziers.qps b/tests/baseline/painting/scripts/degeneratebeziers.qps
index 948968b0cd1..948968b0cd1 100644
--- a/tests/auto/other/lancelot/scripts/degeneratebeziers.qps
+++ b/tests/baseline/painting/scripts/degeneratebeziers.qps
diff --git a/tests/auto/other/lancelot/scripts/deviceclipping.qps b/tests/baseline/painting/scripts/deviceclipping.qps
index 8608a509948..8608a509948 100644
--- a/tests/auto/other/lancelot/scripts/deviceclipping.qps
+++ b/tests/baseline/painting/scripts/deviceclipping.qps
diff --git a/tests/auto/other/lancelot/scripts/drawpoints.qps b/tests/baseline/painting/scripts/drawpoints.qps
index c02cd857379..c02cd857379 100644
--- a/tests/auto/other/lancelot/scripts/drawpoints.qps
+++ b/tests/baseline/painting/scripts/drawpoints.qps
diff --git a/tests/auto/other/lancelot/scripts/ellipses.qps b/tests/baseline/painting/scripts/ellipses.qps
index e2cffd7f271..e2cffd7f271 100644
--- a/tests/auto/other/lancelot/scripts/ellipses.qps
+++ b/tests/baseline/painting/scripts/ellipses.qps
diff --git a/tests/auto/other/lancelot/scripts/fillrect.qps b/tests/baseline/painting/scripts/fillrect.qps
index 103ef2646a8..103ef2646a8 100644
--- a/tests/auto/other/lancelot/scripts/fillrect.qps
+++ b/tests/baseline/painting/scripts/fillrect.qps
diff --git a/tests/auto/other/lancelot/scripts/fillrect_aa.qps b/tests/baseline/painting/scripts/fillrect_aa.qps
index 32328996617..32328996617 100644
--- a/tests/auto/other/lancelot/scripts/fillrect_aa.qps
+++ b/tests/baseline/painting/scripts/fillrect_aa.qps
diff --git a/tests/auto/other/lancelot/scripts/filltest.qps b/tests/baseline/painting/scripts/filltest.qps
index 112ffc85bed..112ffc85bed 100644
--- a/tests/auto/other/lancelot/scripts/filltest.qps
+++ b/tests/baseline/painting/scripts/filltest.qps
diff --git a/tests/auto/other/lancelot/scripts/glyphruns.qps b/tests/baseline/painting/scripts/glyphruns.qps
index 2b70c72610f..2b70c72610f 100644
--- a/tests/auto/other/lancelot/scripts/glyphruns.qps
+++ b/tests/baseline/painting/scripts/glyphruns.qps
diff --git a/tests/auto/other/lancelot/scripts/gradients.qps b/tests/baseline/painting/scripts/gradients.qps
index eb3cda9cad9..eb3cda9cad9 100644
--- a/tests/auto/other/lancelot/scripts/gradients.qps
+++ b/tests/baseline/painting/scripts/gradients.qps
diff --git a/tests/auto/other/lancelot/scripts/gradientxform_device.qps b/tests/baseline/painting/scripts/gradientxform_device.qps
index cd8b55d5b6a..cd8b55d5b6a 100644
--- a/tests/auto/other/lancelot/scripts/gradientxform_device.qps
+++ b/tests/baseline/painting/scripts/gradientxform_device.qps
diff --git a/tests/auto/other/lancelot/scripts/gradientxform_logical.qps b/tests/baseline/painting/scripts/gradientxform_logical.qps
index 1bba63a929a..1bba63a929a 100644
--- a/tests/auto/other/lancelot/scripts/gradientxform_logical.qps
+++ b/tests/baseline/painting/scripts/gradientxform_logical.qps
diff --git a/tests/auto/other/lancelot/scripts/gradientxform_object.qps b/tests/baseline/painting/scripts/gradientxform_object.qps
index e34da24d465..e34da24d465 100644
--- a/tests/auto/other/lancelot/scripts/gradientxform_object.qps
+++ b/tests/baseline/painting/scripts/gradientxform_object.qps
diff --git a/tests/auto/other/lancelot/scripts/hinting.qps b/tests/baseline/painting/scripts/hinting.qps
index 7ce21b287a7..7ce21b287a7 100644
--- a/tests/auto/other/lancelot/scripts/hinting.qps
+++ b/tests/baseline/painting/scripts/hinting.qps
diff --git a/tests/auto/other/lancelot/scripts/image_dpr.qps b/tests/baseline/painting/scripts/image_dpr.qps
index 7d3ca3099c3..7d3ca3099c3 100644
--- a/tests/auto/other/lancelot/scripts/image_dpr.qps
+++ b/tests/baseline/painting/scripts/image_dpr.qps
diff --git a/tests/auto/other/lancelot/scripts/image_formats.qps b/tests/baseline/painting/scripts/image_formats.qps
index d817d04bf8a..d817d04bf8a 100644
--- a/tests/auto/other/lancelot/scripts/image_formats.qps
+++ b/tests/baseline/painting/scripts/image_formats.qps
diff --git a/tests/auto/other/lancelot/scripts/images.qps b/tests/baseline/painting/scripts/images.qps
index 3f892400e21..3f892400e21 100644
--- a/tests/auto/other/lancelot/scripts/images.qps
+++ b/tests/baseline/painting/scripts/images.qps
diff --git a/tests/auto/other/lancelot/scripts/images2.qps b/tests/baseline/painting/scripts/images2.qps
index 5159abc9284..5159abc9284 100644
--- a/tests/auto/other/lancelot/scripts/images2.qps
+++ b/tests/baseline/painting/scripts/images2.qps
diff --git a/tests/auto/other/lancelot/scripts/join_cap_styles.qps b/tests/baseline/painting/scripts/join_cap_styles.qps
index ed823f53f58..ed823f53f58 100644
--- a/tests/auto/other/lancelot/scripts/join_cap_styles.qps
+++ b/tests/baseline/painting/scripts/join_cap_styles.qps
diff --git a/tests/auto/other/lancelot/scripts/join_cap_styles_duplicate_control_points.qps b/tests/baseline/painting/scripts/join_cap_styles_duplicate_control_points.qps
index 96405ceae7b..96405ceae7b 100644
--- a/tests/auto/other/lancelot/scripts/join_cap_styles_duplicate_control_points.qps
+++ b/tests/baseline/painting/scripts/join_cap_styles_duplicate_control_points.qps
diff --git a/tests/auto/other/lancelot/scripts/linear_gradients.qps b/tests/baseline/painting/scripts/linear_gradients.qps
index b1b8dd69e7d..b1b8dd69e7d 100644
--- a/tests/auto/other/lancelot/scripts/linear_gradients.qps
+++ b/tests/baseline/painting/scripts/linear_gradients.qps
diff --git a/tests/auto/other/lancelot/scripts/linear_gradients_perspectives.qps b/tests/baseline/painting/scripts/linear_gradients_perspectives.qps
index 3ea39fbe467..3ea39fbe467 100644
--- a/tests/auto/other/lancelot/scripts/linear_gradients_perspectives.qps
+++ b/tests/baseline/painting/scripts/linear_gradients_perspectives.qps
diff --git a/tests/auto/other/lancelot/scripts/linear_resolving_gradients.qps b/tests/baseline/painting/scripts/linear_resolving_gradients.qps
index 779760cb9a9..779760cb9a9 100644
--- a/tests/auto/other/lancelot/scripts/linear_resolving_gradients.qps
+++ b/tests/baseline/painting/scripts/linear_resolving_gradients.qps
diff --git a/tests/auto/other/lancelot/scripts/lineconsistency.qps b/tests/baseline/painting/scripts/lineconsistency.qps
index 0b405776590..0b405776590 100644
--- a/tests/auto/other/lancelot/scripts/lineconsistency.qps
+++ b/tests/baseline/painting/scripts/lineconsistency.qps
diff --git a/tests/auto/other/lancelot/scripts/linedashes.qps b/tests/baseline/painting/scripts/linedashes.qps
index 78c791e68b1..78c791e68b1 100644
--- a/tests/auto/other/lancelot/scripts/linedashes.qps
+++ b/tests/baseline/painting/scripts/linedashes.qps
diff --git a/tests/auto/other/lancelot/scripts/linedashes2.qps b/tests/baseline/painting/scripts/linedashes2.qps
index b9a4cb95664..b9a4cb95664 100644
--- a/tests/auto/other/lancelot/scripts/linedashes2.qps
+++ b/tests/baseline/painting/scripts/linedashes2.qps
diff --git a/tests/auto/other/lancelot/scripts/linedashes2_aa.qps b/tests/baseline/painting/scripts/linedashes2_aa.qps
index c818ab62fef..c818ab62fef 100644
--- a/tests/auto/other/lancelot/scripts/linedashes2_aa.qps
+++ b/tests/baseline/painting/scripts/linedashes2_aa.qps
diff --git a/tests/auto/other/lancelot/scripts/lines.qps b/tests/baseline/painting/scripts/lines.qps
index 274a7f31ec1..274a7f31ec1 100644
--- a/tests/auto/other/lancelot/scripts/lines.qps
+++ b/tests/baseline/painting/scripts/lines.qps
diff --git a/tests/auto/other/lancelot/scripts/lines2.qps b/tests/baseline/painting/scripts/lines2.qps
index af6ad659392..af6ad659392 100644
--- a/tests/auto/other/lancelot/scripts/lines2.qps
+++ b/tests/baseline/painting/scripts/lines2.qps
diff --git a/tests/auto/other/lancelot/scripts/lines3.qps b/tests/baseline/painting/scripts/lines3.qps
index 676235e6521..676235e6521 100644
--- a/tests/auto/other/lancelot/scripts/lines3.qps
+++ b/tests/baseline/painting/scripts/lines3.qps
diff --git a/tests/auto/other/lancelot/scripts/pathfill.qps b/tests/baseline/painting/scripts/pathfill.qps
index 821b4684c9d..821b4684c9d 100644
--- a/tests/auto/other/lancelot/scripts/pathfill.qps
+++ b/tests/baseline/painting/scripts/pathfill.qps
diff --git a/tests/auto/other/lancelot/scripts/paths.qps b/tests/baseline/painting/scripts/paths.qps
index 454b2a039d6..454b2a039d6 100644
--- a/tests/auto/other/lancelot/scripts/paths.qps
+++ b/tests/baseline/painting/scripts/paths.qps
diff --git a/tests/auto/other/lancelot/scripts/paths_aa.qps b/tests/baseline/painting/scripts/paths_aa.qps
index 4812e2fa5f8..4812e2fa5f8 100644
--- a/tests/auto/other/lancelot/scripts/paths_aa.qps
+++ b/tests/baseline/painting/scripts/paths_aa.qps
diff --git a/tests/auto/other/lancelot/scripts/pens.qps b/tests/baseline/painting/scripts/pens.qps
index c72636dcef0..c72636dcef0 100644
--- a/tests/auto/other/lancelot/scripts/pens.qps
+++ b/tests/baseline/painting/scripts/pens.qps
diff --git a/tests/auto/other/lancelot/scripts/pens_aa.qps b/tests/baseline/painting/scripts/pens_aa.qps
index 066cac365f3..066cac365f3 100644
--- a/tests/auto/other/lancelot/scripts/pens_aa.qps
+++ b/tests/baseline/painting/scripts/pens_aa.qps
diff --git a/tests/auto/other/lancelot/scripts/pens_cosmetic.qps b/tests/baseline/painting/scripts/pens_cosmetic.qps
index 91202904622..91202904622 100644
--- a/tests/auto/other/lancelot/scripts/pens_cosmetic.qps
+++ b/tests/baseline/painting/scripts/pens_cosmetic.qps
diff --git a/tests/auto/other/lancelot/scripts/perspectives.qps b/tests/baseline/painting/scripts/perspectives.qps
index 0b903e52607..0b903e52607 100644
--- a/tests/auto/other/lancelot/scripts/perspectives.qps
+++ b/tests/baseline/painting/scripts/perspectives.qps
diff --git a/tests/auto/other/lancelot/scripts/perspectives2.qps b/tests/baseline/painting/scripts/perspectives2.qps
index 6762e21af49..6762e21af49 100644
--- a/tests/auto/other/lancelot/scripts/perspectives2.qps
+++ b/tests/baseline/painting/scripts/perspectives2.qps
diff --git a/tests/auto/other/lancelot/scripts/pixmap_rotation.qps b/tests/baseline/painting/scripts/pixmap_rotation.qps
index 8427af85af6..8427af85af6 100644
--- a/tests/auto/other/lancelot/scripts/pixmap_rotation.qps
+++ b/tests/baseline/painting/scripts/pixmap_rotation.qps
diff --git a/tests/auto/other/lancelot/scripts/pixmap_rotation2.qps b/tests/baseline/painting/scripts/pixmap_rotation2.qps
index dfb93fe09c8..dfb93fe09c8 100644
--- a/tests/auto/other/lancelot/scripts/pixmap_rotation2.qps
+++ b/tests/baseline/painting/scripts/pixmap_rotation2.qps
diff --git a/tests/auto/other/lancelot/scripts/pixmap_scaling.qps b/tests/baseline/painting/scripts/pixmap_scaling.qps
index 8a5ab2c60e5..8a5ab2c60e5 100644
--- a/tests/auto/other/lancelot/scripts/pixmap_scaling.qps
+++ b/tests/baseline/painting/scripts/pixmap_scaling.qps
diff --git a/tests/auto/other/lancelot/scripts/pixmap_subpixel.qps b/tests/baseline/painting/scripts/pixmap_subpixel.qps
index d5b7b92fc91..d5b7b92fc91 100644
--- a/tests/auto/other/lancelot/scripts/pixmap_subpixel.qps
+++ b/tests/baseline/painting/scripts/pixmap_subpixel.qps
diff --git a/tests/auto/other/lancelot/scripts/pixmaps.qps b/tests/baseline/painting/scripts/pixmaps.qps
index 0b4ba2c4fb4..0b4ba2c4fb4 100644
--- a/tests/auto/other/lancelot/scripts/pixmaps.qps
+++ b/tests/baseline/painting/scripts/pixmaps.qps
diff --git a/tests/auto/other/lancelot/scripts/porter_duff.qps b/tests/baseline/painting/scripts/porter_duff.qps
index 94e9c685221..94e9c685221 100644
--- a/tests/auto/other/lancelot/scripts/porter_duff.qps
+++ b/tests/baseline/painting/scripts/porter_duff.qps
diff --git a/tests/auto/other/lancelot/scripts/porter_duff2.qps b/tests/baseline/painting/scripts/porter_duff2.qps
index f538371ca19..f538371ca19 100644
--- a/tests/auto/other/lancelot/scripts/porter_duff2.qps
+++ b/tests/baseline/painting/scripts/porter_duff2.qps
diff --git a/tests/auto/other/lancelot/scripts/primitives.qps b/tests/baseline/painting/scripts/primitives.qps
index f44ba275662..f44ba275662 100644
--- a/tests/auto/other/lancelot/scripts/primitives.qps
+++ b/tests/baseline/painting/scripts/primitives.qps
diff --git a/tests/auto/other/lancelot/scripts/radial_gradients.qps b/tests/baseline/painting/scripts/radial_gradients.qps
index b55df8bde63..b55df8bde63 100644
--- a/tests/auto/other/lancelot/scripts/radial_gradients.qps
+++ b/tests/baseline/painting/scripts/radial_gradients.qps
diff --git a/tests/auto/other/lancelot/scripts/radial_gradients_perspectives.qps b/tests/baseline/painting/scripts/radial_gradients_perspectives.qps
index 4557354dce9..4557354dce9 100644
--- a/tests/auto/other/lancelot/scripts/radial_gradients_perspectives.qps
+++ b/tests/baseline/painting/scripts/radial_gradients_perspectives.qps
diff --git a/tests/auto/other/lancelot/scripts/rasterops.qps b/tests/baseline/painting/scripts/rasterops.qps
index d0f2da42dfc..d0f2da42dfc 100644
--- a/tests/auto/other/lancelot/scripts/rasterops.qps
+++ b/tests/baseline/painting/scripts/rasterops.qps
diff --git a/tests/auto/other/lancelot/scripts/richtext.qps b/tests/baseline/painting/scripts/richtext.qps
index 787c97421bf..787c97421bf 100644
--- a/tests/auto/other/lancelot/scripts/richtext.qps
+++ b/tests/baseline/painting/scripts/richtext.qps
diff --git a/tests/auto/other/lancelot/scripts/sizes.qps b/tests/baseline/painting/scripts/sizes.qps
index 12b0f4af1e0..12b0f4af1e0 100644
--- a/tests/auto/other/lancelot/scripts/sizes.qps
+++ b/tests/baseline/painting/scripts/sizes.qps
diff --git a/tests/auto/other/lancelot/scripts/smallcaps_path.qps b/tests/baseline/painting/scripts/smallcaps_path.qps
index 4e89b50d96d..4e89b50d96d 100644
--- a/tests/auto/other/lancelot/scripts/smallcaps_path.qps
+++ b/tests/baseline/painting/scripts/smallcaps_path.qps
diff --git a/tests/auto/other/lancelot/scripts/statictext.qps b/tests/baseline/painting/scripts/statictext.qps
index c2a30d08649..c2a30d08649 100644
--- a/tests/auto/other/lancelot/scripts/statictext.qps
+++ b/tests/baseline/painting/scripts/statictext.qps
diff --git a/tests/auto/other/lancelot/scripts/text.qps b/tests/baseline/painting/scripts/text.qps
index 4d81b3084c7..4d81b3084c7 100644
--- a/tests/auto/other/lancelot/scripts/text.qps
+++ b/tests/baseline/painting/scripts/text.qps
diff --git a/tests/auto/other/lancelot/scripts/text_perspectives.qps b/tests/baseline/painting/scripts/text_perspectives.qps
index 4c74306265a..4c74306265a 100644
--- a/tests/auto/other/lancelot/scripts/text_perspectives.qps
+++ b/tests/baseline/painting/scripts/text_perspectives.qps
diff --git a/tests/auto/other/lancelot/scripts/thinlines.qps b/tests/baseline/painting/scripts/thinlines.qps
index dddfff45382..dddfff45382 100644
--- a/tests/auto/other/lancelot/scripts/thinlines.qps
+++ b/tests/baseline/painting/scripts/thinlines.qps
diff --git a/tests/auto/other/lancelot/scripts/tiled_pixmap.qps b/tests/baseline/painting/scripts/tiled_pixmap.qps
index 0ce3a7834ce..0ce3a7834ce 100644
--- a/tests/auto/other/lancelot/scripts/tiled_pixmap.qps
+++ b/tests/baseline/painting/scripts/tiled_pixmap.qps
diff --git a/tests/auto/other/lancelot/scripts/tinydashes.qps b/tests/baseline/painting/scripts/tinydashes.qps
index d41ced7f5f9..d41ced7f5f9 100644
--- a/tests/auto/other/lancelot/scripts/tinydashes.qps
+++ b/tests/baseline/painting/scripts/tinydashes.qps
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/baseline/painting/tst_baseline_painting.cpp
index 0f136d4938a..a5d787f6ceb 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/baseline/painting/tst_baseline_painting.cpp
@@ -486,4 +486,4 @@ int main(int argc, char *argv[])
return _realmain(argc, argv);
}
-#include "tst_lancelot.moc"
+#include "tst_baseline_painting.moc"
diff --git a/tests/baselineserver/shared/baselineprotocol.cpp b/tests/baseline/shared/baselineprotocol.cpp
index 63cce0bd802..63cce0bd802 100644
--- a/tests/baselineserver/shared/baselineprotocol.cpp
+++ b/tests/baseline/shared/baselineprotocol.cpp
diff --git a/tests/baselineserver/shared/baselineprotocol.h b/tests/baseline/shared/baselineprotocol.h
index 510762e304e..510762e304e 100644
--- a/tests/baselineserver/shared/baselineprotocol.h
+++ b/tests/baseline/shared/baselineprotocol.h
diff --git a/tests/baselineserver/shared/baselineprotocol.pri b/tests/baseline/shared/baselineprotocol.pri
index 996f9d5a1f7..996f9d5a1f7 100644
--- a/tests/baselineserver/shared/baselineprotocol.pri
+++ b/tests/baseline/shared/baselineprotocol.pri
diff --git a/tests/baselineserver/shared/lookup3.cpp b/tests/baseline/shared/lookup3.cpp
index 3d8d763bb79..3d8d763bb79 100644
--- a/tests/baselineserver/shared/lookup3.cpp
+++ b/tests/baseline/shared/lookup3.cpp
diff --git a/tests/baselineserver/shared/qbaselinetest.cpp b/tests/baseline/shared/qbaselinetest.cpp
index 3587cd01ea4..3587cd01ea4 100644
--- a/tests/baselineserver/shared/qbaselinetest.cpp
+++ b/tests/baseline/shared/qbaselinetest.cpp
diff --git a/tests/baselineserver/shared/qbaselinetest.h b/tests/baseline/shared/qbaselinetest.h
index ede0fe42e34..ede0fe42e34 100644
--- a/tests/baselineserver/shared/qbaselinetest.h
+++ b/tests/baseline/shared/qbaselinetest.h
diff --git a/tests/baselineserver/shared/qbaselinetest.pri b/tests/baseline/shared/qbaselinetest.pri
index 921871b1894..921871b1894 100644
--- a/tests/baselineserver/shared/qbaselinetest.pri
+++ b/tests/baseline/shared/qbaselinetest.pri
diff --git a/tests/baselineserver/.gitignore b/tests/baselineserver/.gitignore
deleted file mode 100644
index cc513e0df25..00000000000
--- a/tests/baselineserver/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-storage
-bin/baselineserver
diff --git a/tests/baselineserver/bin/runserver b/tests/baselineserver/bin/runserver
deleted file mode 100755
index 48c5c1d0869..00000000000
--- a/tests/baselineserver/bin/runserver
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-logfile=baselineserver.log
-
-while true; do
- echo >> $logfile
- echo -n "***RESTARTING*** " >> $logfile
- date >> $logfile
-
- ./baselineserver 2>&1 | tee -a $logfile
-
- sleep 2
-done
diff --git a/tests/baselineserver/src/baselineserver.cpp b/tests/baselineserver/src/baselineserver.cpp
deleted file mode 100644
index c6e12dc09cf..00000000000
--- a/tests/baselineserver/src/baselineserver.cpp
+++ /dev/null
@@ -1,853 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#define QT_USE_FAST_CONCATENATION
-#define QT_USE_FAST_OPERATOR_PLUS
-
-#include "baselineserver.h"
-#include <QBuffer>
-#include <QFile>
-#include <QDir>
-#include <QCoreApplication>
-#include <QFileInfo>
-#include <QHostInfo>
-#include <QTextStream>
-#include <QProcess>
-#include <QDirIterator>
-#include <QUrl>
-#include <QRegularExpression>
-
-// extra fields, for use in image metadata storage
-const QString PI_ImageChecksum(QLS("ImageChecksum"));
-const QString PI_RunId(QLS("RunId"));
-const QString PI_CreationDate(QLS("CreationDate"));
-
-QString BaselineServer::storage;
-QString BaselineServer::url;
-QStringList BaselineServer::pathKeys;
-
-BaselineServer::BaselineServer(QObject *parent)
- : QTcpServer(parent), lastRunIdIdx(0)
-{
- QFileInfo me(QCoreApplication::applicationFilePath());
- meLastMod = me.lastModified();
- heartbeatTimer = new QTimer(this);
- connect(heartbeatTimer, SIGNAL(timeout()), this, SLOT(heartbeat()));
- heartbeatTimer->start(HEARTBEAT*1000);
-}
-
-QString BaselineServer::storagePath()
-{
- if (storage.isEmpty()) {
- storage = QLS(qgetenv("QT_LANCELOT_DIR"));
- if (storage.isEmpty())
- storage = QLS("/var/www");
- }
- return storage;
-}
-
-QString BaselineServer::baseUrl()
-{
- if (url.isEmpty()) {
- url = QLS("https://")
- + QHostInfo::localHostName().toLatin1() + '.'
- + QHostInfo::localDomainName().toLatin1() + '/';
- }
- return url;
-}
-
-QStringList BaselineServer::defaultPathKeys()
-{
- if (pathKeys.isEmpty())
- pathKeys << PI_QtVersion << PI_QMakeSpec << PI_HostName;
- return pathKeys;
-}
-
-void BaselineServer::incomingConnection(qintptr socketDescriptor)
-{
- QString runId = QDateTime::currentDateTime().toString(QLS("MMMdd-hhmmss"));
- if (runId == lastRunId) {
- runId += QLC('-') + QString::number(++lastRunIdIdx);
- } else {
- lastRunId = runId;
- lastRunIdIdx = 0;
- }
- qDebug() << "Server: New connection! RunId:" << runId;
- BaselineThread *thread = new BaselineThread(runId, socketDescriptor, this);
- connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
- thread->start();
-}
-
-void BaselineServer::heartbeat()
-{
- // The idea is to exit to be restarted when modified, as soon as not actually serving
- QFileInfo me(QCoreApplication::applicationFilePath());
- if (me.lastModified() == meLastMod)
- return;
- if (!me.exists() || !me.isExecutable())
- return;
-
- //# (could close() here to avoid accepting new connections, to avoid livelock)
- //# also, could check for a timeout to force exit, to avoid hung threads blocking
- bool isServing = false;
- foreach(BaselineThread *thread, findChildren<BaselineThread *>()) {
- if (thread->isRunning()) {
- isServing = true;
- break;
- }
- }
-
- if (!isServing)
- QCoreApplication::exit();
-}
-
-BaselineThread::BaselineThread(const QString &runId, int socketDescriptor, QObject *parent)
- : QThread(parent), runId(runId), socketDescriptor(socketDescriptor)
-{
-}
-
-void BaselineThread::run()
-{
- BaselineHandler handler(runId, socketDescriptor);
- exec();
-}
-
-
-BaselineHandler::BaselineHandler(const QString &runId, int socketDescriptor)
- : QObject(), runId(runId), connectionEstablished(false), settings(0), fuzzLevel(0)
-{
- idleTimer = new QTimer(this);
- idleTimer->setSingleShot(true);
- idleTimer->setInterval(IDLE_CLIENT_TIMEOUT * 1000);
- connect(idleTimer, SIGNAL(timeout()), this, SLOT(idleClientTimeout()));
- idleTimer->start();
-
- if (socketDescriptor == -1)
- return;
-
- connect(&proto.socket, SIGNAL(readyRead()), this, SLOT(receiveRequest()));
- connect(&proto.socket, SIGNAL(disconnected()), this, SLOT(receiveDisconnect()));
- proto.socket.setSocketDescriptor(socketDescriptor);
- proto.socket.setSocketOption(QAbstractSocket::KeepAliveOption, 1);
-}
-
-const char *BaselineHandler::logtime()
-{
- return 0;
- //return QTime::currentTime().toString(QLS("mm:ss.zzz"));
-}
-
-QString BaselineHandler::projectPath(bool absolute) const
-{
- QString p = clientInfo.value(PI_Project);
- return absolute ? BaselineServer::storagePath() + QLC('/') + p : p;
-}
-
-bool BaselineHandler::checkClient(QByteArray *errMsg, bool *dryRunMode)
-{
- if (!errMsg)
- return false;
- if (clientInfo.value(PI_Project).isEmpty() || clientInfo.value(PI_TestCase).isEmpty()) {
- *errMsg = "No Project and/or TestCase specified in client info.";
- return false;
- }
-
- // Determine ad-hoc state ### hardcoded for now
- if (clientInfo.value(PI_TestCase) == QLS("tst_Lancelot")) {
- //### Todo: push this stuff out in a script
- if (!clientInfo.isAdHocRun()) {
- // ### comp. with earlier versions still running (4.8) (?)
- clientInfo.setAdHocRun(clientInfo.value(PI_PulseGitBranch).isEmpty() && clientInfo.value(PI_PulseTestrBranch).isEmpty());
- }
- }
- else {
- // TBD
- }
-
- if (clientInfo.isAdHocRun()) {
- if (dryRunMode)
- *dryRunMode = false;
- return true;
- }
-
- // Not ad hoc: filter the client
- settings->beginGroup("ClientFilters");
- bool matched = false;
- bool dryRunReq = false;
- foreach (const QString &rule, settings->childKeys()) {
- //qDebug() << " > RULE" << rule;
- dryRunReq = false;
- QString ruleMode = settings->value(rule).toString().toLower();
- if (ruleMode == QLS("dryrun"))
- dryRunReq = true;
- else if (ruleMode != QLS("enabled"))
- continue;
- settings->beginGroup(rule);
- bool ruleMatched = true;
- foreach (const QString &filterKey, settings->childKeys()) {
- //qDebug() << " > FILTER" << filterKey;
- QString filter = settings->value(filterKey).toString();
- if (filter.isEmpty())
- continue;
- QString platVal = clientInfo.value(filterKey);
- if (!platVal.contains(filter)) {
- ruleMatched = false;
- break;
- }
- }
- if (ruleMatched) {
- ruleName = rule;
- matched = true;
- break;
- }
- settings->endGroup();
- }
-
- if (!matched && errMsg)
- *errMsg = "Non-adhoc client did not match any filter rule in " + settings->fileName().toLatin1();
-
- if (matched && dryRunMode)
- *dryRunMode = dryRunReq;
-
- // NB! Must reset the settings object before returning
- while (!settings->group().isEmpty())
- settings->endGroup();
-
- return matched;
-}
-
-bool BaselineHandler::establishConnection()
-{
- if (!proto.acceptConnection(&clientInfo)) {
- qWarning() << runId << logtime() << "Accepting new connection from" << proto.socket.peerAddress().toString() << "failed." << proto.errorMessage();
- proto.sendBlock(BaselineProtocol::Abort, proto.errorMessage().toLatin1()); // In case the client can hear us, tell it what's wrong.
- proto.socket.disconnectFromHost();
- return false;
- }
- QString logMsg;
- foreach (QString key, clientInfo.keys()) {
- if (key != PI_HostName && key != PI_HostAddress)
- logMsg += key + QLS(": '") + clientInfo.value(key) + QLS("', ");
- }
- qDebug() << runId << logtime() << "Connection established with" << clientInfo.value(PI_HostName)
- << '[' << qPrintable(clientInfo.value(PI_HostAddress)) << ']' << logMsg
- << "Overrides:" << clientInfo.overrides() << "AdHoc-Run:" << clientInfo.isAdHocRun();
-
- // ### Hardcoded backwards compatibility: add project field for certain existing clients that lack it
- if (clientInfo.value(PI_Project).isEmpty()) {
- QString tc = clientInfo.value(PI_TestCase);
- if (tc == QLS("tst_Lancelot"))
- clientInfo.insert(PI_Project, QLS("Raster"));
- else if (tc == QLS("tst_Scenegraph"))
- clientInfo.insert(PI_Project, QLS("SceneGraph"));
- else
- clientInfo.insert(PI_Project, QLS("Other"));
- }
-
- QString settingsFile = projectPath() + QLS("/config.ini");
- settings = new QSettings(settingsFile, QSettings::IniFormat, this);
-
- QByteArray errMsg;
- bool dryRunMode = false;
- if (!checkClient(&errMsg, &dryRunMode)) {
- qDebug() << runId << logtime() << "Rejecting connection:" << errMsg;
- proto.sendBlock(BaselineProtocol::Abort, errMsg);
- proto.socket.disconnectFromHost();
- return false;
- }
-
- fuzzLevel = qBound(0, settings->value("FuzzLevel").toInt(), 100);
- if (!clientInfo.isAdHocRun()) {
- qDebug() << runId << logtime() << "Client matches filter rule" << ruleName
- << "Dryrun:" << dryRunMode
- << "FuzzLevel:" << fuzzLevel
- << "ReportMissingResults:" << settings->value("ReportMissingResults").toBool();
- }
-
- proto.sendBlock(dryRunMode ? BaselineProtocol::DoDryRun : BaselineProtocol::Ack, QByteArray());
- report.init(this, runId, clientInfo, settings);
- return true;
-}
-
-void BaselineHandler::receiveRequest()
-{
- idleTimer->start(); // Restart idle client timeout
-
- if (!connectionEstablished) {
- connectionEstablished = establishConnection();
- return;
- }
-
- QByteArray block;
- BaselineProtocol::Command cmd;
- if (!proto.receiveBlock(&cmd, &block)) {
- qWarning() << runId << logtime() << "Command reception failed. "<< proto.errorMessage();
- QThread::currentThread()->exit(1);
- return;
- }
-
- switch(cmd) {
- case BaselineProtocol::RequestBaselineChecksums:
- provideBaselineChecksums(block);
- break;
- case BaselineProtocol::AcceptMatch:
- recordMatch(block);
- break;
- case BaselineProtocol::AcceptNewBaseline:
- storeImage(block, true);
- break;
- case BaselineProtocol::AcceptMismatch:
- storeImage(block, false);
- break;
- default:
- qWarning() << runId << logtime() << "Unknown command received. " << proto.errorMessage();
- proto.sendBlock(BaselineProtocol::UnknownError, QByteArray());
- }
-}
-
-
-void BaselineHandler::provideBaselineChecksums(const QByteArray &itemListBlock)
-{
- ImageItemList itemList;
- QDataStream ds(itemListBlock);
- ds >> itemList;
- qDebug() << runId << logtime() << "Received request for checksums for" << itemList.count()
- << "items in test function" << itemList.at(0).testFunction;
-
- for (ImageItemList::iterator i = itemList.begin(); i != itemList.end(); ++i) {
- i->imageChecksums.clear();
- i->status = ImageItem::BaselineNotFound;
- QString prefix = pathForItem(*i, true);
- PlatformInfo itemData = fetchItemMetadata(prefix);
- if (itemData.contains(PI_ImageChecksum)) {
- bool ok = false;
- quint64 checksum = itemData.value(PI_ImageChecksum).toULongLong(&ok, 16);
- if (ok) {
- i->imageChecksums.prepend(checksum);
- i->status = ImageItem::Ok;
- }
- }
- }
-
- // Find and mark blacklisted items
- QString context = pathForItem(itemList.at(0), true, false).section(QLC('/'), 0, -2);
- if (itemList.count() > 0) {
- QFile file(BaselineServer::storagePath() + QLC('/') + context + QLS("/BLACKLIST"));
- if (file.open(QIODevice::ReadOnly)) {
- QTextStream in(&file);
- do {
- QString itemName = in.readLine();
- if (!itemName.isNull()) {
- for (ImageItemList::iterator i = itemList.begin(); i != itemList.end(); ++i) {
- if (i->itemName == itemName)
- i->status = ImageItem::IgnoreItem;
- }
- }
- } while (!in.atEnd());
- }
- }
-
- QByteArray block;
- QDataStream ods(&block, QIODevice::WriteOnly);
- ods << itemList;
- proto.sendBlock(BaselineProtocol::Ack, block);
- report.addItems(itemList);
-}
-
-
-void BaselineHandler::recordMatch(const QByteArray &itemBlock)
-{
- QDataStream ds(itemBlock);
- ImageItem item;
- ds >> item;
- report.addResult(item);
- proto.sendBlock(BaselineProtocol::Ack, QByteArray());
-}
-
-
-void BaselineHandler::storeImage(const QByteArray &itemBlock, bool isBaseline)
-{
- QDataStream ds(itemBlock);
- ImageItem item;
- ds >> item;
-
- if (isBaseline && !clientInfo.overrides().isEmpty()) {
- qDebug() << runId << logtime() << "Received baseline from client with override info, ignoring. Item:" << item.itemName;
- proto.sendBlock(BaselineProtocol::UnknownError, "New baselines not accepted from client with override info.");
- return;
- }
-
- QString blPrefix = pathForItem(item, true);
- QString mmPrefix = pathForItem(item, false);
- QString prefix = isBaseline ? blPrefix : mmPrefix;
-
- qDebug() << runId << logtime() << "Received" << (isBaseline ? "baseline" : "mismatched") << "image for:" << item.itemName << "Storing in" << prefix;
-
- // Reply to the client
- QString msg;
- if (isBaseline)
- msg = QLS("New baseline image stored: ") + blPrefix + QLS(FileFormat);
- else
- msg = BaselineServer::baseUrl() + report.filePath();
-
- if (isBaseline || !fuzzLevel)
- proto.sendBlock(BaselineProtocol::Ack, msg.toLatin1()); // Do early reply if possible: don't make the client wait longer than necessary
-
- // Store the image
- QString dir = prefix.section(QLC('/'), 0, -2);
- QDir cwd;
- if (!cwd.exists(dir))
- cwd.mkpath(dir);
- item.image.save(prefix + QLS(FileFormat), FileFormat);
-
- PlatformInfo itemData = clientInfo;
- itemData.insert(PI_ImageChecksum, QString::number(item.imageChecksums.at(0), 16)); //# Only the first is stored. TBD: get rid of list
- itemData.insert(PI_RunId, runId);
- itemData.insert(PI_CreationDate, QDateTime::currentDateTime().toString());
- storeItemMetadata(itemData, prefix);
-
- if (!isBaseline) {
- // Do fuzzy matching
- bool fuzzyMatch = false;
- if (fuzzLevel) {
- BaselineProtocol::Command cmd = BaselineProtocol::Ack;
- fuzzyMatch = fuzzyCompare(blPrefix, mmPrefix);
- if (fuzzyMatch) {
- msg.prepend(QString("Fuzzy match at fuzzlevel %1%. Report: ").arg(fuzzLevel));
- cmd = BaselineProtocol::FuzzyMatch;
- }
- proto.sendBlock(cmd, msg.toLatin1()); // We didn't reply earlier
- }
-
- // Add to report
- item.status = fuzzyMatch ? ImageItem::FuzzyMatch : ImageItem::Mismatch;
- report.addResult(item);
- }
-}
-
-
-void BaselineHandler::storeItemMetadata(const PlatformInfo &metadata, const QString &path)
-{
- QFile file(path + QLS(MetadataFileExt));
- if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
- qWarning() << runId << logtime() << "ERROR: could not write to file" << file.fileName();
- return;
- }
- QTextStream out(&file);
- PlatformInfo::const_iterator it = metadata.constBegin();
- while (it != metadata.constEnd()) {
- out << it.key() << ": " << it.value() << endl;
- ++it;
- }
- file.close();
-}
-
-
-PlatformInfo BaselineHandler::fetchItemMetadata(const QString &path)
-{
- PlatformInfo res;
- QFile file(path + QLS(MetadataFileExt));
- if (!file.open(QIODevice::ReadOnly) || !QFile::exists(path + QLS(FileFormat)))
- return res;
- QTextStream in(&file);
- do {
- QString line = in.readLine();
- int idx = line.indexOf(QLS(": "));
- if (idx > 0)
- res.insert(line.left(idx), line.mid(idx+2));
- } while (!in.atEnd());
- return res;
-}
-
-
-void BaselineHandler::idleClientTimeout()
-{
- qWarning() << runId << logtime() << "Idle client timeout: no request received for" << IDLE_CLIENT_TIMEOUT << "seconds, terminating connection.";
- proto.socket.disconnectFromHost();
-}
-
-
-void BaselineHandler::receiveDisconnect()
-{
- qDebug() << runId << logtime() << "Client disconnected.";
- report.end();
- if (report.reportProduced() && !clientInfo.isAdHocRun())
- issueMismatchNotification();
- if (settings && settings->value("ProcessXmlResults").toBool() && !clientInfo.isAdHocRun()) {
- // ### TBD: actually execute the processing command. For now, just generate the xml files.
- QString xmlDir = report.writeResultsXmlFiles();
- }
- QThread::currentThread()->exit(0);
-}
-
-
-PlatformInfo BaselineHandler::mapPlatformInfo(const PlatformInfo& orig) const
-{
- PlatformInfo mapped;
- foreach (const QString &key, orig.uniqueKeys()) {
- QString val = orig.value(key).simplified();
- val.replace(QLC('/'), QLC('_'));
- val.replace(QLC(' '), QLC('_'));
- mapped.insert(key, QUrl::toPercentEncoding(val, "+"));
- //qDebug() << "MAPPED" << key << "FROM" << orig.value(key) << "TO" << mapped.value(key);
- }
-
- // Special fixup for OS version
- if (mapped.value(PI_OSName) == QLS("MacOS")) {
- int ver = mapped.value(PI_OSVersion).toInt();
- if (ver > 1)
- mapped.insert(PI_OSVersion, QString("MV_10_%1").arg(ver-2));
- }
- else if (mapped.value(PI_OSName) == QLS("Windows")) {
- // TBD: map windows version numbers to names
- }
-
- // Special fixup for hostname
- QString host = mapped.value(PI_HostName).section(QLC('.'), 0, 0); // Filter away domain, if any
- if (host.isEmpty() || host == QLS("localhost")) {
- host = orig.value(PI_HostAddress);
- } else {
- if (!orig.isAdHocRun()) { // i.e. CI system run, so remove index postfix typical of vm hostnames
- host.remove(QRegularExpression(QLS("\\d+$")));
- if (host.endsWith(QLC('-')))
- host.chop(1);
- }
- }
- if (host.isEmpty())
- host = QLS("UNKNOWN-HOST");
- if (mapped.value(PI_OSName) == QLS("MacOS")) // handle multiple os versions on same host
- host += QLC('-') + mapped.value(PI_OSVersion);
- mapped.insert(PI_HostName, host);
-
- // Special fixup for Qt version
- QString ver = mapped.value(PI_QtVersion);
- if (!ver.isEmpty())
- mapped.insert(PI_QtVersion, ver.prepend(QLS("Qt-")));
-
- return mapped;
-}
-
-
-QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline, bool absolute) const
-{
- if (mappedClientInfo.isEmpty()) {
- mappedClientInfo = mapPlatformInfo(clientInfo);
- PlatformInfo oraw = clientInfo;
- // ### simplify: don't map if no overrides!
- for (int i = 0; i < clientInfo.overrides().size()-1; i+=2)
- oraw.insert(clientInfo.overrides().at(i), clientInfo.overrides().at(i+1));
- overriddenMappedClientInfo = mapPlatformInfo(oraw);
- }
-
- const PlatformInfo& mapped = isBaseline ? overriddenMappedClientInfo : mappedClientInfo;
-
- QString itemName = safeName(item.itemName);
- itemName.append(QLC('_') + QString::number(item.itemChecksum, 16).rightJustified(4, QLC('0')));
-
- QStringList path;
- path += projectPath(absolute);
- path += mapped.value(PI_TestCase);
- path += QLS(isBaseline ? "baselines" : "mismatches");
- path += item.testFunction;
- QStringList itemPathKeys;
- if (settings)
- itemPathKeys = settings->value("ItemPathKeys").toStringList();
- if (itemPathKeys.isEmpty())
- itemPathKeys = BaselineServer::defaultPathKeys();
- foreach (const QString &key, itemPathKeys)
- path += mapped.value(key, QLS("UNSET-")+key);
- if (!isBaseline)
- path += runId;
- path += itemName + QLC('.');
-
- return path.join(QLS("/"));
-}
-
-
-QString BaselineHandler::view(const QString &baseline, const QString &rendered, const QString &compared)
-{
- QFile f(":/templates/view.html");
- f.open(QIODevice::ReadOnly);
- return QString::fromLatin1(f.readAll()).arg('/'+baseline, '/'+rendered, '/'+compared, diffstats(baseline, rendered));
-}
-
-QString BaselineHandler::diffstats(const QString &baseline, const QString &rendered)
-{
- QImage blImg(BaselineServer::storagePath() + QLC('/') + baseline);
- QImage mmImg(BaselineServer::storagePath() + QLC('/') + rendered);
- if (blImg.isNull() || mmImg.isNull())
- return QLS("Could not compute diffstats: image loading failed.");
-
- // ### TBD: cache the results
- return computeMismatchScore(blImg, mmImg);
-}
-
-QString BaselineHandler::clearAllBaselines(const QString &context)
-{
- int tot = 0;
- int failed = 0;
- QDirIterator it(BaselineServer::storagePath() + QLC('/') + context,
- QStringList() << QLS("*.") + QLS(FileFormat)
- << QLS("*.") + QLS(MetadataFileExt)
- << QLS("*.") + QLS(ThumbnailExt));
- while (it.hasNext()) {
- bool counting = !it.next().endsWith(QLS(ThumbnailExt));
- if (counting)
- tot++;
- if (!QFile::remove(it.filePath()) && counting)
- failed++;
- }
- return QString(QLS("%1 of %2 baselines cleared from context ")).arg((tot-failed)/2).arg(tot/2) + context;
-}
-
-QString BaselineHandler::updateBaselines(const QString &context, const QString &mismatchContext, const QString &itemFile)
-{
- int tot = 0;
- int failed = 0;
- QString storagePrefix = BaselineServer::storagePath() + QLC('/');
- // If itemId is set, update just that one, otherwise, update all:
- QString filter = itemFile.isEmpty() ? QLS("*_????.") : itemFile;
- QDirIterator it(storagePrefix + mismatchContext,
- QStringList() << filter + QLS(FileFormat)
- << filter + QLS(MetadataFileExt)
- << filter + QLS(ThumbnailExt));
- while (it.hasNext()) {
- bool counting = !it.next().endsWith(QLS(ThumbnailExt));
- if (counting)
- tot++;
- QString oldFile = storagePrefix + context + QLC('/') + it.fileName();
- QFile::remove(oldFile); // Remove existing baseline file
- if (!QFile::copy(it.filePath(), oldFile) && counting) // and replace it with the mismatch
- failed++;
- }
- return QString(QLS("%1 of %2 baselines updated in context %3 from context %4")).arg((tot-failed)/2).arg(tot/2).arg(context, mismatchContext);
-}
-
-QString BaselineHandler::blacklistTest(const QString &context, const QString &itemId, bool removeFromBlacklist)
-{
- QFile file(BaselineServer::storagePath() + QLC('/') + context + QLS("/BLACKLIST"));
- QStringList blackList;
- if (file.open(QIODevice::ReadWrite)) {
- while (!file.atEnd())
- blackList.append(file.readLine().trimmed());
-
- if (removeFromBlacklist)
- blackList.removeAll(itemId);
- else if (!blackList.contains(itemId))
- blackList.append(itemId);
-
- file.resize(0);
- foreach (QString id, blackList)
- file.write(id.toLatin1() + '\n');
- file.close();
- return QLS(removeFromBlacklist ? "Whitelisted " : "Blacklisted ") + itemId + QLS(" in context ") + context;
- } else {
- return QLS("Unable to update blacklisted tests, failed to open ") + file.fileName();
- }
-}
-
-
-void BaselineHandler::testPathMapping()
-{
- qDebug() << "Storage prefix:" << BaselineServer::storagePath();
-
- QStringList hosts;
- hosts << QLS("bq-ubuntu910-x86-01")
- << QLS("bq-ubuntu910-x86-15")
- << QLS("osl-mac-master-5.test.qt-project.org")
- << QLS("osl-mac-master-6.test.qt-project.org")
- << QLS("sv-xp-vs-010")
- << QLS("sv-xp-vs-011")
- << QLS("sv-solaris-sparc-008")
- << QLS("macbuilder-02.test.troll.no")
- << QLS("bqvm1164")
- << QLS("chimera")
- << QLS("localhost")
- << QLS("");
-
- ImageItem item;
- item.testFunction = QLS("testPathMapping");
- item.itemName = QLS("arcs.qps");
- item.imageChecksums << 0x0123456789abcdefULL;
- item.itemChecksum = 0x0123;
-
- clientInfo.insert(PI_QtVersion, QLS("5.0.0"));
- clientInfo.insert(PI_QMakeSpec, QLS("linux-g++"));
- clientInfo.insert(PI_PulseGitBranch, QLS("somebranch"));
- clientInfo.setAdHocRun(false);
- foreach(const QString& host, hosts) {
- mappedClientInfo.clear();
- clientInfo.insert(PI_HostName, host);
- qDebug() << "Baseline from" << host << "->" << pathForItem(item, true);
- qDebug() << "Mismatch from" << host << "->" << pathForItem(item, false);
- }
-}
-
-
-QString BaselineHandler::computeMismatchScore(const QImage &baseline, const QImage &rendered)
-{
- if (baseline.size() != rendered.size() || baseline.format() != rendered.format())
- return QLS("[No diffstats, incomparable images.]");
- if (baseline.depth() != 32)
- return QLS("[Diffstats computation not implemented for format.]");
-
- int w = baseline.width();
- int h = baseline.height();
-
- uint ncd = 0; // number of differing color pixels
- uint nad = 0; // number of differing alpha pixels
- uint scd = 0; // sum of color pixel difference
- uint sad = 0; // sum of alpha pixel difference
- uint mind = 0; // minimum difference
- uint maxd = 0; // maximum difference
-
- for (int y=0; y<h; ++y) {
- const QRgb *bl = (const QRgb *) baseline.constScanLine(y);
- const QRgb *rl = (const QRgb *) rendered.constScanLine(y);
- for (int x=0; x<w; ++x) {
- QRgb b = bl[x];
- QRgb r = rl[x];
- if (r != b) {
- uint dr = qAbs(qRed(b) - qRed(r));
- uint dg = qAbs(qGreen(b) - qGreen(r));
- uint db = qAbs(qBlue(b) - qBlue(r));
- uint ds = (dr + dg + db) / 3;
- uint da = qAbs(qAlpha(b) - qAlpha(r));
- if (ds) {
- ncd++;
- scd += ds;
- if (!mind || ds < mind)
- mind = ds;
- if (ds > maxd)
- maxd = ds;
- }
- if (da) {
- nad++;
- sad += da;
- }
- }
- }
- }
-
-
- double pcd = 100.0 * ncd / (w*h); // percent of pixels that differ
- double acd = ncd ? double(scd) / (ncd) : 0; // avg. difference
-/*
- if (baseline.hasAlphaChannel()) {
- double pad = 100.0 * nad / (w*h); // percent of pixels that differ
- double aad = nad ? double(sad) / (3*nad) : 0; // avg. difference
- }
-*/
- QString res = "<table>\n";
- QString item = "<tr><td>%1</td><td align=right>%2</td></tr>\n";
- res += item.arg("Number of mismatching pixels").arg(ncd);
- res += item.arg("Percentage mismatching pixels").arg(pcd, 0, 'g', 2);
- res += item.arg("Minimum pixel distance").arg(mind);
- res += item.arg("Maximum pixel distance").arg(maxd);
- if (acd >= 10.0)
- res += item.arg("Average pixel distance").arg(qRound(acd));
- else
- res += item.arg("Average pixel distance").arg(acd, 0, 'g', 2);
-
- if (baseline.hasAlphaChannel())
- res += item.arg("Number of mismatching alpha values").arg(nad);
-
- res += "</table>\n";
- res += "<p>(Distances are normalized to the range 0-255)</p>\n";
- return res;
-}
-
-
-bool BaselineHandler::fuzzyCompare(const QString &baselinePath, const QString &mismatchPath)
-{
- QProcess compareProc;
- QStringList args;
- args << "-fuzz" << QString("%1%").arg(fuzzLevel) << "-metric" << "AE";
- args << baselinePath + QLS(FileFormat) << mismatchPath + QLS(FileFormat) << "/dev/null"; // TBD: Should save output image, so report won't have to regenerate it
-
- compareProc.setProcessChannelMode(QProcess::MergedChannels);
- compareProc.start("compare", args, QIODevice::ReadOnly);
- if (compareProc.waitForFinished(3000) && compareProc.error() == QProcess::UnknownError) {
- bool ok = false;
- int metric = compareProc.readAll().trimmed().toInt(&ok);
- if (ok && metric == 0)
- return true;
- }
- return false;
-}
-
-
-void BaselineHandler::issueMismatchNotification()
-{
- // KISS: hardcoded use of the "sendemail" utility. Make this configurable if and when demand arises.
- if (!settings)
- return;
-
- settings->beginGroup("Notification");
- QStringList receivers = settings->value("Receivers").toStringList();
- QString sender = settings->value("Sender").toString();
- QString server = settings->value("SMTPserver").toString();
- settings->endGroup();
- if (receivers.isEmpty() || sender.isEmpty() || server.isEmpty())
- return;
-
- QString msg = QString("\nResult summary for test run %1:\n").arg(runId);
- msg += report.summary();
- msg += "\nReport: " + BaselineServer::baseUrl() + report.filePath() + "\n";
-
- msg += "\nTest run platform properties:\n------------------\n";
- foreach (const QString &key, clientInfo.keys())
- msg += key + ": " + clientInfo.value(key) + '\n';
- msg += "\nCheers,\n- Your friendly Lancelot Baseline Server\n";
-
- QProcess proc;
- QString cmd = "sendemail";
- QStringList args;
- args << "-s" << server << "-f" << sender << "-t" << receivers;
- args << "-u" << "[Lancelot] Mismatch report for project " + clientInfo.value(PI_Project) + ", test case " + clientInfo.value(PI_TestCase);
- args << "-m" << msg;
-
- //proc.setProcessChannelMode(QProcess::MergedChannels);
- proc.start(cmd, args);
- if (!proc.waitForFinished(10 * 1000) || (proc.exitStatus() != QProcess::NormalExit) || proc.exitCode()) {
- qWarning() << "FAILED to issue notification. Command:" << cmd << args.mid(0, args.size()-2);
- qWarning() << " Command standard output:" << proc.readAllStandardOutput();
- qWarning() << " Command error output:" << proc.readAllStandardError();
- }
-}
-
-
-// Make an identifer safer for use as filename and URL
-QString safeName(const QString& name)
-{
- QString res = name.simplified();
- res.replace(QLC(' '), QLC('_'));
- res.replace(QLC('.'), QLC('_'));
- res.replace(QLC('/'), QLC('^'));
- return res;
-}
diff --git a/tests/baselineserver/src/baselineserver.h b/tests/baselineserver/src/baselineserver.h
deleted file mode 100644
index 25ef17f0230..00000000000
--- a/tests/baselineserver/src/baselineserver.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef BASELINESERVER_H
-#define BASELINESERVER_H
-
-#include <QStringList>
-#include <QTcpServer>
-#include <QThread>
-#include <QTcpSocket>
-#include <QScopedPointer>
-#include <QTimer>
-#include <QDateTime>
-#include <QSettings>
-
-#include "baselineprotocol.h"
-#include "report.h"
-
-// #seconds between checks for update of the executable
-#define HEARTBEAT 10
-// Timeout if no activity received from client, #seconds
-#define IDLE_CLIENT_TIMEOUT 3*60
-
-#define MetadataFileExt "metadata"
-#define ThumbnailExt "thumbnail.jpg"
-
-
-class BaselineServer : public QTcpServer
-{
- Q_OBJECT
-
-public:
- BaselineServer(QObject *parent = nullptr);
-
- static QString storagePath();
- static QString baseUrl();
- static QStringList defaultPathKeys();
-
-protected:
- void incomingConnection(qintptr socketDescriptor);
-
-private slots:
- void heartbeat();
-
-private:
- QTimer *heartbeatTimer;
- QDateTime meLastMod;
- QString lastRunId;
- int lastRunIdIdx;
- static QString storage;
- static QString url;
- static QStringList pathKeys;
-};
-
-
-
-class BaselineThread : public QThread
-{
- Q_OBJECT
-
-public:
- BaselineThread(const QString &runId, int socketDescriptor, QObject *parent);
- void run();
-
-private:
- QString runId;
- int socketDescriptor;
-};
-
-
-class BaselineHandler : public QObject
-{
- Q_OBJECT
-
-public:
- BaselineHandler(const QString &runId, int socketDescriptor = -1);
- QString projectPath(bool absolute = true) const;
- QString pathForItem(const ImageItem &item, bool isBaseline = true, bool absolute = true) const;
-
- // CGI callbacks:
- static QString view(const QString &baseline, const QString &rendered, const QString &compared);
- static QString diffstats(const QString &baseline, const QString &rendered);
- static QString clearAllBaselines(const QString &context);
- static QString updateBaselines(const QString &context, const QString &mismatchContext, const QString &itemFile);
- static QString blacklistTest(const QString &context, const QString &itemId, bool removeFromBlacklist = false);
-
- // for debugging
- void testPathMapping();
-
-private slots:
- void receiveRequest();
- void receiveDisconnect();
- void idleClientTimeout();
-
-private:
- bool checkClient(QByteArray *errMsg, bool *dryRunMode = nullptr);
- bool establishConnection();
- void provideBaselineChecksums(const QByteArray &itemListBlock);
- void recordMatch(const QByteArray &itemBlock);
- void storeImage(const QByteArray &itemBlock, bool isBaseline);
- void storeItemMetadata(const PlatformInfo &metadata, const QString &path);
- PlatformInfo fetchItemMetadata(const QString &path);
- PlatformInfo mapPlatformInfo(const PlatformInfo& orig) const;
- const char *logtime();
- void issueMismatchNotification();
- bool fuzzyCompare(const QString& baselinePath, const QString& mismatchPath);
-
- static QString computeMismatchScore(const QImage& baseline, const QImage& rendered);
-
- BaselineProtocol proto;
- PlatformInfo clientInfo;
- mutable PlatformInfo mappedClientInfo;
- mutable PlatformInfo overriddenMappedClientInfo;
- QString runId;
- bool connectionEstablished;
- Report report;
- QSettings *settings;
- QString ruleName;
- int fuzzLevel;
- QTimer *idleTimer;
-};
-
-
-// Make an identifer safer for use as filename and URL
-QString safeName(const QString& name);
-
-#endif // BASELINESERVER_H
diff --git a/tests/baselineserver/src/baselineserver.pro b/tests/baselineserver/src/baselineserver.pro
deleted file mode 100644
index 2d8438cb514..00000000000
--- a/tests/baselineserver/src/baselineserver.pro
+++ /dev/null
@@ -1,24 +0,0 @@
-QT += core network
-
-# gui needed for QImage
-# QT -= gui
-
-TARGET = baselineserver
-DESTDIR = ../bin
-CONFIG += cmdline
-
-TEMPLATE = app
-
-include(../shared/baselineprotocol.pri)
-
-SOURCES += main.cpp \
- baselineserver.cpp \
- report.cpp
-
-HEADERS += \
- baselineserver.h \
- report.h
-
-RESOURCES += \
- baselineserver.qrc
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/baselineserver/src/baselineserver.qrc b/tests/baselineserver/src/baselineserver.qrc
deleted file mode 100644
index b5cd6afadbf..00000000000
--- a/tests/baselineserver/src/baselineserver.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>templates/view.html</file>
- </qresource>
-</RCC>
diff --git a/tests/baselineserver/src/main.cpp b/tests/baselineserver/src/main.cpp
deleted file mode 100644
index dfc9b83da8f..00000000000
--- a/tests/baselineserver/src/main.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <QtCore/QCoreApplication>
-#include "baselineserver.h"
-
-int main(int argc, char *argv[])
-{
- QCoreApplication a(argc, argv);
-
- QString queryString(qgetenv("QUERY_STRING"));
- if (!queryString.isEmpty()) {
- // run as CGI script
- Report::handleCGIQuery(queryString);
- return 0;
- }
-
- if (a.arguments().contains(QLatin1String("-testmapping"))) {
- BaselineHandler h(QLS("SomeRunId"));
- h.testPathMapping();
- return 0;
- }
-
- BaselineServer server;
- if (!server.listen(QHostAddress::Any, BaselineProtocol::ServerPort)) {
- qWarning("Failed to listen!");
- return 1;
- }
-
- qDebug() << "\n*****" << argv[0] << "started, ready to serve on port" << BaselineProtocol::ServerPort
- << "with baseline protocol version" << BaselineProtocol::ProtocolVersion << "*****\n";
- return a.exec();
-}
diff --git a/tests/baselineserver/src/report.cpp b/tests/baselineserver/src/report.cpp
deleted file mode 100644
index 748d76ebfef..00000000000
--- a/tests/baselineserver/src/report.cpp
+++ /dev/null
@@ -1,503 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "report.h"
-#include "baselineprotocol.h"
-#include "baselineserver.h"
-#include <QDir>
-#include <QProcess>
-#include <QUrl>
-#include <QXmlStreamWriter>
-#include <QRegularExpression>
-#include <unistd.h>
-
-Report::Report()
- : initialized(false), handler(0), written(false), numItems(0), numMismatches(0), settings(0),
- hasStats(false)
-{
-}
-
-Report::~Report()
-{
- end();
-}
-
-QString Report::filePath()
-{
- return path;
-}
-
-int Report::numberOfMismatches()
-{
- return numMismatches;
-}
-
-bool Report::reportProduced()
-{
- return written;
-}
-
-void Report::init(const BaselineHandler *h, const QString &r, const PlatformInfo &p, const QSettings *s)
-{
- handler = h;
- runId = r;
- plat = p;
- settings = s;
- rootDir = BaselineServer::storagePath() + QLC('/');
- baseDir = handler->pathForItem(ImageItem(), true, false).remove(QRegularExpression("/baselines/.*$"));
- QString dir = baseDir + (plat.isAdHocRun() ? QLS("/adhoc-reports") : QLS("/auto-reports"));
- QDir cwd;
- if (!cwd.exists(rootDir + dir))
- cwd.mkpath(rootDir + dir);
- path = dir + QLS("/Report_") + runId + QLS(".html");
- hasOverride = !plat.overrides().isEmpty();
- initialized = true;
-}
-
-void Report::addItems(const ImageItemList &items)
-{
- if (items.isEmpty())
- return;
- numItems += items.size();
- QString func = items.at(0).testFunction;
- if (!testFunctions.contains(func))
- testFunctions.append(func);
- ImageItemList list = items;
- if (settings->value("ReportMissingResults").toBool()) {
- for (ImageItemList::iterator it = list.begin(); it != list.end(); ++it) {
- if (it->status == ImageItem::Ok)
- it->status = ImageItem::Error; // Status should be set by report from client, else report as error
- }
- }
- itemLists[func] += list;
-}
-
-void Report::addResult(const ImageItem &item)
-{
- if (!testFunctions.contains(item.testFunction)) {
- qWarning() << "Report::addResult: unknown testfunction" << item.testFunction;
- return;
- }
- bool found = false;
- ImageItemList &list = itemLists[item.testFunction];
- for (ImageItemList::iterator it = list.begin(); it != list.end(); ++it) {
- if (it->itemName == item.itemName && it->itemChecksum == item.itemChecksum) {
- it->status = item.status;
- found = true;
- break;
- }
- }
- if (found) {
- if (item.status == ImageItem::Mismatch)
- numMismatches++;
- } else {
- qWarning() << "Report::addResult: unknown item" << item.itemName << "in testfunction" << item.testFunction;
- }
-}
-
-void Report::end()
-{
- if (!initialized || written)
- return;
- // Make report iff (#mismatches>0) || (#fuzzymatches>0) || (#errors>0 && settings say report errors)
- bool doReport = (numMismatches > 0);
- if (!doReport) {
- bool reportErrors = settings->value("ReportMissingResults").toBool();
- computeStats();
- foreach (const QString &func, itemLists.keys()) {
- FuncStats stat = stats.value(func);
- if (stat.value(ImageItem::FuzzyMatch) > 0) {
- doReport = true;
- break;
- }
- foreach (const ImageItem &item, itemLists.value(func)) {
- if (reportErrors && item.status == ImageItem::Error) {
- doReport = true;
- break;
- }
- }
- if (doReport)
- break;
- }
- }
- if (!doReport)
- return;
- write();
- written = true;
-}
-
-void Report::computeStats()
-{
- if (hasStats)
- return;
- foreach (const QString &func, itemLists.keys()) {
- FuncStats funcStat;
- funcStat[ImageItem::Ok] = 0;
- funcStat[ImageItem::BaselineNotFound] = 0;
- funcStat[ImageItem::IgnoreItem] = 0;
- funcStat[ImageItem::Mismatch] = 0;
- funcStat[ImageItem::FuzzyMatch] = 0;
- funcStat[ImageItem::Error] = 0;
- foreach (const ImageItem &item, itemLists.value(func)) {
- funcStat[item.status]++;
- }
- stats[func] = funcStat;
- }
- hasStats = true;
-}
-
-QString Report::summary()
-{
- computeStats();
- QString res;
- foreach (const QString &func, itemLists.keys()) {
- FuncStats stat = stats.value(func);
- QString s = QString("%1 %3 mismatch(es), %4 error(s), %5 fuzzy match(es)\n");
- s = s.arg(QString("%1() [%2 items]:").arg(func).arg(itemLists.value(func).size()).leftJustified(40));
- s = s.arg(stat.value(ImageItem::Mismatch));
- s = s.arg(stat.value(ImageItem::Error));
- s = s.arg(stat.value(ImageItem::FuzzyMatch));
- res += s;
- }
-#if 0
- qDebug() << "***************************** Summary *************************";
- qDebug() << res;
- qDebug() << "***************************************************************";
-#endif
- return res;
-}
-
-void Report::write()
-{
- QFile file(rootDir + path);
- if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
- qWarning() << "Failed to open report file" << file.fileName();
- return;
- }
- out.setDevice(&file);
-
- writeHeader();
- foreach(const QString &func, testFunctions) {
- writeFunctionResults(itemLists.value(func));
- }
- writeFooter();
- file.close();
- updateLatestPointer();
-}
-
-
-void Report::writeHeader()
-{
- QString title = plat.value(PI_Project) + QLC(':') + plat.value(PI_TestCase) + QLS(" Lancelot Test Report");
- out << "<!DOCTYPE html>\n"
- << "<html><head><title>" << title << "</title></head>\n"
- << "<body bgcolor=""#ddeeff""><h1>" << title << "</h1>\n"
- << "<p>Note: This is a <i>static</i> page, generated at " << QDateTime::currentDateTime().toString()
- << " for the test run with id " << runId << "</p>\n"
- << "<p>Summary: <b><span style=\"color:red\">" << numMismatches << " of " << numItems << "</span></b> items reported mismatching</p>\n";
- out << "<pre>\n" << summary() << "</pre>\n\n";
- out << "<h3>Testing Client Platform Info:</h3>\n"
- << "<table>\n";
- foreach (QString key, plat.keys())
- out << "<tr><td>" << key << ":</td><td>" << plat.value(key) << "</td></tr>\n";
- out << "</table>\n\n";
- if (hasOverride) {
- out << "<span style=\"color:red\"><h4>Note! Override Platform Info:</h4></span>\n"
- << "<p>The client's output has been compared to baselines created on a different platform. Differences:</p>\n"
- << "<table>\n";
- for (int i = 0; i < plat.overrides().size()-1; i+=2)
- out << "<tr><td>" << plat.overrides().at(i) << ":</td><td>" << plat.overrides().at(i+1) << "</td></tr>\n";
- out << "</table>\n\n";
- }
-}
-
-
-void Report::writeFunctionResults(const ImageItemList &list)
-{
- QString testFunction = list.at(0).testFunction;
- QString pageUrl = BaselineServer::baseUrl() + path;
- QString ctx = handler->pathForItem(list.at(0), true, false).section(QLC('/'), 0, -2);
- QString misCtx = handler->pathForItem(list.at(0), false, false).section(QLC('/'), 0, -2);
-
-
- out << "\n<p>&nbsp;</p><h3>Test function: " << testFunction << "</h3>\n";
- if (!hasOverride) {
- out << "<p><a href=\"/cgi-bin/server.cgi?cmd=clearAllBaselines&context=" << ctx << "&url=" << pageUrl
- << "\"><b>Clear all baselines</b></a> for this testfunction (They will be recreated by the next run)</p>\n";
- out << "<p><a href=\"/cgi-bin/server.cgi?cmd=updateAllBaselines&context=" << ctx << "&mismatchContext=" << misCtx << "&url=" << pageUrl
- << "\"><b>Let these mismatching images be the new baselines</b></a> for this testfunction</p>\n\n";
- }
-
- out << "<table border=\"2\">\n"
- "<tr>\n"
- "<th width=123>Item</th>\n"
- "<th width=246>Baseline</th>\n"
- "<th width=246>Rendered</th>\n"
- "<th width=246>Comparison (diffs are <span style=\"color:red\">RED</span>)</th>\n"
- "<th width=246>Info/Action</th>\n"
- "</tr>\n\n";
-
- foreach (const ImageItem &item, list) {
- QString mmPrefix = handler->pathForItem(item, false, false);
- QString blPrefix = handler->pathForItem(item, true, false);
-
- // Make hard links to the current baseline, so that the report is static even if the baseline changes
- generateThumbnail(blPrefix + QLS(FileFormat), rootDir); // Make sure baseline thumbnail is up to date
- QString lnPrefix = mmPrefix + QLS("baseline.");
- QByteArray blPrefixBa = (rootDir + blPrefix).toLatin1();
- QByteArray lnPrefixBa = (rootDir + lnPrefix).toLatin1();
- ::link((blPrefixBa + FileFormat).constData(), (lnPrefixBa + FileFormat).constData());
- ::link((blPrefixBa + MetadataFileExt).constData(), (lnPrefixBa + MetadataFileExt).constData());
- ::link((blPrefixBa + ThumbnailExt).constData(), (lnPrefixBa + ThumbnailExt).constData());
-
- QString baseline = lnPrefix + QLS(FileFormat);
- QString metadata = lnPrefix + QLS(MetadataFileExt);
- out << "<tr>\n";
- out << "<td>" << item.itemName << "</td>\n";
- if (item.status == ImageItem::Mismatch || item.status == ImageItem::FuzzyMatch) {
- QString rendered = mmPrefix + QLS(FileFormat);
- QString itemFile = mmPrefix.section(QLC('/'), -1);
- writeItem(baseline, rendered, item, itemFile, ctx, misCtx, metadata);
- }
- else {
- out << "<td align=center><a href=\"/" << baseline << "\">image</a> <a href=\"/" << metadata << "\">info</a></td>\n"
- << "<td align=center colspan=2><small>n/a</small></td>\n"
- << "<td align=center>";
- switch (item.status) {
- case ImageItem::BaselineNotFound:
- out << "Baseline not found/regenerated";
- break;
- case ImageItem::IgnoreItem:
- out << "<span style=\"background-color:yellow\">Blacklisted</span> ";
- if (!hasOverride) {
- out << "<a href=\"/cgi-bin/server.cgi?cmd=whitelist&context=" << ctx
- << "&itemId=" << item.itemName << "&url=" << pageUrl
- << "\">Whitelist this item</a>";
- }
- break;
- case ImageItem::Error:
- out << "<span style=\"background-color:red\">Error: No result reported!</span>";
- break;
- case ImageItem::Ok:
- out << "<span style=\"color:green\"><small>No mismatch reported</small></span>";
- break;
- default:
- out << '?';
- break;
- }
- out << "</td>\n";
- }
- out << "</tr>\n\n";
- }
-
- out << "</table>\n";
-}
-
-void Report::writeItem(const QString &baseline, const QString &rendered, const ImageItem &item,
- const QString &itemFile, const QString &ctx, const QString &misCtx, const QString &metadata)
-{
- QString compared = generateCompared(baseline, rendered);
- QString pageUrl = BaselineServer::baseUrl() + path;
-
- QStringList images = QStringList() << baseline << rendered << compared;
- foreach (const QString& img, images)
- out << "<td height=246 align=center><a href=\"/" << img << "\"><img src=\"/" << generateThumbnail(img, rootDir) << "\"></a></td>\n";
-
- out << "<td align=center>\n";
- if (item.status == ImageItem::FuzzyMatch)
- out << "<p><span style=\"color:orange\">Fuzzy match</span></p>\n";
- else
- out << "<p><span style=\"color:red\">Mismatch reported</span></p>\n";
- out << "<p><a href=\"/" << metadata << "\">Baseline Info</a>\n";
- if (!hasOverride) {
- out << "<p><a href=\"/cgi-bin/server.cgi?cmd=updateSingleBaseline&context=" << ctx << "&mismatchContext=" << misCtx
- << "&itemFile=" << itemFile << "&url=" << pageUrl << "\">Let this be the new baseline</a></p>\n"
- << "<p><a href=\"/cgi-bin/server.cgi?cmd=blacklist&context=" << ctx
- << "&itemId=" << item.itemName << "&url=" << pageUrl << "\">Blacklist this item</a></p>\n";
- }
- out << "<p><a href=\"/cgi-bin/server.cgi?cmd=view&baseline=" << baseline << "&rendered=" << rendered
- << "&compared=" << compared << "&url=" << pageUrl << "\">Inspect</a></p>\n";
-
-#if 0
- out << "<p><a href=\"/cgi-bin/server.cgi?cmd=diffstats&baseline=" << baseline << "&rendered=" << rendered
- << "&url=" << pageUrl << "\">Diffstats</a></p>\n";
-#endif
-
- out << "</td>\n";
-}
-
-void Report::writeFooter()
-{
- out << "\n</body></html>\n";
-}
-
-
-QString Report::generateCompared(const QString &baseline, const QString &rendered, bool fuzzy)
-{
- QString res = rendered;
- QFileInfo fi(res);
- res.chop(fi.suffix().length());
- res += QLS(fuzzy ? "fuzzycompared.png" : "compared.png");
- QStringList args;
- if (fuzzy)
- args << QLS("-fuzz") << QLS("5%");
- args << rootDir+baseline << rootDir+rendered << rootDir+res;
- QProcess::execute(QLS("compare"), args);
- return res;
-}
-
-
-QString Report::generateThumbnail(const QString &image, const QString &rootDir)
-{
- QString res = image;
- QFileInfo imgFI(rootDir+image);
- if (!imgFI.exists())
- return res;
- res.chop(imgFI.suffix().length());
- res += ThumbnailExt;
- QFileInfo resFI(rootDir+res);
- if (resFI.exists() && resFI.lastModified() > imgFI.lastModified())
- return res;
- QStringList args;
- args << rootDir+image << QLS("-resize") << QLS("240x240>") << QLS("-quality") << QLS("50") << rootDir+res;
- QProcess::execute(QLS("convert"), args);
- return res;
-}
-
-
-QString Report::writeResultsXmlFiles()
-{
- if (!itemLists.size())
- return QString();
- QString dir = rootDir + baseDir + QLS("/xml-reports/") + runId;
- QDir cwd;
- if (!cwd.exists(dir))
- cwd.mkpath(dir);
- foreach (const QString &func, itemLists.keys()) {
- QFile f(dir + QLatin1Char('/') + func + "-results.xml");
- if (!f.open(QIODevice::WriteOnly))
- continue;
- QXmlStreamWriter s(&f);
- s.setAutoFormatting(true);
- s.writeStartDocument();
- foreach (QString key, plat.keys()) {
- QString cmt = QLatin1Char(' ') + key + "=\"" + plat.value(key) +"\" ";
- s.writeComment(cmt.replace("--", "[-]"));
- }
- s.writeStartElement("testsuite");
- s.writeAttribute("name", func);
- foreach (const ImageItem &item, itemLists.value(func)) {
- QString res;
- switch (item.status) {
- case ImageItem::Ok:
- case ImageItem::FuzzyMatch:
- res = "pass";
- break;
- case ImageItem::Mismatch:
- case ImageItem::Error:
- res = "fail";
- break;
- case ImageItem::BaselineNotFound:
- case ImageItem::IgnoreItem:
- default:
- res = "skip";
- }
- s.writeStartElement("testcase");
- s.writeAttribute("name", item.itemName);
- s.writeAttribute("result", res);
- s.writeEndElement();
- }
- s.writeEndElement();
- s.writeEndDocument();
- }
- return dir;
-}
-
-
-
-void Report::updateLatestPointer()
-{
- QString linkPath = rootDir + baseDir + QLS("/latest_report.html");
- QString reportPath = path.mid(baseDir.size()+1);
- QFile::remove(linkPath); // possible race with another thread, yada yada yada
- QFile::link(reportPath, linkPath);
-
-#if 0
- QByteArray fwd = "<!DOCTYPE html><html><head><meta HTTP-EQUIV=\"refresh\" CONTENT=\"0;URL=%1\"></meta></head><body></body></html>\n";
- fwd.replace("%1", filePath().prepend(QLC('/')).toLatin1());
-
- QFile file(rootDir + baseDir + "/latest_report.html");
- if (file.open(QIODevice::WriteOnly | QIODevice::Truncate))
- file.write(fwd);
-#endif
-}
-
-
-void Report::handleCGIQuery(const QString &query)
-{
- QUrl cgiUrl(QLS("http://dummy/cgi-bin/dummy.cgi?") + query);
- QTextStream s(stdout);
- s << "Content-Type: text/html\r\n\r\n"
- << "<!DOCTYPE html>\n<HTML>\n<body bgcolor=""#ddeeff"">\n"; // Lancelot blue
-
- QString command(cgiUrl.queryItemValue("cmd"));
-
- if (command == QLS("view")) {
- s << BaselineHandler::view(cgiUrl.queryItemValue(QLS("baseline")),
- cgiUrl.queryItemValue(QLS("rendered")),
- cgiUrl.queryItemValue(QLS("compared")));
- }
-#if 0
- else if (command == QLS("diffstats")) {
- s << BaselineHandler::diffstats(cgiUrl.queryItemValue(QLS("baseline")),
- cgiUrl.queryItemValue(QLS("rendered")));
- }
-#endif
- else if (command == QLS("updateSingleBaseline")) {
- s << BaselineHandler::updateBaselines(cgiUrl.queryItemValue(QLS("context")),
- cgiUrl.queryItemValue(QLS("mismatchContext")),
- cgiUrl.queryItemValue(QLS("itemFile")));
- } else if (command == QLS("updateAllBaselines")) {
- s << BaselineHandler::updateBaselines(cgiUrl.queryItemValue(QLS("context")),
- cgiUrl.queryItemValue(QLS("mismatchContext")),
- QString());
- } else if (command == QLS("clearAllBaselines")) {
- s << BaselineHandler::clearAllBaselines(cgiUrl.queryItemValue(QLS("context")));
- } else if (command == QLS("blacklist")) {
- // blacklist a test
- s << BaselineHandler::blacklistTest(cgiUrl.queryItemValue(QLS("context")),
- cgiUrl.queryItemValue(QLS("itemId")));
- } else if (command == QLS("whitelist")) {
- // whitelist a test
- s << BaselineHandler::blacklistTest(cgiUrl.queryItemValue(QLS("context")),
- cgiUrl.queryItemValue(QLS("itemId")), true);
- } else {
- s << "Unknown query:<br>" << query << "<br>";
- }
- s << "<p><a href=\"" << cgiUrl.queryItemValue(QLS("url")) << "\">Back to report</a>\n";
- s << "</body>\n</HTML>";
-}
diff --git a/tests/baselineserver/src/report.h b/tests/baselineserver/src/report.h
deleted file mode 100644
index c568e7ab8dc..00000000000
--- a/tests/baselineserver/src/report.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef REPORT_H
-#define REPORT_H
-
-#include "baselineprotocol.h"
-#include <QFile>
-#include <QTextStream>
-#include <QMap>
-#include <QStringList>
-#include <QSettings>
-
-class BaselineHandler;
-
-class Report
-{
-public:
- Report();
- ~Report();
-
- void init(const BaselineHandler *h, const QString &r, const PlatformInfo &p, const QSettings *s);
- void addItems(const ImageItemList& items);
- void addResult(const ImageItem& item);
- void end();
-
- bool reportProduced();
-
- int numberOfMismatches();
- QString summary();
-
- QString filePath();
-
- QString writeResultsXmlFiles();
-
- static void handleCGIQuery(const QString &query);
-
- static QString generateThumbnail(const QString &image, const QString &rootDir = QString());
-
-private:
- void write();
- void writeFunctionResults(const ImageItemList &list);
- void writeItem(const QString &baseline, const QString &rendered, const ImageItem &item,
- const QString &itemFile, const QString &ctx, const QString &misCtx, const QString &metadata);
- void writeHeader();
- void writeFooter();
- QString generateCompared(const QString &baseline, const QString &rendered, bool fuzzy = false);
-
- void updateLatestPointer();
-
- void computeStats();
-
- bool initialized;
- const BaselineHandler *handler;
- QString runId;
- PlatformInfo plat;
- QString rootDir;
- QString baseDir;
- QString path;
- QStringList testFunctions;
- QMap<QString, ImageItemList> itemLists;
- bool written;
- int numItems;
- int numMismatches;
- QTextStream out;
- bool hasOverride;
- const QSettings *settings;
-
- typedef QMap<ImageItem::ItemStatus, int> FuncStats;
- QMap<QString, FuncStats> stats;
- bool hasStats;
-};
-
-#endif // REPORT_H
diff --git a/tests/baselineserver/src/templates/view.html b/tests/baselineserver/src/templates/view.html
deleted file mode 100644
index f0971010f24..00000000000
--- a/tests/baselineserver/src/templates/view.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<h3>Lancelot Viewer</h3>
-
-<p>
-Zoom:
-<input name="zoom" id="z1" type="radio" checked="Checked">1x</input>
-<input name="zoom" id="z2" type="radio">2x</input>
-<input name="zoom" id="z4" type="radio">4x</input>
-</p>
-
-<p><table>
-<tr>
-<td><input name="imgselect" id="baseline" type="radio" checked="Checked">Baseline</input></td>
-<td>%1</td>
-</tr>
-<tr>
-<td><input name="imgselect" id="rendered" type="radio">Rendered</input></td>
-<td>%2</td>
-</tr>
-<tr>
-<td><input name="imgselect" id="compared" type="radio">Differences</input></td>
-<td></td>
-</tr>
-</table></p>
-
-
-<p><table cellspacing="25"><tr>
-<td valign="top">
-<canvas id="c" width="800" height="800"></canvas>
-</td>
-<td valign="top">
-%4
-</td>
-</tr></table></p>
-
-<script>
- var canvas = document.getElementById("c");
- var context = canvas.getContext("2d");
- var cat = new Image();
- cat.src = "%1";
- var z = 1;
- cat.onload = function() {
- context.mozImageSmoothingEnabled = false;
- context.drawImage(cat, 0, 0, z*cat.width, z*cat.height);
- };
-
- var bbut = document.getElementById("baseline");
- bbut.onclick = function() {
- cat.src = "%1";
- };
-
- var rbut = document.getElementById("rendered");
- rbut.onclick = function() {
- cat.src = "%2";
- };
-
- var cbut = document.getElementById("compared");
- cbut.onclick = function() {
- cat.src = "%3";
- };
-
- function setZoom(zoom)
- {
- z = zoom;
- canvas.width = z*800;
- canvas.height = z*800;
- context.mozImageSmoothingEnabled = false;
- context.drawImage(cat, 0, 0, z*cat.width, z*cat.height);
- }
-
- var z1but = document.getElementById("z1");
- z1but.onclick = function() {
- setZoom(1);
- };
-
- var z2but = document.getElementById("z2");
- z2but.onclick = function() {
- setZoom(2);
- };
-
- var z4but = document.getElementById("z4");
- z4but.onclick = function() {
- setZoom(4);
- };
-</script>
diff --git a/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt b/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt
index e278f0ddc07..f417bcc61a8 100644
--- a/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt
@@ -6,8 +6,10 @@
qt_internal_add_benchmark(tst_bench_lancebench
SOURCES
- ../../../../auto/other/lancelot/paintcommands.cpp ../../../../auto/other/lancelot/paintcommands.h
+ ../../../../baseline/painting/paintcommands.cpp ../../../../baseline/painting/paintcommands.h
tst_lancebench.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../baseline/painting
PUBLIC_LIBRARIES
Qt::Gui
Qt::GuiPrivate
@@ -47,13 +49,13 @@ set(images_resource_files
"images/zebra.png"
)
-list(TRANSFORM images_resource_files PREPEND "../../../../auto/other/lancelot/")
+list(TRANSFORM images_resource_files PREPEND "../../../../baseline/painting/")
qt_internal_add_resource(tst_bench_lancebench "images"
PREFIX
"/"
BASE
- "../../../../auto/other/lancelot"
+ "../../../../baseline/painting"
FILES
${images_resource_files}
)
@@ -61,7 +63,7 @@ qt_internal_add_resource(tst_bench_lancebench "images"
#### Keys ignored in scope 1:.:.:lancebench.pro:<TRUE>:
# TEMPLATE = "app"
-# TESTDATA = "../../../../auto/other/lancelot/scripts/*"
+# TESTDATA = "../../../../baseline/painting/scripts/*"
## Scopes:
#####################################################################
diff --git a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
index 418f0623b33..b6f7d693b90 100644
--- a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
+++ b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include "../../../../auto/other/lancelot/paintcommands.h"
+#include "paintcommands.h"
#include <qtest.h>
#include <QDir>
diff --git a/tests/manual/lance/CMakeLists.txt b/tests/manual/lance/CMakeLists.txt
index 02b7273be4c..edf2faa9295 100644
--- a/tests/manual/lance/CMakeLists.txt
+++ b/tests/manual/lance/CMakeLists.txt
@@ -6,13 +6,13 @@
qt_internal_add_manual_test(lance
SOURCES
- ../../auto/other/lancelot/paintcommands.cpp ../../auto/other/lancelot/paintcommands.h
+ ../../baseline/painting/paintcommands.cpp ../../baseline/painting/paintcommands.h
interactivewidget.cpp interactivewidget.h
main.cpp
widgets.h
INCLUDE_DIRECTORIES
.
- ../../auto/other/lancelot
+ ../../baseline/painting
PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::Gui
@@ -35,41 +35,41 @@ qt_internal_add_resource(lance "icons"
${icons_resource_files}
)
set(images_resource_files
- "../../auto/other/lancelot/images/alpha.png"
- "../../auto/other/lancelot/images/alpha2x2.png"
- "../../auto/other/lancelot/images/bitmap.png"
- "../../auto/other/lancelot/images/border.png"
- "../../auto/other/lancelot/images/borderimage.png"
- "../../auto/other/lancelot/images/dome_argb32.png"
- "../../auto/other/lancelot/images/dome_indexed.png"
- "../../auto/other/lancelot/images/dome_indexed_mask.png"
- "../../auto/other/lancelot/images/dome_mono.png"
- "../../auto/other/lancelot/images/dome_mono_128.png"
- "../../auto/other/lancelot/images/dome_mono_palette.png"
- "../../auto/other/lancelot/images/dome_rgb32.png"
- "../../auto/other/lancelot/images/dot.png"
- "../../auto/other/lancelot/images/face.png"
- "../../auto/other/lancelot/images/gam030.png"
- "../../auto/other/lancelot/images/gam045.png"
- "../../auto/other/lancelot/images/gam056.png"
- "../../auto/other/lancelot/images/gam100.png"
- "../../auto/other/lancelot/images/gam200.png"
- "../../auto/other/lancelot/images/image.png"
- "../../auto/other/lancelot/images/mask.png"
- "../../auto/other/lancelot/images/mask_100.png"
- "../../auto/other/lancelot/images/masked.png"
- "../../auto/other/lancelot/images/sign.png"
- "../../auto/other/lancelot/images/solid.png"
- "../../auto/other/lancelot/images/solid2x2.png"
- "../../auto/other/lancelot/images/struct-image-01.jpg"
- "../../auto/other/lancelot/images/struct-image-01.png"
- "../../auto/other/lancelot/images/zebra.png"
+ "../../baseline/painting/images/alpha.png"
+ "../../baseline/painting/images/alpha2x2.png"
+ "../../baseline/painting/images/bitmap.png"
+ "../../baseline/painting/images/border.png"
+ "../../baseline/painting/images/borderimage.png"
+ "../../baseline/painting/images/dome_argb32.png"
+ "../../baseline/painting/images/dome_indexed.png"
+ "../../baseline/painting/images/dome_indexed_mask.png"
+ "../../baseline/painting/images/dome_mono.png"
+ "../../baseline/painting/images/dome_mono_128.png"
+ "../../baseline/painting/images/dome_mono_palette.png"
+ "../../baseline/painting/images/dome_rgb32.png"
+ "../../baseline/painting/images/dot.png"
+ "../../baseline/painting/images/face.png"
+ "../../baseline/painting/images/gam030.png"
+ "../../baseline/painting/images/gam045.png"
+ "../../baseline/painting/images/gam056.png"
+ "../../baseline/painting/images/gam100.png"
+ "../../baseline/painting/images/gam200.png"
+ "../../baseline/painting/images/image.png"
+ "../../baseline/painting/images/mask.png"
+ "../../baseline/painting/images/mask_100.png"
+ "../../baseline/painting/images/masked.png"
+ "../../baseline/painting/images/sign.png"
+ "../../baseline/painting/images/solid.png"
+ "../../baseline/painting/images/solid2x2.png"
+ "../../baseline/painting/images/struct-image-01.jpg"
+ "../../baseline/painting/images/struct-image-01.png"
+ "../../baseline/painting/images/zebra.png"
)
qt_internal_add_resource(lance "images"
PREFIX
"/"
BASE
- "../../auto/other/lancelot"
+ "../../baseline/painting"
FILES
${images_resource_files}
)
diff --git a/tests/manual/lance/lance.pro b/tests/manual/lance/lance.pro
index 4437cb45391..f6c6210998c 100644
--- a/tests/manual/lance/lance.pro
+++ b/tests/manual/lance/lance.pro
@@ -1,4 +1,4 @@
-LANCELOT_DIR = $$PWD/../../auto/other/lancelot
+LANCELOT_DIR = $$PWD/../../baseline/painting
CONFIG += cmdline moc
TEMPLATE = app
INCLUDEPATH += . $$LANCELOT_DIR