Package: src:albatross
Version: 1.36-5.3
Severity: serious
Tags: patch
Justification: Policy 4.6

Should the tests fail, one is left with a running test server, which
causes the next build to fail:
| # run the session server
| PYTHONPATH=`pwd` session-server/al-session-daemon -k $MY_DIR/sess.pid -l 
$MY_DIR/log start
| /tmp/buildd/albatross-1.36/albatross/context.py:20: DeprecationWarning: the 
sha module is deprecated; use the hashlib module instead
|   import hmac, sha
| Traceback (most recent call last):
|   File "session-server/al-session-daemon", line 134, in start
|     self.server = simpleserver.Server(self.port, self.debugfile)
|   File "/tmp/buildd/albatross-1.36/albatross/simpleserver.py", line 342, in 
__init__
|     self.listen_sock.bind(('', port))
|   File "<string>", line 1, in bind
| error: [Errno 98] Address already in use
| make: *** [test-build-stamp] Error 1
| dpkg-buildpackage: error: debian/rules build gave error exit status 2

Patch attached.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 465 6908 C: +27 72 419 8559  UCT: x3127
diff -u albatross-1.36/debian/rules albatross-1.36/debian/rules
--- albatross-1.36/debian/rules
+++ albatross-1.36/debian/rules
@@ -24,12 +24,15 @@
 test-build: test-build-stamp
 test-build-stamp:
 	dh_testdir
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 	# run the session server
 	PYTHONPATH=`pwd` session-server/al-session-daemon -k $$MY_DIR/sess.pid -l $$MY_DIR/log start
-	# run the tests
-	make -C test all
-	# stop the session server
-	PYTHONPATH=`pwd` session-server/al-session-daemon -k $$MY_DIR/sess.pid -l $$MY_DIR/log stop
+	# run the tests, stop the session server
+	make -C test all; \
+		result=$$?; \
+		PYTHONPATH=`pwd` session-server/al-session-daemon -k $$MY_DIR/sess.pid -l $$MY_DIR/log stop; \
+		exit $$result
+endif
 	touch $@
 
 # Targets for building different parts of the package

Attachment: signature.asc
Description: Digital signature

Reply via email to