Merge lp:~dholbach/snapcraft/1496392 into lp:~snappy-dev/snapcraft/core

Proposed by Daniel Holbach on 2015-09-16
Status: Merged
Approved by: Leo Arias on 2015-09-17
Approved revision: 173
Merged at revision: 173
Proposed branch: lp:~dholbach/snapcraft/1496392
Merge into: lp:~snappy-dev/snapcraft/core
Diff against target: 181 lines (+65/-49)
5 files modified
debian/control (+5/-14)
debian/rules (+0/-6)
debian/tests/control (+10/-0)
integration-tests/runtests.sh (+48/-0)
runtests.sh (+2/-29)
To merge this branch: bzr merge lp:~dholbach/snapcraft/1496392
Reviewer Review Type Date Requested Status
Leo Arias 2015-09-17 Approve on 2015-09-17
Sergio Schvezov 2015-09-16 Approve on 2015-09-17
Review via email: mp+271319@code.launchpad.net

Commit Message

Add autopkgtest, reshuffle build-deps accordingly and run wrap-and-sort.

Description of the Change

One test fails, which also fails, when I run ./runtests.sh locally:

2015.com.canonical.snapcraft::snapcraft/normal/dependencies: fail

To test the autopkgtest, I ran in the branch:

Just once: adt-buildvm-ubuntu-cloud -v

Then:
 bzr bd -- -S
 adt-run --source ../snapcraft_0.2.dsc --- qemu adt-wily-amd64-cloud.img

To post a comment you must log in.
Sergio Schvezov (sergiusens) wrote :

thanks for this!

Are you sure on of the tests fail though? The test name has a 'fail' in it
2015.com.canonical.snapcraft::snapcraft/normal/dependencies-fail: pass

:-)

I approve, but am going to wait on elopio

review: Approve
Daniel Holbach (dholbach) wrote :
Download full text (8.9 KiB)

-------------[ Running job 11 / 21. Estimated time left: 0:00:03 ]--------------
-----------------------[ snapcraft/normal/dependencies ]------------------------
ID: 2015.com.canonical.snapcraft::snapcraft/normal/dependencies
Category: 2013.com.canonical.plainbox::uncategorised
... 8< -------------------------------------------------------------------------
+ cp -rT /home/daniel/dev/snappy/snapcraft/integration-tests/data/dependencies .
+ snapcraft-coverage stage
Starting new HTTPS connection (1): wiki.ubuntu.com
Pulling p1
Building p1
gcc -shared -fPIC -o libp1.so p1.c
mkdir -p /tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/lib /tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/include
cp -a libp1.so /tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/lib
cp -a p1.h /tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/include
make
make install DESTDIR=/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install
Staging p1
Pulling p2
Building p2
gcc -shared -fPIC -o libp2.so -I/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/include -I/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/usr/include -I/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/include/x86_64-linux-gnu -I/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/usr/include/x86_64-linux-gnu -L/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/lib -L/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/usr/lib -L/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/lib/x86_64-linux-gnu -L/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/usr/lib/x86_64-linux-gnu p2.c -lp1
mkdir -p /tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p2/install/lib /tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p2/install/include
cp -a libp2.so /tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p2/install/lib
cp -a p2.h /tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p2/install/include
make
make install DESTDIR=/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p2/install
Staging p2
Pulling p3
Building p3
gcc -o p3 -I/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/include -I/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/usr/include -I/tmp/cwd-ft5m88da.701b311da688faea814ceebc385627ea2374f25d396e8ef336fb1b171dd593d9/parts/p1/install/include/x86_64-linux-gnu -I/tmp/cwd-ft5m88da.701b311da688...

Read more...

lp:~dholbach/snapcraft/1496392 updated on 2015-09-17
170. By Daniel Holbach on 2015-09-17

merge from trunk

171. By Daniel Holbach on 2015-09-17

merged lp:~elopio/snapcraft/dep8 and resolved conflicts

Daniel Holbach (dholbach) wrote :

Running ./integration-tests/runtests.sh now assemble-meta fails: http://pastebin.ubuntu.com/12435785/

lp:~dholbach/snapcraft/1496392 updated on 2015-09-17
172. By Daniel Holbach on 2015-09-17

add build-essential to test-depends

173. By Daniel Holbach on 2015-09-17

merge trunk

Daniel Holbach (dholbach) wrote :

It works now!

Leo Arias (elopio) wrote :

