Merge ~paelzer/ubuntu/+source/spice:eoan-14.2-fix-autopkgtest into ubuntu/+source/spice:ubuntu/eoan-devel

Proposed by Christian Ehrhardt 
Status: Superseded
Proposed branch: ~paelzer/ubuntu/+source/spice:eoan-14.2-fix-autopkgtest
Merge into: ubuntu/+source/spice:ubuntu/eoan-devel
Diff against target: 163 lines (+54/-17)
9 files modified
AUTHORS (+1/-0)
debian/changelog (+14/-0)
debian/source/include-binaries (+1/-0)
debian/tests/automated-tests (+9/-6)
debian/tests/control (+2/-1)
debian/tests/regression-test.py (+25/-0)
server/tests/Makefile.am (+0/-1)
server/tests/Makefile.in (+1/-8)
server/tests/test-qxl-parsing.c (+1/-1)
Reviewer Review Type Date Requested Status
Canonical Server Pending
Canonical Server packageset reviewers Pending
git-ubuntu developers Pending
Review via email: mp+369297@code.launchpad.net
To post a comment you must log in.

Unmerged commits

2b00a30... by Christian Ehrhardt 

changelog: allow binary base_test.ppm in package

Signed-off-by: Christian Ehrhardt <email address hidden>

76962b2... by Christian Ehrhardt 

- d/source/include-binaries: allow binary base_test.ppm in package

Signed-off-by: Christian Ehrhardt <email address hidden>

7fb94a6... by Christian Ehrhardt 

changelog: provide test resources from upstream git not part of the released tarball anymore

Signed-off-by: Christian Ehrhardt <email address hidden>

f7ec9df... by Christian Ehrhardt 

- d/p/add-regression-test.patch: add file dropped in release tarball but needed for autopkgtests

Signed-off-by: Christian Ehrhardt <email address hidden>

0820e09... by Christian Ehrhardt 

changelog: install new test dependency python-pil

Signed-off-by: Christian Ehrhardt <email address hidden>

f5d2365... by Christian Ehrhardt 

- d/t/control: install new test dependency python-pil

Signed-off-by: Christian Ehrhardt <email address hidden>

92d14b9... by Christian Ehrhardt 

changelog: make tests more debuggable by allowing stderr

Signed-off-by: Christian Ehrhardt <email address hidden>

00635f6... by Christian Ehrhardt 

- d/t/automated-tests, d/t/control: make tests more debuggable by allowing stderr

Signed-off-by: Christian Ehrhardt <email address hidden>

6d1d0d2... by Christian Ehrhardt 

changelog: fixups for spice autopkgtests in version 0.14.2

Signed-off-by: Christian Ehrhardt <email address hidden>

33461ea... by Christian Ehrhardt 

autopkgtest: option --enable-automated-tests now is always on

