Merge lp:~xnox/gallery-app/fix-sample-dir into lp:gallery-app

Proposed by Dimitri John Ledkov
Status: Rejected
Rejected by: Dimitri John Ledkov
Proposed branch: lp:~xnox/gallery-app/fix-sample-dir
Merge into: lp:gallery-app
Diff against target: 27 lines (+2/-8)
1 file modified
tests/autopilot/gallery_app/tests/__init__.py (+2/-8)
To merge this branch: bzr merge lp:~xnox/gallery-app/fix-sample-dir
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Disapprove
PS Jenkins bot continuous-integration Needs Fixing
Ken VanDine Pending
Sergio Schvezov Pending
Review via email: mp+210517@code.launchpad.net

Commit message

Fix sample_dir to be detected relative current test (regardless of type) and not depend on /home/xnox/canonical/gallery-app.

Description of the change

Fix sample_dir to be detected relative current test (regardless of type) and not depend on /home/xnox/canonical/gallery-app.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

This change removes the hard-coded paths for sample-data (python2.7 absolute locations or relative to $PWD) and instead uses precise locations relative the currently executed __init__.py itself, thus guarantees that correct matching data files are selected. This makes it possible to execute tests when they are shipped in e.g. python3 location globally, or when $PWD does not container "gallery_app/" module.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I'm confused about the mako failure, is it running the tests as clicks or debs? How can I reproduce the jenkins run above with my mako?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

xnox, it's running them as debs most likely as this build system doesn't build clicks

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I made a merge proposal to resolve compatibility in gallery_app with
next phablet-tools (which is needed to support transition to python3
and python2 supported branches).

See:
https://code.launchpad.net/~xnox/gallery-app/fix-sample-dir/+merge/210517

A jenkins bot, points that .debs were built for this project and tests
executed on the device.

However, gallery_app is now a click and tests pass when it's build and
tested as a click.

I've fetched the two generated debs (gallery-app and
gallery-app-autopilot) pushed to my mako device, and executed the
tests using "phablet-test-run -v gallery_app" and all of them also
pass.

I now have questions:

1) is the ps-jenkins bot correct?
2) why is ps-jenkins testing the built .deb instead of
building/testing .click on mako?
3) why it appears to not use phablet-test-run?
4) how do i reproduce the ps-jenkins demonstrated failure, locally on
my device and resolve the problem?

Most importantly, can somebody else retest my proposed branch and
review/approve my merge proposal, at the moment it's on the critical
path blocking removal of python2 from the images.

--
Regards,

Dimitri.

Revision history for this message
Francis Ginther (fginther) wrote :

On Thu, Mar 13, 2014 at 10:23 AM, Dimitri John Ledkov <email address hidden> wrote:
> 1) is the ps-jenkins bot correct?

Based on our IRC conversation and this package now being converted to
click, I believe the bot is testing with a broken setup. I would
expect unpredictable results when installing a deb over a click
package.

> 2) why is ps-jenkins testing the built .deb instead of
> building/testing .click on mako?

Resource issues have prevented making the switch over. Work is in
progress, and is expected to be in place by the end of the month.

> 3) why it appears to not use phablet-test-run?

It's using phablet-test-run, but it's not being echoed.

> 4) how do i reproduce the ps-jenkins demonstrated failure, locally on
> my device and resolve the problem?

I've provided some guidance through IRC.

Francis

>
> Most importantly, can somebody else retest my proposed branch and
> review/approve my merge proposal, at the moment it's on the critical
> path blocking removal of python2 from the images.
>
> --
> Regards,
>
> Dimitri.
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help : https://help.launchpad.net/ListHelp

--
Francis Ginther
Canonical - Ubuntu Engineering - Continuous Integration Team

Revision history for this message
Barry Warsaw (barry) wrote :

See also https://code.launchpad.net/~barry/gallery-app/xnox-pkgresources/+merge/210877 for a better API for accessing file system resources.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

https://code.launchpad.net/~barry/gallery-app/xnox-pkgresources/+merge/210877 is much better, complete replaces my changes, and jenkins is happy with it. thus i'll reject this one!

review: Disapprove
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Dear Francis,

On 13 March 2014 15:59, Francis Ginther <email address hidden> wrote:
> On Thu, Mar 13, 2014 at 10:23 AM, Dimitri John Ledkov <email address hidden> wrote:
>> 1) is the ps-jenkins bot correct?
>
> Based on our IRC conversation and this package now being converted to
> click, I believe the bot is testing with a broken setup. I would
> expect unpredictable results when installing a deb over a click
> package.
>
>> 2) why is ps-jenkins testing the built .deb instead of
>> building/testing .click on mako?
>
> Resource issues have prevented making the switch over. Work is in
> progress, and is expected to be in place by the end of the month.
>
>> 3) why it appears to not use phablet-test-run?
>
> It's using phablet-test-run, but it's not being echoed.
>
>> 4) how do i reproduce the ps-jenkins demonstrated failure, locally on
>> my device and resolve the problem?
>
> I've provided some guidance through IRC.
>

Thanks for this guidance. I did not manage to reproduce the bug.
However, barry proposed alternative fix which did pass the ps-jenkins.
Thus we'll go with merging that instead.

Regards,

Dimitri.

Unmerged revisions

923. By Launchpad Translations on behalf of phablet-team

Launchpad automatic translations update.

922. By Sergio Schvezov

Fixing test init for ci

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/gallery_app/tests/__init__.py'
2--- tests/autopilot/gallery_app/tests/__init__.py 2014-03-07 10:57:54 +0000
3+++ tests/autopilot/gallery_app/tests/__init__.py 2014-03-11 23:59:15 +0000
4@@ -49,13 +49,6 @@
5
6 _default_sample_destination_dir = "/tmp/gallery-ap_sd"
7
8- _sample_dirs = {
9- EnvironmentTypes.installed:
10- "/usr/lib/python2.7/dist-packages/gallery_app/data",
11- EnvironmentTypes.local: "gallery_app/data",
12- EnvironmentTypes.click: "gallery_app/data",
13- }
14-
15 ARGS = []
16
17 @property
18@@ -121,7 +114,8 @@
19 shutil.move(mock_thumbs, thumbs)
20
21 def configure_sample_files(self, env_type):
22- self.sample_dir = self._sample_dirs[env_type]
23+ self.sample_dir = os.path.join(
24+ os.path.dirname(__file__), '..', 'data')
25 self.sample_destination_dir = \
26 self._get_sample_destination_dir(env_type)
27 if (os.path.exists(self.sample_destination_dir)):

Subscribers

People subscribed via source and target branches