Merge lp:~gang65/ubuntu-system-settings/ubuntu-system-settings-readme-fix into lp:ubuntu-system-settings

Proposed by Bartosz Kosiorek
Status: Needs review
Proposed branch: lp:~gang65/ubuntu-system-settings/ubuntu-system-settings-readme-fix
Merge into: lp:ubuntu-system-settings
Diff against target: 137 lines (+99/-3)
3 files modified
README (+92/-0)
debian/changelog (+5/-1)
tests/autopilot/ubuntu_system_settings/tests/__init__.py (+2/-2)
To merge this branch: bzr merge lp:~gang65/ubuntu-system-settings/ubuntu-system-settings-readme-fix
Reviewer Review Type Date Requested Status
Bartosz Kosiorek (community) Needs Information
PS Jenkins bot continuous-integration Needs Fixing
Jonas G. Drange (community) Needs Information
Review via email: mp+274811@code.launchpad.net

Commit message

Updated README file with information about building and running (LP: #1350687)

Description of the change

Updated README file with information about building and running (LP: #1350687)

To post a comment you must log in.
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

Looks good, thanks! I added some comments inline.

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1546. By Bartosz Kosiorek

Updates after review

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

Thanks Jonas for review.
I would like to fix some issues in system-settings, and I thought that creating README will be nice starting point :-)

I have a few question for you:
How do you build system-settings?
How do you run test ?
How do you updates translations?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

On 19 October 2015 at 05:02, Bartosz Kosiorek <email address hidden> wrote:

> I would like to fix some issues in system-settings, and I thought that
> creating README will be nice starting point :-)
>
>
​Great! It is :)​

> I have a few question for you:
> How do you build system-settings?
>

​Similarly to what you have proposed, but without ninja and eight
concurrent jobs.​ ;)

> How do you run test ?
>

​Now, that's a good question. We have unit tests, python formatting tests
as well as autopilot tests. Running the unit tests is done using “make
test”, but there's no definitive way of running the autopilot tests. I
usually cd to test/autopilot and run “autopilot3 run -v
ubuntu_system_settings.tests”, but it should be trivial to add this to the
makefile.

> How do you updates translations?
>

​IIRC it is done by the infrastructure, but maybe others can chime in on
this.​

Revision history for this message
Sebastien Bacher (seb128) wrote :

> How do you updates translations?

There is a "pot" make target that updates the template (po/ubuntu-system-settings.pot), that's done automatically during the package build [1].

We enabled the auto import from the package to launchpad and are using ubuntu translations, the currently used serie for the phone image is ubuntu-rtm/15.04 and translations can be done on
https://translations.launchpad.net/ubuntu-rtm/15.04/+source/ubuntu-system-settings
(the url might change when we rebase on another serie)

The translations are then exported from launchpad to language-packs which are included on the system images

[1] http://bazaar.launchpad.net/~system-settings-touch/ubuntu-system-settings/trunk/view/head:/debian/rules#L17

1547. By Bartosz Kosiorek

Further updating README file

1548. By Bartosz Kosiorek

Small fix

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

I tried to run autopilot tests, from directory: tests/autopilot, with command:
   $ autopilot3 run ubuntu_system_settings

Unfortunately I have following error (I think I miss maliit server):

ERROR: unittest.loader.ModuleImportFailure.ubuntu_system_settings.tests.test_notifications
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/autopilot/run.py", line 438, in _filter_tests
    test.debug()
  File "/usr/lib/python3.4/unittest/case.py", line 630, in debug
    getattr(self, self._testMethodName)()
  File "/usr/lib/python3.4/unittest/loader.py", line 32, in testFailure
    raise exception
