cmake: add more tests in corelib/thread
This fixes the qatomicinteger magic by making $$basename work for one particular case. qthreadstorage still needs investigation. Task-number: QTBUG-78221 Change-Id: I7bb38f6ca24273bcf0443ab25685c8e815814c3c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
e1beabc3b8
commit
a98f64af91
@ -1,13 +1,24 @@
|
||||
add_subdirectory(qatomicint)
|
||||
add_subdirectory(qatomicpointer)
|
||||
add_subdirectory(qfuture)
|
||||
add_subdirectory(qfuturesynchronizer)
|
||||
add_subdirectory(qmutexlocker)
|
||||
add_subdirectory(qreadlocker)
|
||||
add_subdirectory(qreadwritelock)
|
||||
add_subdirectory(qresultstore)
|
||||
add_subdirectory(qsemaphore)
|
||||
add_subdirectory(qthreadpool)
|
||||
add_subdirectory(qwaitcondition)
|
||||
add_subdirectory(qwritelocker)
|
||||
# Generated from thread.pro.
|
||||
|
||||
if(QT_FEATURE_thread)
|
||||
add_subdirectory(qatomicint)
|
||||
add_subdirectory(qatomicinteger)
|
||||
add_subdirectory(qatomicpointer)
|
||||
add_subdirectory(qresultstore)
|
||||
add_subdirectory(qfuture)
|
||||
add_subdirectory(qfuturesynchronizer)
|
||||
add_subdirectory(qmutex)
|
||||
add_subdirectory(qmutexlocker)
|
||||
add_subdirectory(qreadlocker)
|
||||
add_subdirectory(qreadwritelock)
|
||||
add_subdirectory(qsemaphore)
|
||||
add_subdirectory(qthread)
|
||||
add_subdirectory(qthreadonce)
|
||||
add_subdirectory(qthreadpool)
|
||||
# add_subdirectory(qthreadstorage) ### FIXME
|
||||
add_subdirectory(qwaitcondition)
|
||||
add_subdirectory(qwritelocker)
|
||||
endif()
|
||||
if(TARGET Qt::Concurrent)
|
||||
add_subdirectory(qfuturewatcher)
|
||||
endif()
|
||||
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qatomicint SOURCES tst_qatomicint.cpp)
|
||||
# Generated from qatomicint.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicint Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicint
|
||||
SOURCES
|
||||
tst_qatomicint.cpp
|
||||
)
|
||||
|
18
tests/auto/corelib/thread/qatomicinteger/CMakeLists.txt
Normal file
18
tests/auto/corelib/thread/qatomicinteger/CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated from qatomicinteger.pro.
|
||||
|
||||
add_subdirectory(char)
|
||||
add_subdirectory(char16_t)
|
||||
add_subdirectory(char32_t)
|
||||
add_subdirectory(int)
|
||||
add_subdirectory(long)
|
||||
add_subdirectory(qlonglong)
|
||||
add_subdirectory(qptrdiff)
|
||||
add_subdirectory(quintptr)
|
||||
add_subdirectory(qulonglong)
|
||||
add_subdirectory(schar)
|
||||
add_subdirectory(short)
|
||||
add_subdirectory(uchar)
|
||||
add_subdirectory(uint)
|
||||
add_subdirectory(ulong)
|
||||
add_subdirectory(ushort)
|
||||
add_subdirectory(wchar_t)
|
13
tests/auto/corelib/thread/qatomicinteger/char/CMakeLists.txt
Normal file
13
tests/auto/corelib/thread/qatomicinteger/char/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Generated from char.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_char Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_char
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=char
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_char
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from char16_t.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_char16_t Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_char16_t
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=char16_t
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_char16_t
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from char32_t.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_char32_t Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_char32_t
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=char32_t
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_char32_t
|
||||
)
|
13
tests/auto/corelib/thread/qatomicinteger/int/CMakeLists.txt
Normal file
13
tests/auto/corelib/thread/qatomicinteger/int/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Generated from int.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_int Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_int
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=int
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_int
|
||||
)
|
13
tests/auto/corelib/thread/qatomicinteger/long/CMakeLists.txt
Normal file
13
tests/auto/corelib/thread/qatomicinteger/long/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Generated from long.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_long Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_long
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=long
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_long
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from qlonglong.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_qlonglong Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_qlonglong
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=qlonglong
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_qlonglong
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from qptrdiff.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_qptrdiff Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_qptrdiff
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=qptrdiff
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_qptrdiff
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from quintptr.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_quintptr Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_quintptr
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=quintptr
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_quintptr
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from qulonglong.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_qulonglong Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_qulonglong
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=qulonglong
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_qulonglong
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from schar.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_schar Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_schar
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=schar
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_schar
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from short.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_short Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_short
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=short
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_short
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from uchar.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_uchar Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_uchar
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=uchar
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_uchar
|
||||
)
|
13
tests/auto/corelib/thread/qatomicinteger/uint/CMakeLists.txt
Normal file
13
tests/auto/corelib/thread/qatomicinteger/uint/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Generated from uint.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_uint Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_uint
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=uint
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_uint
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from ulong.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_ulong Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_ulong
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=ulong
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_ulong
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from ushort.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_ushort Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_ushort
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=ushort
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_ushort
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
# Generated from wchar_t.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicinteger_wchar_t Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicinteger_wchar_t
|
||||
SOURCES
|
||||
../tst_qatomicinteger.cpp
|
||||
DEFINES
|
||||
QATOMIC_TEST_TYPE=wchar_t
|
||||
tst_QAtomicIntegerXX=tst_QAtomicInteger_wchar_t
|
||||
)
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qatomicpointer SOURCES tst_qatomicpointer.cpp)
|
||||
# Generated from qatomicpointer.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qatomicpointer Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qatomicpointer
|
||||
SOURCES
|
||||
tst_qatomicpointer.cpp
|
||||
)
|
||||
|
@ -1 +1,15 @@
|
||||
add_qt_test(tst_qfuture SOURCES tst_qfuture.cpp LIBRARIES Qt::CorePrivate)
|
||||
# Generated from qfuture.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qfuture Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qfuture
|
||||
SOURCES
|
||||
tst_qfuture.cpp
|
||||
DEFINES
|
||||
# -QT_NO_JAVA_STYLE_ITERATORS # special case
|
||||
QT_STRICT_ITERATORS
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
)
|
||||
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qfuturesynchronizer SOURCES tst_qfuturesynchronizer.cpp)
|
||||
# Generated from qfuturesynchronizer.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qfuturesynchronizer Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qfuturesynchronizer
|
||||
SOURCES
|
||||
tst_qfuturesynchronizer.cpp
|
||||
)
|
||||
|
14
tests/auto/corelib/thread/qfuturewatcher/CMakeLists.txt
Normal file
14
tests/auto/corelib/thread/qfuturewatcher/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Generated from qfuturewatcher.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qfuturewatcher Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qfuturewatcher
|
||||
SOURCES
|
||||
tst_qfuturewatcher.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Concurrent
|
||||
)
|
20
tests/auto/corelib/thread/qmutex/CMakeLists.txt
Normal file
20
tests/auto/corelib/thread/qmutex/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
# Generated from qmutex.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qmutex Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qmutex
|
||||
SOURCES
|
||||
tst_qmutex.cpp
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
extend_target(tst_qmutex CONDITION WIN32
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Core
|
||||
)
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qmutexlocker SOURCES tst_qmutexlocker.cpp)
|
||||
# Generated from qmutexlocker.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qmutexlocker Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qmutexlocker
|
||||
SOURCES
|
||||
tst_qmutexlocker.cpp
|
||||
)
|
||||
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qreadlocker SOURCES tst_qreadlocker.cpp)
|
||||
# Generated from qreadlocker.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qreadlocker Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qreadlocker
|
||||
SOURCES
|
||||
tst_qreadlocker.cpp
|
||||
)
|
||||
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qreadwritelock SOURCES tst_qreadwritelock.cpp)
|
||||
# Generated from qreadwritelock.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qreadwritelock Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qreadwritelock
|
||||
SOURCES
|
||||
tst_qreadwritelock.cpp
|
||||
)
|
||||
|
@ -1 +1,14 @@
|
||||
add_qt_test(tst_qresultstore SOURCES tst_qresultstore.cpp LIBRARIES Qt::CorePrivate)
|
||||
# Generated from qresultstore.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qresultstore Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qresultstore
|
||||
SOURCES
|
||||
tst_qresultstore.cpp
|
||||
DEFINES
|
||||
QT_STRICT_ITERATORS
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
)
|
||||
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qsemaphore SOURCES tst_qsemaphore.cpp)
|
||||
# Generated from qsemaphore.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qsemaphore Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qsemaphore
|
||||
SOURCES
|
||||
tst_qsemaphore.cpp
|
||||
)
|
||||
|
20
tests/auto/corelib/thread/qthread/CMakeLists.txt
Normal file
20
tests/auto/corelib/thread/qthread/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
# Generated from qthread.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qthread Test:
|
||||
#####################################################################
|
||||
|
||||
qt_find_package(Threads PROVIDED_TARGETS Threads::Threads) # special case
|
||||
|
||||
add_qt_test(tst_qthread
|
||||
SOURCES
|
||||
../../../../shared/emulationdetector.h
|
||||
tst_qthread.cpp
|
||||
INCLUDE_DIRECTORIES
|
||||
../../../../shared
|
||||
LIBRARIES # special case
|
||||
Threads::Threads # special case
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
11
tests/auto/corelib/thread/qthreadonce/CMakeLists.txt
Normal file
11
tests/auto/corelib/thread/qthreadonce/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# Generated from qthreadonce.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qthreadonce Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qthreadonce
|
||||
SOURCES
|
||||
qthreadonce.cpp
|
||||
tst_qthreadonce.cpp
|
||||
)
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qthreadpool SOURCES tst_qthreadpool.cpp)
|
||||
# Generated from qthreadpool.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qthreadpool Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qthreadpool
|
||||
SOURCES
|
||||
tst_qthreadpool.cpp
|
||||
)
|
||||
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qwaitcondition SOURCES tst_qwaitcondition.cpp)
|
||||
# Generated from qwaitcondition.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qwaitcondition Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qwaitcondition
|
||||
SOURCES
|
||||
tst_qwaitcondition.cpp
|
||||
)
|
||||
|
@ -1 +1,10 @@
|
||||
add_qt_test(tst_qwritelocker SOURCES tst_qwritelocker.cpp)
|
||||
# Generated from qwritelocker.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qwritelocker Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qwritelocker
|
||||
SOURCES
|
||||
tst_qwritelocker.cpp
|
||||
)
|
||||
|
@ -626,6 +626,14 @@ def handle_function_value(group: pp.ParseResults):
|
||||
if function_name == "files":
|
||||
return str(function_args[0])
|
||||
|
||||
if function_name == "basename":
|
||||
if len(function_args) != 1:
|
||||
print(f"XXXX basename with more than one argument")
|
||||
if function_args[0] == '_PRO_FILE_PWD_':
|
||||
return os.path.basename(os.getcwd())
|
||||
print(f"XXXX basename with value other than _PRO_FILE_PWD_")
|
||||
return os.path.basename(str(function_args[0]))
|
||||
|
||||
if isinstance(function_args, pp.ParseResults):
|
||||
function_args = list(flatten_list(function_args.asList()))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user