indeed, it works!
Thanks Daniel.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2015-09-16 11:47:20 +0000
3+++ debian/control 2015-09-17 15:07:57 +0000
4@@ -6,43 +6,34 @@
5 cmake,
6 debhelper (>= 9),
7 dh-python,
8- git,
9- mercurial,
10- pep8,
11- plainbox,
12- pyflakes,
13 python3 (>= 3.4),
14 python3-apt,
15- python3-fixtures,
16 python3-jsonschema,
17- python3-mccabe,
18- python3-requests,
19 python3-setuptools,
20- python3-testscenarios,
21 python3-yaml,
22 ubuntu-snappy-cli,
23 wget,
24- xz-utils,
25+ xz-utils
26 Homepage: https://launchpad.net/snapcraft
27 Vcs-Bzr: lp:snapcraft
28 Standards-Version: 3.9.6
29
30 Package: snapcraft
31 Architecture: all
32-Depends: ${misc:Depends},
33- ${python3:Depends},
34- bzr,
35+Depends: bzr,
36 dpkg-dev,
37 git,
38+ mercurial,
39 python3-apt,
40 python3-jsonschema,
41 python3-requests,
42 python3-yaml,
43- mercurial,
44 sudo,
45 ubuntu-snappy-cli,
46 wget,
47 xz-utils,
48+ ${misc:Depends},
49+ ${python3:Depends}
50 Description: easily craft snaps
51 Snapcraft aims to make upstream developers' lives easier and as such is not
52 a single toolset, but instead is a collection of tools that enable the
53
54=== modified file 'debian/rules'
55--- debian/rules 2015-08-25 20:40:26 +0000
56+++ debian/rules 2015-09-17 15:07:57 +0000
57@@ -3,9 +3,3 @@
58
59 %:
60 dh $@ --with python3 --buildsystem=pybuild
61-
62-override_dh_auto_test:
63-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
64- python3 setup.py test
65-endif
66-
67
68=== added directory 'debian/tests'
69=== added file 'debian/tests/control'
70--- debian/tests/control 1970-01-01 00:00:00 +0000
71+++ debian/tests/control 2015-09-17 15:07:57 +0000
72@@ -0,0 +1,10 @@
73+Test-Command: ./runtests.sh
74+Restrictions: allow-stderr, isolation-container
75+Depends: @,
76+ build-essential,
77+ pep8,
78+ plainbox,
79+ pyflakes,
80+ python3-fixtures,
81+ python3-mccabe,
82+ python3-testscenarios
83
84=== added file 'integration-tests/runtests.sh'
85--- integration-tests/runtests.sh 1970-01-01 00:00:00 +0000
86+++ integration-tests/runtests.sh 2015-09-17 15:07:57 +0000
87@@ -0,0 +1,48 @@
88+#!/bin/bash
89+# -*- Mode:sh; indent-tabs-mode:nil; tab-width:4 -*-
90+#
91+# Copyright (C) 2015 Canonical Ltd
92+#
93+# This program is free software: you can redistribute it and/or modify
94+# it under the terms of the GNU General Public License version 3 as
95+# published by the Free Software Foundation.
96+#
97+# This program is distributed in the hope that it will be useful,
98+# but WITHOUT ANY WARRANTY; without even the implied warranty of
99+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
100+# GNU General Public License for more details.
101+#
102+# You should have received a copy of the GNU General Public License
103+# along with this program. If not, see <http://www.gnu.org/licenses/>.
104+
105+set -e
106+
107+if [ -z "$SNAPCRAFT" ]; then
108+ export SNAPCRAFT=snapcraft
109+fi
110+
111+# Create a temporary directory so that we can run 'manage.py develop' and
112+# create the .provider file there
113+temp_dir=$(mktemp -d)
114+# Develop the provider, this will let us run tests on it
115+./manage.py develop -d $temp_dir
116+# Set PROVIDERPATH (see plainbox(1)) so that we can see the provider
117+# without installing it.
118+export PROVIDERPATH=$PROVIDERPATH:$temp_dir
119+# Run the 'normal' test plan
120+plainbox run \
121+ -T 2015.com.canonical.snapcraft::normal \
122+ -f json -o $temp_dir/result.json
123+# Analyze the result and fail if there are any failures
124+python3 - << __PYTHON__
125+import json
126+with open("$temp_dir/result.json", "rt", encoding="utf-8") as stream:
127+ results = json.load(stream)
128+failed = False
129+for test_id, result in sorted(results['result_map'].items()):
130+ print('{0}: {1}'.format(test_id, result['outcome']))
131+ if result['outcome'] != 'pass':
132+ failed = True
133+print("Overall: {0}".format("fail" if failed else "pass"))
134+raise SystemExit(failed)
135+__PYTHON__
136
137=== modified file 'runtests.sh'
138--- runtests.sh 2015-09-15 14:45:57 +0000
139+++ runtests.sh 2015-09-17 15:07:57 +0000
140@@ -69,39 +69,12 @@
141 python3-coverage erase
142 export PROJECT_PATH=$(pwd)
143 export SNAPCRAFT=snapcraft-coverage
144- else
145- export SNAPCRAFT=snapcraft
146 fi
147
148 # Go to the plainbox provider of snapcraft tests
149- cd integration-tests/
150- # Create a temporary directory so that we can run 'manage.py develop' and
151- # create the .provider file there
152- temp_dir=$(mktemp -d)
153- # Develop the provider, this will let us run tests on it
154- ./manage.py develop -d $temp_dir
155- # Set PROVIDERPATH (see plainbox(1)) so that we can see the provider
156- # without installing it.
157- export PROVIDERPATH=$PROVIDERPATH:$temp_dir
158- # Run the 'normal' test plan
159- plainbox run \
160- -T 2015.com.canonical.snapcraft::normal \
161- -f json -o $temp_dir/result.json
162- # Analyze the result and fail if there are any failures
163- python3 - << __PYTHON__
164-import json
165-with open("$temp_dir/result.json", "rt", encoding="utf-8") as stream:
166- results = json.load(stream)
167-failed = False
168-for test_id, result in sorted(results['result_map'].items()):
169- print('{0}: {1}'.format(test_id, result['outcome']))
170- if result['outcome'] != 'pass':
171- failed = True
172-print("Overall: {0}".format("fail" if failed else "pass"))
173-raise SystemExit(failed)
174-__PYTHON__
175+ cd integration-tests
176+ ./runtests.sh
177 )
178-
179 fi
180
181 if which python3-coverage >/dev/null 2>&1; then

Subscribers

People subscribed via source and target branches