diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-04 14:36:34 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-04 18:47:07 +0000 |
| commit | 609b1cd7ab8514354c93249e8a295e5e907d8de9 (patch) | |
| tree | 22ed51ff06dc059823df2e1c62a20de250bc4ecc /sources/pyside2/tests | |
| parent | d62d598031c369ab1e36dceb2d9a21d33cb4be13 (diff) | |
Further cleanup of CMakeLists
Remove some remains of Python2 and Qt 5 and some
unused options.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Ic9c7d4048b6be0cdeb0f5cc9b23d13b1702f1bdc
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/tests')
| -rw-r--r-- | sources/pyside2/tests/CMakeLists.txt | 96 |
1 files changed, 46 insertions, 50 deletions
diff --git a/sources/pyside2/tests/CMakeLists.txt b/sources/pyside2/tests/CMakeLists.txt index 285ea872f..86150ac1f 100644 --- a/sources/pyside2/tests/CMakeLists.txt +++ b/sources/pyside2/tests/CMakeLists.txt @@ -1,56 +1,52 @@ -if(CMAKE_VERSION VERSION_LESS 2.8) - message("CMake version greater than 2.8 necessary to run tests") -else() - if(NOT CTEST_TESTING_TIMEOUT) - set(CTEST_TESTING_TIMEOUT 60) - endif() - - # BUILD_DIR and QT_DIR are used by init_paths.py for setting - # the path to the testbinding module - get_filename_component(BUILD_DIR "${CMAKE_BINARY_DIR}" DIRECTORY) - get_filename_component(BUILD_DIR "${CMAKE_BINARY_DIR}" DIRECTORY) - set(QT_DIR "${_qt5Core_install_prefix}") +if(NOT CTEST_TESTING_TIMEOUT) + set(CTEST_TESTING_TIMEOUT 60) +endif() - macro(TEST_QT_MODULE var name) - if(NOT DISABLE_${name} AND ${var}) - add_subdirectory(${name}) - endif() - endmacro() +# BUILD_DIR and QT_DIR are used by init_paths.py for setting +# the path to the testbinding module +get_filename_component(BUILD_DIR "${CMAKE_BINARY_DIR}" DIRECTORY) +get_filename_component(BUILD_DIR "${CMAKE_BINARY_DIR}" DIRECTORY) +set(QT_DIR "${_qt5Core_install_prefix}") - macro(PYSIDE_TEST) - string(REGEX MATCH "/([^/]+)//?([^/]+)\\.py" foo "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}" ) - set(TEST_NAME "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}") - if (${ARGC} EQUAL 1) - set(EXPECT_TO_FAIL 0) - elseif(${ARGC} EQUAL 2) - set(EXPECT_TO_FAIL ${ARGV1}) - else() - message(WARNING "Invalid call of macro PYSIDE_TEST") - endif() - set(TEST_CMD ${XVFB_EXEC} ${SHIBOKEN_PYTHON_INTERPRETER} "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}") - add_test(${TEST_NAME} ${TEST_CMD}) - # QT_NO_GLIB=1 is required to avoid crashes on CI RHEL 6.6 machines. - # See QTBUG-64716 for details. - set_tests_properties(${TEST_NAME} PROPERTIES - TIMEOUT ${CTEST_TESTING_TIMEOUT} - WILL_FAIL ${EXPECT_TO_FAIL} - ENVIRONMENT "BUILD_DIR=${BUILD_DIR};QT_DIR=${QT_DIR};PYSIDE_DISABLE_INTERNAL_QT_CONF=1;QT_NO_GLIB=1") - endmacro() +macro(TEST_QT_MODULE var name) + if(NOT DISABLE_${name} AND ${var}) + add_subdirectory(${name}) + endif() +endmacro() - if (NOT DISABLE_QtCore AND NOT DISABLE_QtGui AND NOT DISABLE_QtWidgets) - add_subdirectory(pysidetest) +macro(PYSIDE_TEST) + string(REGEX MATCH "/([^/]+)//?([^/]+)\\.py" foo "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}" ) + set(TEST_NAME "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}") + if (${ARGC} EQUAL 1) + set(EXPECT_TO_FAIL 0) + elseif(${ARGC} EQUAL 2) + set(EXPECT_TO_FAIL ${ARGV1}) + else() + message(WARNING "Invalid call of macro PYSIDE_TEST") endif() - add_subdirectory(registry) - add_subdirectory(signals) - add_subdirectory(support) + set(TEST_CMD ${XVFB_EXEC} ${SHIBOKEN_PYTHON_INTERPRETER} "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}") + add_test(${TEST_NAME} ${TEST_CMD}) + # QT_NO_GLIB=1 is required to avoid crashes on CI RHEL 6.6 machines. + # See QTBUG-64716 for details. + set_tests_properties(${TEST_NAME} PROPERTIES + TIMEOUT ${CTEST_TESTING_TIMEOUT} + WILL_FAIL ${EXPECT_TO_FAIL} + ENVIRONMENT "BUILD_DIR=${BUILD_DIR};QT_DIR=${QT_DIR};PYSIDE_DISABLE_INTERNAL_QT_CONF=1;QT_NO_GLIB=1") +endmacro() - foreach(shortname IN LISTS all_module_shortnames) - message(STATUS "preparing tests for module 'Qt${shortname}'") - TEST_QT_MODULE(Qt${QT_MAJOR_VERSION}${shortname}_FOUND Qt${shortname}) - endforeach() - - #platform specific - if (ENABLE_MAC) - add_subdirectory(mac) - endif () +if (NOT DISABLE_QtCore AND NOT DISABLE_QtGui AND NOT DISABLE_QtWidgets) + add_subdirectory(pysidetest) endif() +add_subdirectory(registry) +add_subdirectory(signals) +add_subdirectory(support) + +foreach(shortname IN LISTS all_module_shortnames) + message(STATUS "preparing tests for module 'Qt${shortname}'") + TEST_QT_MODULE(Qt${QT_MAJOR_VERSION}${shortname}_FOUND Qt${shortname}) +endforeach() + +#platform specific +if (ENABLE_MAC) + add_subdirectory(mac) +endif () |
