on xenial help sign in
Make the autopilot target work
9adcdeaAlbert Astals
CODING+12−9
@@ -170,20 +170,23 @@ provided.
170Running autopilot tests
170Running autopilot tests
171=======================
171=======================
172
172
173−Autopilot tests are run from the source directory.
173+Autopilot tests are run from the build directory (which will be ./builddir if you used
174−
174+the ./build script).
175−To run the test first you need to install
176
175
177−$ make -C builddir install
176+$ make autopilot
178
177
179−And then run autopilot
178+If you want you can also run tests individually, for that you need to install first
180
179
181−$ PYTHONPATH=tests/autopilot autopilot run unity8
180+$ make install
182
181
183−If you want to see the list of existing autopilot tests you can do
182+To see the list of existing autopilot tests you can do
184
183
185−$ PYTHONPATH=tests/autopilot autopilot list unity8
184+$ PYTHONPATH=../tests/autopilot autopilot list unity8
186
185
187And then run a single test with
186And then run a single test with
188
187
189−$ PYTHONPATH=tests/autopilot autopilot run unity8.some.very.long.test.name
188+$ PYTHONPATH=../tests/autopilot autopilot run unity8.some.very.long.test.name
189+
190+or run them all with
191+
192+$ PYTHONPATH=../tests/autopilot autopilot run unity8
cmake/modules/autopilot.cmake+5−1
@@ -4,7 +4,11 @@ function(declare_autopilot_test TEST_NAME TEST_SUITE WORKING_DIR)
4 add_custom_target(autopilot-${TEST_NAME}
4 add_custom_target(autopilot-${TEST_NAME}
5 COMMAND LANG=C UBUNTU_ICON_THEME=ubuntu-mobile QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks autopilot run ${TEST_SUITE}
5 COMMAND LANG=C UBUNTU_ICON_THEME=ubuntu-mobile QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks autopilot run ${TEST_SUITE}
6 WORKING_DIRECTORY ${WORKING_DIR}
6 WORKING_DIRECTORY ${WORKING_DIR}
7− DEPENDS install
7+ DEPENDS fake_install
8+ )
9+
10+ add_custom_target(fake_install
11+ COMMAND cmake --build ${CMAKE_BINARY_DIR} --target install
8 )
12 )
9
13
10 add_dependencies(autopilot autopilot-${TEST_NAME})
14 add_dependencies(autopilot autopilot-${TEST_NAME})