on xenial help sign in
Make the autopilot target work
commit9adcdead057ee048c490ee9187252662edfc00a4 authorAlbert Astals <albert.astals@canonical.com> dateThu 9 Jan 2014, 11:53 (13 years ago) parentefc28e7
2 files changed+17−10
CODING+12−9 cmake/modules/autopilot.cmake+5−1
CODING+12−9
@@ -170,20 +170,23 @@ provided.
170170Running autopilot tests
171171=======================
172172
173−Autopilot tests are run from the source directory.
174−
175−To run the test first you need to install
173+Autopilot tests are run from the build directory (which will be ./builddir if you used
174+the ./build script).
176175
177−$ make -C builddir install
176+$ make autopilot
178177
179−And then run autopilot
178+If you want you can also run tests individually, for that you need to install first
180179
181−$ PYTHONPATH=tests/autopilot autopilot run unity8
180+$ make install
182181
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
184183
185−$ PYTHONPATH=tests/autopilot autopilot list unity8
184+$ PYTHONPATH=../tests/autopilot autopilot list unity8
186185
187186And then run a single test with
188187
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)
44 add_custom_target(autopilot-${TEST_NAME}
55 COMMAND LANG=C UBUNTU_ICON_THEME=ubuntu-mobile QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks autopilot run ${TEST_SUITE}
66 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
812 )
913
1014 add_dependencies(autopilot autopilot-${TEST_NAME})