Signed-off-by: Christian Ehrhardt <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/AUTHORS b/AUTHORS
2index 43bdf2a..2fd6264 100644
3--- a/AUTHORS
4+++ b/AUTHORS
5@@ -70,5 +70,6 @@ Patches also contributed by
6 谢 昆明 <kunming.xie@hotmail.com>
7 Benjamin Tissoires <benjamin.tissoires@redhat.com>
8 Olivier Fourdan <ofourdan@redhat.com>
9+ Christian Ehrhardt <christian.ehrhardt@canonical.com>
10
11 ....send patches to get your name here...
12diff --git a/debian/changelog b/debian/changelog
13index 501b304..94fe52c 100644
14--- a/debian/changelog
15+++ b/debian/changelog
16@@ -1,3 +1,17 @@
17+spice (0.14.2-0ubuntu2) eoan; urgency=medium
18+
19+ * Fixup autpkgtest
20+ - d/t/automated-tests: spice-common moved into dir subprojects
21+ - d/t/automated-tests: option --enable-automated-tests now is always on"
22+ - d/t/automated-tests, d/t/control: make tests more debuggable by allowing
23+ stderr
24+ - d/t/control: install new test dependency python-pil
25+ - d/t/base_test.ppm, d/t/regression-test.py: provide test resources from
26+ upstream git not part of the released tarball anymore
27+ - d/source/include-binaries: allow binary base_test.ppm in package
28+
29+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 25 Jun 2019 12:59:01 +0200
30+
31 spice (0.14.2-0ubuntu1) eoan; urgency=medium
32
33 * New upstream release
34diff --git a/debian/source/include-binaries b/debian/source/include-binaries
35new file mode 100644
36index 0000000..82c1427
37--- /dev/null
38+++ b/debian/source/include-binaries
39@@ -0,0 +1 @@
40+debian/tests/base_test.ppm
41diff --git a/debian/tests/automated-tests b/debian/tests/automated-tests
42index 865e602..8495b4d 100644
43--- a/debian/tests/automated-tests
44+++ b/debian/tests/automated-tests
45@@ -1,13 +1,16 @@
46 #! /bin/sh
47
48-set -e
49+set -ex
50
51-dh_auto_configure -- --enable-automated-tests \
52+dh_auto_configure -- \
53 --disable-celt051 \
54 --disable-silent-rules \
55 --enable-smartcard
56-make -C spice-common/common libspice-common.la libspice-common-server.la 2>/dev/null
57-make -C server libspice-server.la 2>/dev/null
58-make -C server/tests all 2>/dev/null
59-./server/tests/test-display-streaming --automated-tests
60+make -C subprojects/spice-common/common libspice-common.la libspice-common-server.la
61+make -C server libspice-server.la
62+make -C server/tests all
63+cp -av debian/tests/regression-test.py server/tests
64+cp -av debian/tests/base_test.ppm server/tests
65+cd server/tests
66+./test-display-streaming --automated-tests
67
68diff --git a/debian/tests/base_test.ppm b/debian/tests/base_test.ppm
69new file mode 100644
70index 0000000..b28a64d
71Binary files /dev/null and b/debian/tests/base_test.ppm differ
72diff --git a/debian/tests/control b/debian/tests/control
73index c5fff56..9c1100c 100644
74--- a/debian/tests/control
75+++ b/debian/tests/control
76@@ -1,2 +1,3 @@
77 Tests: automated-tests
78-Depends: @, @builddeps@, spice-client-gtk
79+Depends: @, @builddeps@, spice-client-gtk, python-pil
80+Restrictions: allow-stderr
81diff --git a/debian/tests/regression-test.py b/debian/tests/regression-test.py
82new file mode 100755
83index 0000000..81eaecf
84--- /dev/null
85+++ b/debian/tests/regression-test.py
86@@ -0,0 +1,25 @@
87+#!/usr/bin/python
88+from subprocess import PIPE, Popen
89+from PIL import Image
90+from PIL import ImageChops
91+
92+
93+def spicy_screenshot():
94+ cmd = "spicy-screenshot -h localhost -p 5912 -o output.ppm"
95+ p = Popen(cmd, shell=True)
96+ p.wait()
97+
98+def verify():
99+ base = Image.open("base_test.ppm")
100+ output = Image.open("output.ppm")
101+ return ImageChops.difference(base, output).getbbox()
102+
103+if __name__ == "__main__":
104+ spicy_screenshot()
105+ diff = verify()
106+
107+ if diff is None:
108+ print("\033[1;32mSUCCESS: No regressions were found!\033[1;m")
109+ else:
110+ print("\033[1;31mFAIL: Regressions were found!\n\033[1;m"
111+ "\033[1;31m Please, take a look in your code and go fix it!\033[1;m")
112diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
113index d7f7af9..0eb41fa 100644
114--- a/server/tests/Makefile.am
115+++ b/server/tests/Makefile.am
116@@ -62,7 +62,6 @@ check_PROGRAMS = \
117 test-empty-success \
118 test-channel \
119 test-stream-device \
120- test-listen \
121 test-record \
122 $(NULL)
123
124diff --git a/server/tests/Makefile.in b/server/tests/Makefile.in
125index 4706359..2ab9b93 100644
126--- a/server/tests/Makefile.in
127+++ b/server/tests/Makefile.in
128@@ -96,7 +96,7 @@ check_PROGRAMS = test-codecs-parsing$(EXEEXT) test-options$(EXEEXT) \
129 test-leaks$(EXEEXT) test-vdagent$(EXEEXT) \
130 test-fail-on-null-core-interface$(EXEEXT) \
131 test-empty-success$(EXEEXT) test-channel$(EXEEXT) \
132- test-stream-device$(EXEEXT) test-listen$(EXEEXT) \
133+ test-stream-device$(EXEEXT) \
134 test-record$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2)
135 noinst_PROGRAMS = test-display-no-ssl$(EXEEXT) \
136 test-display-streaming$(EXEEXT) test-playback$(EXEEXT) \
137@@ -1573,13 +1573,6 @@ test-stream-device.log: test-stream-device$(EXEEXT)
138 --log-file $$b.log --trs-file $$b.trs \
139 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
140 "$$tst" $(AM_TESTS_FD_REDIRECT)
141-test-listen.log: test-listen$(EXEEXT)
142- @p='test-listen$(EXEEXT)'; \
143- b='test-listen'; \
144- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
145- --log-file $$b.log --trs-file $$b.trs \
146- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
147- "$$tst" $(AM_TESTS_FD_REDIRECT)
148 test-record.log: test-record$(EXEEXT)
149 @p='test-record$(EXEEXT)'; \
150 b='test-record'; \
151diff --git a/server/tests/test-qxl-parsing.c b/server/tests/test-qxl-parsing.c
152index edccfee..52949de 100644
153--- a/server/tests/test-qxl-parsing.c
154+++ b/server/tests/test-qxl-parsing.c
155@@ -98,7 +98,7 @@ static void test_memslot_invalid_slot_id(void)
156 RedMemSlotInfo mem_info;
157 init_meminfo(&mem_info);
158
159- memslot_get_virt(&mem_info, 1 << mem_info.memslot_id_shift, 16, 0);
160+ memslot_get_virt(&mem_info, UINT64_C(1) << mem_info.memslot_id_shift, 16, 0);
161 }
162
163 static void test_memslot_invalid_addresses(void)

Subscribers

People subscribed via source and target branches