[Piuparts-devel] [Git][debian/piuparts][master] 7 commits: autopkgtest: replace broken stubs with actual tests
    Holger Levsen 
    gitlab at salsa.debian.org
       
    Tue Jan 14 12:58:43 GMT 2020
    
    
  
Holger Levsen pushed to branch master at Debian / piuparts
Commits:
0066fa12 by Nis Martensen at 2020-01-12T13:44:27+01:00
autopkgtest: replace broken stubs with actual tests
Piuparts does not have `--list` (without further arguments) or `--info`
options, hence running the autopkgtest currently fails. Replace the two
broken stubs by two working tests:
 1. run `piuparts --version`
 2. create a minimal dummy binary package and run piuparts on it
Using a single-letter package name for the dummy package ensures that
there is no package with the same name in the archive -- according to
policy 5.6.1, all official package names must be at least two characters
long.
- - - - -
75bf1f7c by Nis Martensen at 2020-01-12T14:41:51+01:00
Makefile: delete __pycache__ dirs in make clean
Move __pycache__ directory removal from debian/rules to the `clean`
Makefile target. The change should have no effect on the generated
packages; it just makes `make clean` more complete and debian/rules
simpler.
Instead of using a shell loop for passing the files to `rm`, also use
find's `-delete` option, avoiding any potential issues with weird
filenames.
Since the __pycache__ folders may contain .pyc files, make sure these
are all deleted before.
- - - - -
1b6e1b7c by Nis Martensen at 2020-01-12T14:47:17+01:00
piupartslib/dwke: do not error out on non-utf8 logfiles
Should fix:
Traceback (most recent call last):
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1911, in <module>
    main()
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1851, in main
    section.generate_output(output_directory, section_names, problem_list, web_host)
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1660, in generate_output
    self.generate_html()
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1587, in generate_html
    failures = dwke_get_failures(self._binary_db, self._problem_list)
  File "/srv/piuparts.debian.org/share/piuparts/piuparts-report", line 1761, in dwke_get_failures
    add_cnt = make_kprs(logdict, kprdict, problem_list)
  File "/srv/piuparts.debian.org/lib/python3/dist-packages/piupartslib/dwke.py", line 252, in make_kprs
    logbody = lb.read()
  File "/usr/lib/python3.7/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 26184: invalid continuation byte
- - - - -
b5353e85 by Holger Levsen at 2020-01-14T13:47:14+01:00
Merge branch 'mr-origin-25' into develop
- - - - -
27897574 by Holger Levsen at 2020-01-14T13:47:51+01:00
Merge branch 'mr-origin-26' into develop
- - - - -
81449510 by Holger Levsen at 2020-01-14T13:49:20+01:00
release as 1.1.1
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
b07a7383 by Holger Levsen at 2020-01-14T13:58:16+01:00
Merge branch 'develop'
- - - - -
5 changed files:
- Makefile
- debian/changelog
- debian/rules
- debian/tests/smoke-test
- piupartslib/dwke.py
Changes:
=====================================
Makefile
=====================================
@@ -208,7 +208,8 @@ clean:
 	rm -f build-master-stamp
 	rm -fr $(DOCS_GENERATED)
 	rm -fr .doctrees/
-	rm -f *.pyc piupartslib/*.pyc master-bin/*.pyc slave-bin/*.pyc tests/*.pyc
+	find . -iname '*.pyc' -type f -delete
+	find . -iname __pycache__ -type d -delete
 	rm -f $(SCRIPTS_GENERATED)
 	$(RM) helpers/debiman-piuparts-distill/debiman-piuparts-distill
 	$(MAKE) -C instances clean
=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+piuparts (1.1.1) unstable; urgency=medium
+
+  * Team upload to unstuck python-debianbts migration.
+
+  [ Nis Martensen ]
+  * autopkgtest: replace broken stubs with actual tests.
+  * Makefile: delete __pycache__ dirs in make clean.
+  * piupartslib/dwke: do not error out on non-utf8 logfiles.
+
+ -- Holger Levsen <holger at debian.org>  Tue, 14 Jan 2020 13:48:49 +0100
+
 piuparts (1.1.0) unstable; urgency=medium
 
   * Team upload.
=====================================
debian/rules
=====================================
@@ -12,7 +12,6 @@ override_dh_auto_build:
 	$(MAKE) prefix=/usr build build-doc
 
 override_dh_auto_install:
-	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
 	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp prefix=/usr etcdir=/etc install install-doc install-conf
 
 override_dh_python3:
=====================================
debian/tests/smoke-test
=====================================
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 echo running $0
 
 test_this() {
@@ -8,5 +10,24 @@ test_this() {
 	$@
 }
 
-test_this piuparts --info
-test_this piuparts --list
+test_this piuparts --version
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+
+mkdir -p t/DEBIAN t/usr t/etc
+cat >t/DEBIAN/control <<EOF
+Package: t
+Version: 4
+Maintainer: Piu Parts <piuparts-devel at alioth-lists.debian.net>
+Priority: optional
+Architecture: all
+Installed-Size: 0
+Description: Auto Package Test Dummy
+ Extremely simple binary package for piuparts testing
+EOF
+
+dpkg-deb -b t
+
+test_this piuparts t.deb
=====================================
piupartslib/dwke.py
=====================================
@@ -248,7 +248,7 @@ def make_kprs(logdict, kprdict, problem_list):
         logpath = logdict[pkg_spec]
 
         try:
-            with open(logpath, 'r') as lb:
+            with open(logpath, 'r', errors='backslashreplace') as lb:
                 logbody = lb.read()
 
             where = get_where(logpath)
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/308745d53874bdcb5ce015912899478533e2c2d2...b07a73830b7ef13ba02c2300566f53205da112d1
-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/308745d53874bdcb5ce015912899478533e2c2d2...b07a73830b7ef13ba02c2300566f53205da112d1
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20200114/a795a257/attachment-0001.html>
    
    
More information about the Piuparts-devel
mailing list