Martin Pitt [2013-10-24 8:23 +0200]: > As a proposal I attach a debdiff which I just uploaded to Ubuntu. It > uses "python3 -m http.server" (which is the simplest, least intrusive, > and easiest server which I'm aware of) and compares the downloaded > file against the original one.
Improved debdiff attached which gives the http servers some time to start up. It succeeds now in our Jenkins, too. Thanks! Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
* debian/tests/httpfile: Use local http server (with python3 -m http.server)
instead of relying on network access, and verify the downloaded result.
diff -Nru aria2-1.18.0/debian/tests/control aria2-1.18.0/debian/tests/control
--- aria2-1.18.0/debian/tests/control 2013-09-22 14:58:28.000000000 +0200
+++ aria2-1.18.0/debian/tests/control 2013-10-24 08:11:14.000000000 +0200
@@ -1 +1,2 @@
Tests: httpfile
+Depends: @, python3
diff -Nru aria2-1.18.0/debian/tests/httpfile aria2-1.18.0/debian/tests/httpfile
--- aria2-1.18.0/debian/tests/httpfile 2013-09-22 14:58:28.000000000 +0200
+++ aria2-1.18.0/debian/tests/httpfile 2013-10-24 09:41:13.000000000 +0200
@@ -1 +1,16 @@
-aria2c -d /tmp http://www.debian.org
+#!/bin/sh
+set -e
+PORT=43248
+
+# start local http server
+cd /etc
+python3 -m http.server $PORT &
+HTTP_PID=$!
+trap "kill $HTTP_PID" EXIT TERM INT
+# let the http server settle down
+sleep 2
+
+aria2c -d $ADTTMP http://localhost:$PORT/passwd
+
+# verify that files are identical
+cmp /etc/passwd $ADTTMP/passwd
signature.asc
Description: Digital signature

