Merge ~nacc/git-ubuntu:lp1734905-script-snap into git-ubuntu:master

Proposed by Nish Aravamudan
Status: Merged
Merged at revision: 4af7a4a3c8daa5a7789f920d972ea66f52d10654
Proposed branch: ~nacc/git-ubuntu:lp1734905-script-snap
Merge into: git-ubuntu:master
Prerequisite: ~nacc/git-ubuntu:lp1734905-script-cleanups
Diff against target: 168 lines (+65/-6)
7 files modified
bin/import-source-packages.py (+2/-2)
bin/source-package-walker.py (+1/-2)
bin/update-repository-alias.py (+1/-2)
gitubuntu/scriptutils.py (+0/-0)
setup.py (+1/-0)
snap/snapcraft.yaml (+40/-0)
snap/wrappers/git-ubuntu-self-test (+20/-0)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Robie Basak Approve
Review via email: mp+337104@code.launchpad.net

Description of the change

Make jenkins happy.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4735ab7b4ae44b778ba3b58904e5a26536996a58
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/278/
Executed test runs:
    SUCCESS: Checkout
    FAILED: Style Check

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/278/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:00569674341bb7be0d6b66495411327517a59a64
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/295/
Executed test runs:
    SUCCESS: Checkout
    FAILED: Style Check

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/295/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:670d8855ed35778ab5389f474cc6ddf562139e8e
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/300/
Executed test runs:
    SUCCESS: Checkout
    FAILED: Style Check

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/300/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Nish Aravamudan (nacc) wrote :

This will fail old CI, but will pass (hopefully) new CI:

https://jenkins.ubuntu.com/server/job/git-ubuntu-ci-redux/10/console

Revision history for this message
Nish Aravamudan (nacc) wrote :
Download full text (5.0 KiB)

From that job:

setup: running self-test
Warning: Permanently added '192.168.122.251' (ECDSA) to the list of known hosts.
No config file found, using default configuration
pylint passed!
============================= test session starts ==============================
platform linux -- Python 3.6.3, pytest-3.1.3, py-1.5.2, pluggy-0.4.0
rootdir: /snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu, inifile:
plugins: cov-2.5.1
collected 136 items

../../snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/build.py ........
../../snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/git_repository.py ........
../../snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/lint.py ..........
../../snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/repo_builder.py ..............
../../snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/source_builder_test.py ............
../../snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/test_git_repository.py ...........................................
../../snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/test_importer.py ...
../../snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/versioning.py ......................................

----------- coverage: platform linux, python 3.6.3-final-0 -----------
Name Stmts Miss Cover
------------------------------------------------------------------------------------------------------
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/__init__.py 0 0 100%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/__main__.py 86 76 12%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/build.py 451 376 17%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/buildsource.py 36 25 31%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/cache.py 1 0 100%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/clone.py 75 56 25%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/dsc.py 65 45 31%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/exportorig.py 53 40 25%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/git_repository.py 1041 614 41%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/importer.py 572 492 14%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/importlocal.py 152 133 12%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/importppa.py 100 80 20%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/lint.py 366 277 24%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/logging.py 8 4 50%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/merge.py 220 193 12%
/snap/git-ubuntu/x1/lib/python3.6/site-packages/gitubuntu/queue.py 174 148 15%
/snap/git-ubuntu/x1/lib/python3.6/site-packa...

Read more...

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/302/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    SUCCESS: Integration Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/302/rebuild

review: Approve (continuous-integration)
Revision history for this message
Robie Basak (racb) :
review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/303/
Executed test runs:
    FAILED: VM Setup

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/303/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/304/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/304/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/305/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/305/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/306/
Executed test runs:
    FAILED: VM Setup

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/306/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/308/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/308/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/321/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/321/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/322/
Executed test runs:
    FAILED: VM Setup

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/322/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/324/
Executed test runs:
    FAILED: VM Setup

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/324/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/325/
Executed test runs:
    FAILED: VM Setup

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/325/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:4af7a4a3c8daa5a7789f920d972ea66f52d10654
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/326/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    SUCCESS: Unit Tests
    SUCCESS: Integration Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/326/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/import-source-packages.py b/bin/import-source-packages.py
