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

Proposed by Leo Arias
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
David Planella Needs Information
Review via email: mp+217791@code.launchpad.net
To post a comment you must log in.
170. By Leo Arias

Rename.

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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

Rename.

169. By Leo Arias

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
=== modified file 'tests/autopilot/CMakeLists.txt'
--- tests/autopilot/CMakeLists.txt 2014-01-31 20:03:12 +0000
+++ tests/autopilot/CMakeLists.txt 2014-04-30 16:54:08 +0000
@@ -6,3 +6,8 @@
6 DESTINATION ${PYTHON_PACKAGE_DIR}6 DESTINATION ${PYTHON_PACKAGE_DIR}
7 )7 )
8endif(INSTALL_TESTS)8endif(INSTALL_TESTS)
9
10add_custom_target(test-autopilot-build
11 COMMAND BINARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/${EXEC} autopilot3 run ${AUTOPILOT_DIR}
12 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
13)
914
=== modified file 'tests/autopilot/filemanager/tests/__init__.py'
--- tests/autopilot/filemanager/tests/__init__.py 2014-04-28 21:06:30 +0000
+++ tests/autopilot/filemanager/tests/__init__.py 2014-04-30 16:54:08 +0000
@@ -59,8 +59,8 @@
59 self.source_dir = os.path.dirname(59 self.source_dir = os.path.dirname(
60 os.path.dirname(os.path.abspath('.')))60 os.path.dirname(os.path.abspath('.')))
61 self.build_dir = self._get_build_dir()61 self.build_dir = self._get_build_dir()
62 self.local_location_binary = os.path.join(self.build_dir,62
63 'src', 'app', self.EXEC)63 self.local_location_binary = os.environ.get('BINARY_PATH', None)
64 self.installed_location_binary = os.path.join('/usr/bin/', self.EXEC)64 self.installed_location_binary = os.path.join('/usr/bin/', self.EXEC)
65 self.installed_location_qml = \65 self.installed_location_qml = \
66 '/usr/share/filemanager/qml/filemanager.qml'66 '/usr/share/filemanager/qml/filemanager.qml'

Subscribers

People subscribed via source and target branches