ImportError: Failed to import test module: ubuntu_system_settings.tests.test_notifications
Traceback (most recent call last):
  File "/usr/lib/python3.4/unittest/loader.py", line 312, in _find_tests
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.4/unittest/loader.py", line 290, in _get_module_from_name
    __import__(name)
  File "/home/kosiorek/dev/core/ubuntu-system-settings-readme-fix/tests/autopilot/ubuntu_system_settings/__init__.py", line 21, in <module>
    from ubuntu_system_settings.utils.i18n import ugettext as _
  File "/home/kosiorek/dev/core/ubuntu-system-settings-readme-fix/tests/autopilot/ubuntu_system_settings/utils/__init__.py", line 1, in <module>
    from ubuntuuitoolkit._custom_proxy_objects._common \
ImportError: cannot import name 'is_maliit_process_running'

How I could install maliit server?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

On 20 October 2015 at 22:58, Bartosz Kosiorek <email address hidden> wrote:

> Review: Needs Information
>
> I tried to run autopilot tests, from directory: tests/autopilot, with
> command:
> $ autopilot3 run ubuntu_system_settings
>
> Unfortunately I have following error (I think I miss maliit server):
>

​Maybe you're missing a package listed in $ apt-cache show
ubuntu-system-settings-autopilot | grep Depends​

1549. By Bartosz Kosiorek

Fix autopilot test, when system-settings is installed in /usr/local/bin/system-settings

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

Unfortunately I don't know why it is failing.

On my othe MR, the problem is the same:
https://code.launchpad.net/~gang65/ubuntu-system-settings/ubuntu-system-settings-readme-fix/+merge/274811

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ubuntu_system_settings/tests/test_system_updates.py", line 91, in test_no_updates_state
    updates.state.wait_for("NOUPDATES")
  File "/usr/lib/python3/dist-packages/autopilot/introspection/types.py", line 180, in wait_for
    failure_msg))
AssertionError: After 10.0 seconds test on SystemUpdatesPage.state failed: 'NOUPDATES' != dbus.String('SEARCHING', variant_level=1)

review: Needs Information
Revision history for this message
Bartosz Kosiorek (gang65) wrote :
review: Needs Information
1550. By Bartosz Kosiorek

Further updating README file

1551. By Bartosz Kosiorek

Merge with trunk.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

Is it possible to merge these changes into trunk?
What needs to be fixed?

review: Needs Information

Unmerged revisions

1551. By Bartosz Kosiorek

Merge with trunk.

1550. By Bartosz Kosiorek

Further updating README file

1549. By Bartosz Kosiorek

Fix autopilot test, when system-settings is installed in /usr/local/bin/system-settings

1548. By Bartosz Kosiorek

Small fix

1547. By Bartosz Kosiorek

Further updating README file

1546. By Bartosz Kosiorek

Updates after review

1545. By Bartosz Kosiorek

