2020-02-11 13:52:49 +00:00
|
|
|
# The whole file is written manually.
|
|
|
|
# special case skip regeneration
|
2019-06-04 13:48:53 +00:00
|
|
|
|
2020-03-17 10:15:10 +00:00
|
|
|
include(../../../../src/testlib/selfcover.cmake)
|
|
|
|
|
2020-02-11 13:52:49 +00:00
|
|
|
# ------------- Test runner -------------
|
2020-03-17 10:15:10 +00:00
|
|
|
|
2020-09-22 08:16:58 +00:00
|
|
|
qt_internal_add_test(tst_selftests
|
2020-02-11 13:52:49 +00:00
|
|
|
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
|
2020-02-07 14:42:10 +00:00
|
|
|
EXCEPTIONS
|
2020-07-23 07:53:18 +00:00
|
|
|
CATCH
|
2020-02-11 13:52:49 +00:00
|
|
|
SOURCES
|
|
|
|
tst_selftests.cpp
|
2020-02-07 14:42:10 +00:00
|
|
|
catch.cpp
|
2020-02-11 13:52:49 +00:00
|
|
|
PUBLIC_LIBRARIES
|
|
|
|
Qt::TestPrivate
|
|
|
|
# special case begin
|
|
|
|
# These lines need to be commented out as they need to be enabled
|
|
|
|
# COMPILE_OPTIONS
|
|
|
|
# conditionally
|
|
|
|
# --cs-exclude-file-abs-wildcard=${QT_SOURCE_TREE}/*
|
|
|
|
# --cs-include-file-abs-wildcard=*/src/testlib/*
|
|
|
|
# --cs-mcc
|
|
|
|
# --cs-mcdc
|
|
|
|
# LINK_OPTIONS
|
|
|
|
# "$$COVERAGE_OPTIONS"
|
|
|
|
# special case end
|
|
|
|
)
|
2020-03-17 10:15:10 +00:00
|
|
|
|
2020-02-11 13:52:49 +00:00
|
|
|
file(GLOB resource_glob_0 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "expected_*")
|
|
|
|
foreach(file IN LISTS resource_glob_0)
|
|
|
|
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}")
|
|
|
|
endforeach()
|
2020-03-17 10:15:10 +00:00
|
|
|
|
2020-02-11 13:52:49 +00:00
|
|
|
# Resources:
|
|
|
|
set(qmake_expected_files_resource_files
|
|
|
|
${resource_glob_0}
|
|
|
|
)
|
|
|
|
|
2020-09-22 08:16:58 +00:00
|
|
|
qt_internal_add_resource(tst_selftests "qmake_expected_files"
|
2020-02-11 13:52:49 +00:00
|
|
|
PREFIX
|
|
|
|
"/"
|
|
|
|
BASE
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}" # special case
|
|
|
|
FILES
|
|
|
|
${qmake_expected_files_resource_files}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
## Scopes:
|
|
|
|
#####################################################################
|
|
|
|
|
2020-06-05 07:24:37 +00:00
|
|
|
#### Keys ignored in scope 5:.:.:test.pro:NOT ANDROID AND for(file,SUBPROGRAMS):
|
2020-02-11 13:52:49 +00:00
|
|
|
# TEST_HELPER_INSTALLS = "../$${file}/$${file}"
|
|
|
|
|
|
|
|
#### Keys ignored in scope 7:.:..:../selftests.pri:TARGET Qt::Gui:
|
|
|
|
# SUBPROGRAMS = "keyboard" "mouse"
|
|
|
|
|
2020-09-22 08:16:58 +00:00
|
|
|
qt_internal_apply_testlib_coverage_options(tst_selftests)
|
2020-02-11 13:52:49 +00:00
|
|
|
|
|
|
|
# ------------- Sub tests -------------
|
2018-10-24 13:20:27 +00:00
|
|
|
|
2020-02-07 14:42:10 +00:00
|
|
|
# special case begin
|
2020-06-05 07:24:37 +00:00
|
|
|
set(subprograms
|
|
|
|
assert
|
|
|
|
badxml
|
|
|
|
benchlibcallgrind
|
|
|
|
benchlibcounting
|
|
|
|
benchlibeventcounter
|
|
|
|
benchliboptions
|
|
|
|
benchlibtickcounter
|
|
|
|
benchlibwalltime
|
|
|
|
blacklisted
|
|
|
|
cmptest
|
|
|
|
commandlinedata
|
|
|
|
counting
|
|
|
|
crashes
|
|
|
|
datatable
|
|
|
|
datetime
|
|
|
|
deleteLater
|
|
|
|
deleteLater_noApp
|
|
|
|
differentexec
|
|
|
|
exceptionthrow
|
|
|
|
expectfail
|
|
|
|
failcleanup
|
|
|
|
faildatatype
|
|
|
|
failfetchtype
|
|
|
|
failinit
|
|
|
|
failinitdata
|
|
|
|
fetchbogus
|
|
|
|
findtestdata
|
|
|
|
float
|
|
|
|
globaldata
|
|
|
|
longstring
|
|
|
|
maxwarnings
|
|
|
|
multiexec
|
|
|
|
pass
|
|
|
|
pairdiagnostics
|
|
|
|
printdatatags
|
|
|
|
printdatatagswithglobaltags
|
|
|
|
qexecstringlist
|
|
|
|
silent
|
|
|
|
signaldumper
|
|
|
|
singleskip
|
|
|
|
skip
|
|
|
|
skipcleanup
|
|
|
|
skipinit
|
|
|
|
skipinitdata
|
|
|
|
sleep
|
|
|
|
strcmp
|
|
|
|
subtest
|
|
|
|
testlib
|
|
|
|
tuplediagnostics
|
|
|
|
verbose1
|
|
|
|
verbose2
|
|
|
|
verifyexceptionthrown
|
|
|
|
warnings
|
|
|
|
watchdog
|
|
|
|
xunit
|
|
|
|
)
|
2019-06-04 09:47:30 +00:00
|
|
|
|
2020-06-05 07:24:37 +00:00
|
|
|
if(TARGET Qt::Gui)
|
|
|
|
list(APPEND subprograms
|
|
|
|
keyboard
|
|
|
|
mouse
|
|
|
|
)
|
2019-06-04 09:47:30 +00:00
|
|
|
endif()
|
|
|
|
|
2020-02-07 14:42:10 +00:00
|
|
|
foreach(subprogram IN LISTS subprograms)
|
|
|
|
add_subdirectory(${subprogram})
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
list(JOIN subprograms " " subprograms)
|
2020-09-22 08:16:58 +00:00
|
|
|
qt_internal_extend_target(tst_selftests
|
2020-02-07 14:42:10 +00:00
|
|
|
DEFINES
|
|
|
|
SUBPROGRAMS=${subprograms}
|
|
|
|
)
|
|
|
|
# special case end
|
|
|
|
|
2019-06-04 09:47:30 +00:00
|
|
|
#### Keys ignored in scope 1:.:.:test.pro:<TRUE>:
|
|
|
|
# CONFIG = "testcase"
|
|
|
|
# expected_files.base = "$$PWD/.."
|
|
|
|
# expected_files.files = "$$files$$PWD/../expected_*"
|
|
|
|
|
|
|
|
## Scopes:
|
|
|
|
#####################################################################
|
|
|
|
|
2020-06-05 07:24:37 +00:00
|
|
|
#### Keys ignored in scope 5:.:.:test.pro:NOT ANDROID AND for(file,SUBPROGRAMS):
|
2019-06-04 09:47:30 +00:00
|
|
|
# TEST_HELPER_INSTALLS = "../$${file}/$${file}"
|
|
|
|
# special case end
|