Merge lp:~nskaggs/ubuntu-filemanager-app/add-dep-cache into lp:ubuntu-filemanager-app

Proposed by Nicholas Skaggs
Status: Superseded
Proposed branch: lp:~nskaggs/ubuntu-filemanager-app/add-dep-cache
Merge into: lp:ubuntu-filemanager-app
Diff against target: 134 lines (+45/-27)
5 files modified
CMakeLists.txt (+34/-16)
README-Mergeproposal (+4/-0)
tests/autopilot/filemanager/__init__.py (+1/-1)
tests/autopilot/filemanager/tests/__init__.py (+2/-0)
tests/autopilot/filemanager/tests/test_filemanager.py (+4/-10)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-filemanager-app/add-dep-cache
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Needs Fixing
Ubuntu File Manager Developers Pending
Review via email: mp+288713@code.launchpad.net

This proposal has been superseded by a proposal from 2016-03-10.

Commit message

Add dependency cache for click depends downloads

Description of the change

Add dependency cache for click depends downloads

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
533. By Nicholas Skaggs

add mkdir for cache

534. By Nicholas Skaggs

use make directory

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-10-20 18:28:30 +0000
3+++ CMakeLists.txt 2016-03-10 22:12:44 +0000
4@@ -73,22 +73,40 @@
5
6 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json filemanager.apparmor ${CONTENT_HUB_EXPORTER} DESTINATION ${CMAKE_INSTALL_PREFIX})
7
8- MESSAGE("Grabbing upstream libs to ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs")
9- execute_process(
10- COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
11- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/get-click-deps -d ${CMAKE_CURRENT_SOURCE_DIR}/filemanager-libs.json ${CLICK_ARCH} ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
12- )
13- MESSAGE("Installing upstream libs from ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")
14- file(GLOB_RECURSE UPSTREAM_LIBS "${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/*")
15- foreach(ITEM ${UPSTREAM_LIBS})
16- IF( IS_DIRECTORY "${ITEM}" )
17- LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" )
18- ELSE()
19- LIST( APPEND FILES_TO_DEPLOY "${ITEM}" )
20- ENDIF()
21- endforeach()
22- MESSAGE("Following files to install:- ${FILES_TO_DEPLOY}")
23- INSTALL( FILES ${FILES_TO_DEPLOY} DESTINATION ${DATA_DIR}lib/${ARCH_TRIPLET} )
24+ set(UPSTREAM_LIBS_DIR ${CMAKE_BINARY_DIR}/upstream-libs)
25+
26+ #grab dependencies
27+ set(GET_CLICK_DEPS_TOOL ${CMAKE_SOURCE_DIR}/get-click-deps)
28+ set(DEPS_MANIFEST ${CMAKE_CURRENT_SOURCE_DIR}/filemanager-libs.json)
29+ MESSAGE("Grabbing upstream libs to ${UPSTREAM_LIBS_DIR}")
30+
31+ get_filename_component(BLD_CONFIGURATION_NAME ${CMAKE_BINARY_DIR} NAME)
32+ set(UPSTREAM_CACHE $ENV{HOME}/dev/upstream-libs-filemanager/${BLD_CONFIGURATION_NAME})
33+ MESSAGE("Upstream libs cache path: ${UPSTREAM_CACHE}")
34+
35+ if(EXISTS "${UPSTREAM_CACHE}")
36+ MESSAGE("Upstream libs cache exists.")
37+ file(COPY ${UPSTREAM_CACHE}/upstream-libs/ DESTINATION ${UPSTREAM_LIBS_DIR} PATTERN * )
38+ else()
39+ MESSAGE("Cache miss, downloading from network.")
40+ execute_process(
41+ COMMAND mkdir ${UPSTREAM_LIBS_DIR}
42+ COMMAND ${GET_CLICK_DEPS_TOOL} -d ${DEPS_MANIFEST} ${CLICK_ARCH} ${UPSTREAM_LIBS_DIR}
43+ )
44+ # Cache for next usage.
45+ file(COPY ${UPSTREAM_LIBS_DIR} DESTINATION ${UPSTREAM_CACHE} )
46+ endif()
47+ MESSAGE("Installing upstream libs from ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")
48+ file(GLOB_RECURSE UPSTREAM_LIBS "${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/*")
49+ foreach(ITEM ${UPSTREAM_LIBS})
50+ IF( IS_DIRECTORY "${ITEM}" )
51+ LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" )
52+ ELSE()
53+ LIST( APPEND FILES_TO_DEPLOY "${ITEM}" )
54+ ENDIF()
55+ endforeach()
56+ MESSAGE("Following files to install:- ${FILES_TO_DEPLOY}")
57+ INSTALL( FILES ${FILES_TO_DEPLOY} DESTINATION ${DATA_DIR}lib/${ARCH_TRIPLET} )
58 else(CLICK_MODE)
59 execute_process(
60 COMMAND qmake -query QT_INSTALL_QML
61
62=== modified file 'README-Mergeproposal'
63--- README-Mergeproposal 2015-12-19 07:34:45 +0000
64+++ README-Mergeproposal 2016-03-10 22:12:44 +0000
65@@ -26,3 +26,7 @@
66 The above checklist is more of a guideline to help file manager app trunk stay buildable,
67 stable and up to date.
68
69+
70+Jenkins
71+=======
72+In addition to manual reviews, merge proposals are subject to being run in jenkins to ensure the application builds and any unit tests are successful. For more information on jenkins and how it works, see the [Core Apps Jenkins Wiki](https://wiki.ubuntu.com/Touch/CoreApps/Jenkins)
73
74=== modified file 'tests/autopilot/filemanager/__init__.py'
75--- tests/autopilot/filemanager/__init__.py 2016-01-14 16:44:26 +0000
76+++ tests/autopilot/filemanager/__init__.py 2016-03-10 22:12:44 +0000
77@@ -606,7 +606,7 @@
78 """FileDetailsPopover Autopilot emulator."""
79
80 def get_path(self):
81- return self.select_single('Label', objectName='pathLabel').text
82+ return self.select_single('UCLabel', objectName='pathLabel').text
83
84
85 class PathBar(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
86
87=== modified file 'tests/autopilot/filemanager/tests/__init__.py'
88--- tests/autopilot/filemanager/tests/__init__.py 2015-03-12 20:58:23 +0000
89+++ tests/autopilot/filemanager/tests/__init__.py 2016-03-10 22:12:44 +0000
90@@ -32,6 +32,8 @@
91
92 import filemanager
93 from filemanager import fixture_setup as fm_fixtures
94+import gi
95+gi.require_version('Click', '0.4')
96 from gi.repository import Click
97
98 logger = logging.getLogger(__name__)
99
100=== modified file 'tests/autopilot/filemanager/tests/test_filemanager.py'
101--- tests/autopilot/filemanager/tests/test_filemanager.py 2015-03-10 21:41:40 +0000
102+++ tests/autopilot/filemanager/tests/test_filemanager.py 2016-03-10 22:12:44 +0000
103@@ -312,13 +312,10 @@
104
105 def test_copy_directory(self):
106 # Set up a directory to copy and a directory to copy it into.
107- destination_dir_path = os.path.join(self.fakehome,
108- 'destination')
109+ destination_dir_path = self.make_directory_in_home()
110 destination_dir_name = os.path.basename(destination_dir_path)
111- os.mkdir(destination_dir_path)
112- dir_to_copy_path = os.path.join(self.fakehome, 'to_copy')
113+ dir_to_copy_path = self.make_directory_in_home()
114 dir_to_copy_name = os.path.basename(dir_to_copy_path)
115- os.mkdir(dir_to_copy_path)
116
117 folder_list_page = self.app.main_view.get_folder_list_page()
118 self._assert_number_of_files(2)
119@@ -349,13 +346,10 @@
120
121 def test_cut_directory(self):
122 # Set up a directory to cut and a directory to move it into.
123- destination_dir_path = os.path.join(self.fakehome,
124- 'destination')
125+ destination_dir_path = self.make_directory_in_home()
126 destination_dir_name = os.path.basename(destination_dir_path)
127- os.mkdir(destination_dir_path)
128- dir_to_cut_path = os.path.join(self.fakehome, 'to_cut')
129+ dir_to_cut_path = self.make_directory_in_home()
130 dir_to_cut_name = os.path.basename(dir_to_cut_path)
131- os.mkdir(dir_to_cut_path)
132
133 folder_list_page = self.app.main_view.get_folder_list_page()
134 self._assert_number_of_files(2)

Subscribers

People subscribed via source and target branches