Warning, /sdk/selenium-webdriver-at-spi/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-License-Identifier: BSD-2-Clause
0002 # SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
0003 
0004 # Make sure return values get forwarded properly
0005 add_test(
0006     NAME truetest
0007     COMMAND selenium-webdriver-at-spi-run /usr/bin/true
0008 )
0009 set_tests_properties(truetest PROPERTIES ENVIRONMENT "TEST_WITH_KWIN_WAYLAND=0")
0010 
0011 add_test(
0012     NAME falsetest
0013     COMMAND selenium-webdriver-at-spi-run /usr/bin/false
0014 )
0015 set_tests_properties(falsetest PROPERTIES
0016     WILL_FAIL TRUE
0017     ENVIRONMENT "TEST_WITH_KWIN_WAYLAND=0")
0018 
0019 add_test(
0020     NAME screenshottest
0021     COMMAND selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/screenshottest.py
0022 )
0023 set_tests_properties(screenshottest PROPERTIES
0024     TIMEOUT 60
0025     ENVIRONMENT "QML_EXEC=$<TARGET_FILE_DIR:Qt${QT_MAJOR_VERSION}::qmake>/qml")
0026 
0027 add_test(
0028     NAME textinputtest
0029     COMMAND selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/textinputtest.py
0030 )
0031 set_tests_properties(textinputtest PROPERTIES
0032     TIMEOUT 60
0033     ENVIRONMENT "QML_EXEC=$<TARGET_FILE_DIR:Qt${QT_MAJOR_VERSION}::qmake>/qml")
0034 
0035 add_test(
0036     NAME pointerinputtest
0037     COMMAND selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/pointerinputtest.py
0038 )
0039 set_tests_properties(pointerinputtest PROPERTIES
0040     TIMEOUT 60
0041     ENVIRONMENT "QML_EXEC=$<TARGET_FILE_DIR:Qt${QT_MAJOR_VERSION}::qmake>/qml")
0042 
0043 add_test(
0044     NAME valuetest
0045     COMMAND selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/valuetest.py
0046 )
0047 set_tests_properties(valuetest PROPERTIES
0048     TIMEOUT 60
0049     ENVIRONMENT "QML_EXEC=$<TARGET_FILE_DIR:Qt${QT_MAJOR_VERSION}::qmake>/qml")
0050 
0051 add_test(
0052     NAME imagecomparisontest
0053     COMMAND selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/imagecomparisontest.py
0054 )
0055 set_tests_properties(imagecomparisontest PROPERTIES
0056     TIMEOUT 60
0057     ENVIRONMENT "QML_EXEC=$<TARGET_FILE_DIR:Qt${QT_MAJOR_VERSION}::qmake>/qml")
0058 
0059 # These tests depend on actual applications and cannot be run by the CI currently. To enable them we'd need a way
0060 # to on-demand install "packages" outside the regular Dependencies system of .kde-ci.yml.
0061 if(NOT "$ENV{KDECI_BUILD}" STREQUAL "TRUE")
0062     include(ExternalProject)
0063     ExternalProject_Add(selenium-webdriver-at-spi-examples
0064         SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/appiumtests
0065         BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/appiumtests
0066         INSTALL_COMMAND ""
0067         TEST_EXCLUDE_FROM_MAIN true
0068     )
0069     add_test(
0070         NAME examplestest
0071         COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/appiumtests --target test
0072     )
0073     set_tests_properties(examplestest PROPERTIES ENVIRONMENT "CTEST_OUTPUT_ON_FAILURE=1")
0074 endif()