[ Bartosz Kosiorek ]
Updated README file with information about building and running (LP: #1350687)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2014-09-24 14:49:06 +0000
3+++ README 2015-11-01 12:05:20 +0000
4@@ -4,3 +4,95 @@
5 https://launchpad.net/ubuntu-system-settings
6 https://wiki.ubuntu.com/SystemSettings
7
8+
9+= Preparing environment =
10+
11+You need to download source code with using command:
12+
13+ $ bzr branch lp:ubuntu-system-settings branch-name
14+ $ cd branch-name
15+
16+You need to install all necessary packages needed for build.
17+The easiest way to install dependend packages is to run command:
18+
19+ $ sudo apt-get build-dep ubuntu-system-settings
20+
21+Unfortunately some packages still could be missing (because we are working on trunk branch).
22+The list of all requried packages is available at file: debian/control
23+You could install missing packages by using apt-get command. For example:
24+
25+ $ sudo apt-get install libubuntu-download-manager-client-dev libubuntuoneauth-2.0-dev \
26+ libtrust-store-dev libupower-glib-dev libaccountsservice-dev libtimezonemap1-dev
27+
28+
29+= Building =
30+
31+The build system uses CMake. To compile, create "builddir" directory
32+(to separate build artefacts from source code). Then invoke cmake generation
33+process and start build :
34+
35+ $ mkdir builddir && cd builddir
36+ $ cmake .. && cmake --build . -- -j 5
37+
38+To speed up generation and compilation, you could use Ninja generator instead of Make:
39+
40+ $ mkdir builddir && cd builddir
41+ $ cmake .. -G Ninja && cmake --build .
42+
43+
44+= Running application =
45+
46+To run application you need to type command:
47+
48+For Make generator:
49+
50+ $ sudo make install
51+
52+For Ninja generator:
53+
54+ $ sudo ninja install
55+
56+Then from builddir run command:
57+
58+ $ ./src/system-settings
59+
60+
61+= Running Unit Tests =
62+
63+Unit Tests help with testing the internal working of components while
64+autopilot tests help with testing the UI workflow as experience by the user.
65+Running unit tests is quite simple and very fast.
66+
67+If you want to run all tests, then run the following command from the builddir,
68+
69+ $ ctest --output-on-failure
70+
71+If you want more verbose output, then run,
72+
73+ $ ctest -VV
74+
75+You could filter individual tests by using "-R <regex>" or "--tests-regex <regex>" parameter.
76+For example to run only tests which contains "bluetooth" word you could specify:
77+
78+ $ ctest --tests-regex bluetooth
79+
80+
81+= Running autopilot tests
82+
83+Autopilot tests are functional tests, which emulate using application by touch.
84+Remember to setup language to US before running autopilot tests,
85+to pass tests successfully.
86+
87+To run autopilot tests, you need following packages:
88+
89+ $ sudo apt-get install ubuntu-ui-toolkit-autopilot python3-autopilot
90+
91+To run all tests type commands:
92+
93+ $ cd tests/autopilot
94+ $ autopilot3 run ubuntu_system_settings -v
95+
96+To see what test cases a test suite has, and selectively run only some of them, use:
97+ $ autopilot3 list ubuntu_system_settings
98+
99+
100
101=== modified file 'debian/changelog'
102--- debian/changelog 2015-10-29 15:48:09 +0000
103+++ debian/changelog 2015-11-01 12:05:20 +0000
104@@ -41,7 +41,11 @@
105 * [phone] encode numbers before passing them to url-dispatcher (LP:
106 #1496845)
107
108- -- Ken VanDine <ken.vandine@canonical.com> Fri, 02 Oct 2015 17:52:49 +0000
109+ [ Bartosz Kosiorek ]
110+ * Updated README file with information about building and running (LP: #1350687)
111+
112+ -- Bartosz Kosiorek <gang65@poczta.onet.pl> Sun, 18 Oct 2015 00:10:12 +0200
113+
114
115 ubuntu-system-settings (0.3+15.10.20150930-0ubuntu1) wily; urgency=medium
116
117
118=== modified file 'tests/autopilot/ubuntu_system_settings/tests/__init__.py'
119--- tests/autopilot/ubuntu_system_settings/tests/__init__.py 2015-10-06 15:56:48 +0000
120+++ tests/autopilot/ubuntu_system_settings/tests/__init__.py 2015-11-01 12:05:20 +0000
121@@ -79,7 +79,7 @@
122
123 """Base class for Ubuntu System Settings."""
124
125- APP_PATH = '/usr/bin/system-settings'
126+ APP_FILENAME = 'system-settings'
127 DESKTOP_FILE = '/usr/share/applications/ubuntu-system-settings.desktop'
128
129 def setUp(self, panel=None):
130@@ -107,7 +107,7 @@
131 :returns: A proxy object that represents the application. Introspection
132 data is retrievable via this object.
133 """
134- params = [self.APP_PATH]
135+ params = [self.APP_FILENAME]
136 if platform.model() != 'Desktop':
137 params.append('--desktop_file_hint={}'.format(self.DESKTOP_FILE))
138

Subscribers

People subscribed via source and target branches