3# QML tests that do not require graphical capabilities.
4add_custom_target(unittests)
6# QML tests that require graphical capabilities.
7add_custom_target(uitests)
8add_custom_target(xvfbuitests)
10add_custom_target(alltests)
11add_dependencies(alltests unittests uitests)
13add_custom_target(xvfballtests)
14add_dependencies(xvfballtests unittests xvfbuitests)
16# Support libraries and plugins
17add_subdirectory(mocks)
18add_subdirectory(utils)
19add_subdirectory(uqmlscene)
21# Use our custom implementation of qmlscene and import dbus-test-runner
22add_executable(qmlscene ALIAS uqmlscene)
23import_executables(dbus-test-runner)
25set(UNITY_PLUGINPATH "${CMAKE_BINARY_DIR}/plugins" CACHE PATH "Path to pre-built unity8 plugin dir.")
26set(UNITY_MOCKPATH "${CMAKE_BINARY_DIR}/tests/mocks" CACHE PATH "Path to pre-built unity8 mock dir.")
28# Pre-built mocks have preference, pre-built plugins replace local build
31 ${CMAKE_BINARY_DIR}/tests/mocks
32 ${CMAKE_BINARY_DIR}/tests/utils/modules
35list(REMOVE_DUPLICATES UNITY_IMPORT_PATHS)
36set(UNITY_IMPORT_PATHS ${UNITY_IMPORT_PATHS} CACHE INTERNAL "")
38macro(unity8_parse_arguments)
39 cmake_parse_arguments(U8TEST
40 "${QMLTEST_OPTIONS};LIGHTDM"
49 ${UNITY_MOCKPATH}/libusermetrics
50 ${UNITY_MOCKPATH}/IntegratedLightDM/liblightdm
55 string(REPLACE ";" ":" ld_library_path "${ld_paths}")
56 set(ld_library_path LD_LIBRARY_PATH=${ld_library_path})
59 set(U8TEST_ARGN "${ARGN}")
60 list(REMOVE_ITEM U8TEST_ARGN LIGHTDM)
71# add a non-graphical unit test
72# see QmlTest.cmake for additional options
73function(add_unity8_unittest COMPONENT_NAME TARGET)
74 unity8_parse_arguments(${ARGN})
75 add_executable_test(${COMPONENT_NAME} ${TARGET}
77 IMPORT_PATHS ${UNITY_IMPORT_PATHS}
80 ENVIRONMENT ${environment}
81 QT_QPA_PLATFORM=minimal
86# add a graphical unit test
87function(add_unity8_uitest COMPONENT_NAME TARGET)
88 unity8_parse_arguments(${ARGN})
89 add_executable_test(${COMPONENT_NAME} ${TARGET}
90 IMPORT_PATHS ${UNITY_IMPORT_PATHS}
93 ENVIRONMENT ${environment}
98# add a non-graphical qml unit test
99function(add_unity8_qmlunittest PATH COMPONENT_NAME)
100 unity8_parse_arguments(${ARGN})
101 add_qml_unittest(${PATH} ${COMPONENT_NAME}
103 IMPORT_PATHS ${UNITY_IMPORT_PATHS}
106 ENVIRONMENT ${environment}
107 QT_QPA_PLATFORM=minimal
108 ${U8TEST_ENVIRONMENT}
112# add a graphical qml test
113function(add_unity8_qmltest PATH COMPONENT_NAME)
114 unity8_parse_arguments(${ARGN})
115 add_qml_test(${PATH} ${COMPONENT_NAME}
116 IMPORT_PATHS ${UNITY_IMPORT_PATHS}
119 ENVIRONMENT ${environment}
120 ${U8TEST_ENVIRONMENT}
124# add a graphical qml benchmark
125function(add_unity8_qmlbenchmark PATH COMPONENT_NAME ITERATIONS)
126 add_unity8_qmltest(${PATH} ${COMPONENT_NAME} ITERATIONS ${ITERATIONS} ${ARGN})
130# Actual test definitions
131add_subdirectory(libs)
132add_subdirectory(plugins)
133add_subdirectory(qmltests)
134add_subdirectory(whitespace)
135add_subdirectory(imports)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list