Skip to content

Commit

Permalink
Rename and restructure the baseline (lancelot) testing code
Browse files Browse the repository at this point in the history
In preparation for addition of new baseline tests, establish a new
test category, "baseline". This is similar to the category
"benchmarks" in that it contains tests that use the QTest framework,
but conceptually are not unit tests, in contrast to those under auto/.

Move the existing QPainter baseline test, tst_lancelot, into this new
category, and rename it accordingly.

Baseline tests use the QBaselineTest extension to QTest. Move that
extension too into the tests/baseline directory, allowing the clean
out of the baselineserver directory.

Pick-to: 6.2
Change-Id: I1b527f5867c953b1d22be73798fcf7d1494712ea
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Eirik Aavitsland <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
  • Loading branch information
aavit authored and vohi committed Nov 16, 2021
1 parent 9a131b5 commit e8f93e3
Show file tree
Hide file tree
Showing 135 changed files with 55 additions and 1,849 deletions.
3 changes: 3 additions & 0 deletions cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion tests/auto/other/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions tests/baseline/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(TARGET Qt::Network)
add_subdirectory(painting)
endif()
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Generated from lancelot.pro.

#####################################################################
## tst_lancelot Test:
## tst_baseline_painting Test:
#####################################################################

# Collect test data
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -486,4 +486,4 @@ int main(int argc, char *argv[])
return _realmain(argc, argv);
}

#include "tst_lancelot.moc"
#include "tst_baseline_painting.moc"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions tests/baselineserver/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions tests/baselineserver/bin/runserver

This file was deleted.

Loading

0 comments on commit e8f93e3

Please sign in to comment.