Merge lp:~elopio/ubuntu-filemanager-app/cmake_autopilot_task into lp:ubuntu-filemanager-app

Proposed by Leo Arias on 2014-04-30
Status: Work in progress
Proposed branch: lp:~elopio/ubuntu-filemanager-app/cmake_autopilot_task
Merge into: lp:ubuntu-filemanager-app
Diff against target: 27 lines (+7/-2)
2 files modified
tests/autopilot/CMakeLists.txt (+5/-0)
tests/autopilot/filemanager/tests/__init__.py (+2/-2)
To merge this branch: bzr merge lp:~elopio/ubuntu-filemanager-app/cmake_autopilot_task
Reviewer Review Type Date Requested Status
Leo Arias (community) Needs Information on 2014-05-02
David Planella 2014-04-30 Needs Information on 2014-04-30
Review via email: mp+217791@code.launchpad.net
To post a comment you must log in.
170. By Leo Arias on 2014-04-30

Rename.

David Planella (dpm) wrote :

Thanks Leo. Could you add some more context on the MP's description? E.g.

- How is one now supposed to run the autopilot tests?
- Does this enable reusing Qt Creator's build, and thus supersedes https://code.launchpad.net/~dpm/ubuntu-filemanager-app/run-ap-from-out-of-source-build/+merge/217510 ?

review: Needs Information
Nicholas Skaggs (nskaggs) wrote :

David, this is one of the options we discussed, and yes it would supersede https://code.launchpad.net/~dpm/ubuntu-filemanager-app/run-ap-from-out-of-source-build/+merge/217510.

Essentially you would run the tests now using the target.

cmake .
make test-autopilot-build

One of the issues currently with the apps that have plugins that need to be built is the requirement you build the binary before running tests. Making it part of the build seems like a good idea, which is what I believe Leo is exploring here.

Leo Arias (elopio) wrote :

Right, that's the idea.
I would update the README to explain how to run them. But I'm missing a couple of things to finish this MP.

First, do you know what's the cmake variable name of the directory where the binary will be installed?
Second, how do we update the jenkins job to run the tests with this command instead of autopilot directly?

review: Needs Information

Unmerged revisions

170. By Leo Arias on 2014-04-30

Rename.

169. By Leo Arias on 2014-04-30

Added a CMake target for the autopilot tests.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/CMakeLists.txt'
2--- tests/autopilot/CMakeLists.txt 2014-01-31 20:03:12 +0000
3+++ tests/autopilot/CMakeLists.txt 2014-04-30 16:54:08 +0000
4@@ -6,3 +6,8 @@
5 DESTINATION ${PYTHON_PACKAGE_DIR}
6 )
7 endif(INSTALL_TESTS)
8+
9+add_custom_target(test-autopilot-build
10+ COMMAND BINARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/${EXEC} autopilot3 run ${AUTOPILOT_DIR}
11+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
12+)
13
14=== modified file 'tests/autopilot/filemanager/tests/__init__.py'
15--- tests/autopilot/filemanager/tests/__init__.py 2014-04-28 21:06:30 +0000
16+++ tests/autopilot/filemanager/tests/__init__.py 2014-04-30 16:54:08 +0000
17@@ -59,8 +59,8 @@
18 self.source_dir = os.path.dirname(
19 os.path.dirname(os.path.abspath('.')))
20 self.build_dir = self._get_build_dir()
21- self.local_location_binary = os.path.join(self.build_dir,
22- 'src', 'app', self.EXEC)
23+
24+ self.local_location_binary = os.environ.get('BINARY_PATH', None)
25 self.installed_location_binary = os.path.join('/usr/bin/', self.EXEC)
26 self.installed_location_qml = \
27 '/usr/share/filemanager/qml/filemanager.qml'

Subscribers

People subscribed via source and target branches