2index 3acdd36..5c52948 100755
3--- a/scripts/import-source-packages.py
4+++ b/bin/import-source-packages.py
5@@ -33,9 +33,9 @@ sys.path.insert(
6 )
7 )
8
9-from gitubuntu.source_information import launchpad_login
10 from gitubuntu.run import run
11-import scriptutils
12+import gitubuntu.scriptutils as scriptutils
13+from gitubuntu.source_information import launchpad_login
14
15 # The 'time' attribute is the publication date, as a timestamp, of the SPPHR
16 # corresponding to the URL stored in the 'link' attribute.
17diff --git a/scripts/source-package-walker.py b/bin/source-package-walker.py
18index 50a84c2..28e2425 100755
19--- a/scripts/source-package-walker.py
20+++ b/bin/source-package-walker.py
21@@ -17,8 +17,6 @@ import os
22 import sys
23 import urllib.request
24
25-import scriptutils
26-
27 from debian.deb822 import Sources
28
29 # We expect to be running from a git repository in master for this
30@@ -35,6 +33,7 @@ sys.path.insert(
31 )
32 )
33
34+import gitubuntu.scriptutils as scriptutils
35 from gitubuntu.source_information import GitUbuntuSourceInformation
36
37 def import_all_published_sources(
38diff --git a/scripts/update-repository-alias.py b/bin/update-repository-alias.py
39index a2d9fd6..5aa41da 100755
40--- a/scripts/update-repository-alias.py
41+++ b/bin/update-repository-alias.py
42@@ -8,8 +8,6 @@ import os
43 import sys
44 import urllib
45
46-import scriptutils
47-
48 # We expect to be running from a git repository in master for this
49 # script, because the snap's python code is not exposed except within
50 # the snap
51@@ -24,6 +22,7 @@ sys.path.insert(
52 )
53 )
54
55+import gitubuntu.scriptutils as scriptutils
56 from gitubuntu.source_information import launchpad_login_auth
57
58 def update_git_repository(package, dry_run, unset):
59diff --git a/scripts/scriptutils.py b/gitubuntu/scriptutils.py
60index 58843a2..58843a2 100644
61--- a/scripts/scriptutils.py
62+++ b/gitubuntu/scriptutils.py
63diff --git a/setup.py b/setup.py
64index ab91ab9..0fcb081 100644
65--- a/setup.py
66+++ b/setup.py
67@@ -20,5 +20,6 @@ setup(name='gitubuntu',
68 'keyrings.alt==2.2',
69 'lazr.restfulclient==0.13.5',
70 'pytest==3.1.3',
71+ 'pytest-cov==2.5.1',
72 ]
73 )
74diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
75index 2d89fad..9bf85a3 100644
76--- a/snap/snapcraft.yaml
77+++ b/snap/snapcraft.yaml
78@@ -33,6 +33,26 @@ apps:
79 command: wrappers/git-merge-changelogs
80 environment:
81 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
82+ self-test:
83+ command: wrappers/git-ubuntu-self-test
84+ environment:
85+ PYTHONPATH: "$SNAP/lib/python3.6/site-packages"
86+ PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
87+ import-source-packages:
88+ command: bin/import-source-packages.py
89+ environment:
90+ PYTHONPATH: "$SNAP/lib/python3.6/site-packages"
91+ PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
92+ source-package-walker:
93+ command: bin/source-package-walker.py
94+ environment:
95+ PYTHONPATH: "$SNAP/lib/python3.6/site-packages"
96+ PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
97+ update-repository-alias:
98+ command: bin/update-repository-alias.py
99+ environment:
100+ PYTHONPATH: "$SNAP/lib/python3.6/site-packages"
101+ PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
102
103 parts:
104 gbp:
105@@ -180,6 +200,11 @@ parts:
106 build-packages:
107 - libssl-dev
108 - libsqlite3-dev
109+ - libbz2-dev
110+ - liblzma-dev
111+ - libdb-dev
112+ - libgdbm-dev
113+ - libreadline-dev
114 stage:
115 - -usr/lib/python3.6/test
116 ubuntutools-python2:
117@@ -251,6 +276,18 @@ parts:
118 - -usr/bin/xzgrep
119 - -usr/bin/xzless
120 - -usr/bin/xzmore
121+ pylint:
122+ plugin: python
123+ python-version: python3
124+ source: https://github.com/PyCQA/pylint/archive/pylint-1.7.2.tar.gz
125+ source-type: tar
126+ stage:
127+ - -usr/bin/py*
128+ - -usr/bin/2to3*
129+ - -usr/share/*python*
130+ - -usr/lib/python3.5
131+ - -usr/lib/python3.6
132+ after: [python3]
133 git-ubuntu:
134 plugin: python
135 python-version: python3
136@@ -308,3 +345,6 @@ parts:
137 organize:
138 git-reconstruct-changelog: bin/git-reconstruct-changelog
139 git-merge-changelogs: bin/git-merge-changelogs
140+ import-source-packages.py: bin/import-source-packages.py
141+ source-package-walker.py: bin/source-package-walker.py
142+ update-repository-alias.py: bin/update-repository-alias.py
143diff --git a/snap/wrappers/git-ubuntu-self-test b/snap/wrappers/git-ubuntu-self-test
144new file mode 100755
145index 0000000..04789b4
146--- /dev/null
147+++ b/snap/wrappers/git-ubuntu-self-test
148@@ -0,0 +1,20 @@
149+#!/snap/core/current/bin/bash
150+
151+python3 -m pylint --ignored-modules=pygit2 -E $SNAP/lib/python3.6/site-packages/gitubuntu/
152+PYLINT_RC=$?
153+
154+if [ $PYLINT_RC == 0 ]; then
155+ echo "pylint passed!"
156+fi
157+
158+TMPFILE=$(mktemp)
159+COVERAGE_FILE=$TMPFILE python3 -m pytest -p no:cacheprovider --cov=gitubuntu $SNAP/lib/python3.6/site-packages/gitubuntu/*
160+PYTEST_RC=$?
161+unlink $TMPFILE
162+
163+if [ $PYTEST_RC == 0 ]; then
164+ echo "pytest passed!"
165+fi
166+
167+[[ $PYLINT_RC == 0 && $PYTEST_RC == 0 ]]
168+

Subscribers

People subscribed via source and target branches