Merge lp://qastaging/~elopio/snapcraft/makedirs into lp://qastaging/~snappy-dev/snapcraft/core

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 121
Merged at revision: 124
Proposed branch: lp://qastaging/~elopio/snapcraft/makedirs
Merge into: lp://qastaging/~snappy-dev/snapcraft/core
Diff against target: 184 lines (+61/-42)
3 files modified
debian/control (+1/-1)
snapcraft/plugin.py (+13/-26)
snapcraft/tests/test_plugin.py (+47/-15)
To merge this branch: bzr merge lp://qastaging/~elopio/snapcraft/makedirs
Reviewer Review Type Date Requested Status
Michael Terry (community) Approve
Review via email: mp+266979@code.qastaging.launchpad.net

Commit message

Refactored the plugin makedirs, with tests. Added python3 >= 3.2 as a dependency, needed by makedirs exist_ok argument.

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

LGTM, thanks Leo!

review: Approve
Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :

The attempt to merge lp:~elopio/snapcraft/makedirs into lp:snapcraft failed. Below is the output from the failed tests.

wget -c http://0.0.0.0:46923/test.tar

parts:
cp --preserve=all zzz /tmp/tmpwbwvn8c3/parts/copy/install/zzz
cp --preserve=all src /tmp/tmp548v9y6s/parts/copy/install/dst
cp --preserve=all src /tmp/tmp7m_60hbh/parts/copy/install/dir/dst

.........--2015-08-05 14:20:49-- http://0.0.0.0:46923/test.tar
Connecting to 0.0.0.0:46923... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22 [text/html]
Saving to: ‘test.tar’

     0K 100% 313M=0s

2015-08-05 14:20:49 (313 MB/s) - ‘test.tar’ saved [22/22]

....Warning: unable to find "test_relexepath" in the path
...........EE....EE.......
======================================================================
ERROR: test_makedirs_with_existing_dirs (snapcraft.tests.test_plugin.PluginMakedirsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/tarmac/branch.Edc9Te/snapcraft/tests/test_plugin.py", line 205, in test_makedirs_with_existing_dirs
    p.makedirs()
  File "/tmp/tarmac/branch.Edc9Te/snapcraft/plugin.py", line 133, in makedirs
    os.makedirs(d, exists_ok=True)
TypeError: makedirs() got an unexpected keyword argument 'exists_ok'

======================================================================
ERROR: test_makedirs_with_existing_dirs (snapcraft.tests.test_plugin.PluginMakedirsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/tarmac/branch.Edc9Te/snapcraft/tests/test_plugin.py", line 205, in test_makedirs_with_existing_dirs
    p.makedirs()
  File "/tmp/tarmac/branch.Edc9Te/snapcraft/plugin.py", line 133, in makedirs
    os.makedirs(d, exists_ok=True)
TypeError: makedirs() got an unexpected keyword argument 'exists_ok'

======================================================================
ERROR: test_is_dirty (snapcraft.tests.test_plugin.PluginTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/tarmac/branch.Edc9Te/snapcraft/tests/test_plugin.py", line 61, in test_is_dirty
    p.pull()
  File "/tmp/tarmac/branch.Edc9Te/snapcraft/plugin.py", line 165, in pull
    self.makedirs()
  File "/tmp/tarmac/branch.Edc9Te/snapcraft/plugin.py", line 133, in makedirs
    os.makedirs(d, exists_ok=True)
TypeError: makedirs() got an unexpected keyword argument 'exists_ok'

======================================================================
ERROR: test_is_dirty (snapcraft.tests.test_plugin.PluginTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.4/unittest/case.py", line 57, in testPartExecutor
    yield
  File "/usr/lib/python3.4/unittest/case.py", line 615, in doCleanups
    function(*args, **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpjmz3ufkk'

----------------------------------------------------------------------
Ran 38 tests in 0.698s

FAILED (errors=4)

121. By Leo Arias

Fixed typo on the exist argument.

Revision history for this message
Leo Arias (elopio) wrote :

Sorry, a typo. It's exist_ok instead of exists_ok. I must have done something stupid when running the tests after the last push.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: