Patchwork [5,of,6] test-debian-packages: new test for testing construction of debian packages

login
register
mail settings
Submitter Augie Fackler
Date Aug. 27, 2015, 11:26 p.m.
Message ID <88da93c7840e6e65baca.1440718017@imladris.local>
Download mbox | patch
Permalink /patch/10309/
State Superseded
Commit a02c22e4814222e025db86a2cdc1225fa8227989
Headers show

Comments

Augie Fackler - Aug. 27, 2015, 11:26 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1440475709 14400
#      Tue Aug 25 00:08:29 2015 -0400
# Node ID 88da93c7840e6e65baca9941cba6d1190e66814f
# Parent  b484b73deeb3085dbe6a91449602e4d98710c576
test-debian-packages: new test for testing construction of debian packages

This test takes over a minute to run to completion on my workstation,
and far longer if the docker images have to be built for the first
time on a given host. As such, the entire test is tagged as slow.

The test does *not* require dpkg - it merely requires one of docker or
dpkg be available to usefully test. On a (say) fedora machine with
docker installed, it'l still test creating debian packages using
docker.
timeless - Aug. 30, 2015, 4:28 a.m.
"It'll" is misspelled in the commit message
On Aug 27, 2015 7:31 PM, "Augie Fackler" <raf@durin42.com> wrote:

> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1440475709 14400
> #      Tue Aug 25 00:08:29 2015 -0400
> # Node ID 88da93c7840e6e65baca9941cba6d1190e66814f
> # Parent  b484b73deeb3085dbe6a91449602e4d98710c576
> test-debian-packages: new test for testing construction of debian packages
>
> This test takes over a minute to run to completion on my workstation,
> and far longer if the docker images have to be built for the first
> time on a given host. As such, the entire test is tagged as slow.
>
> The test does *not* require dpkg - it merely requires one of docker or
> dpkg be available to usefully test. On a (say) fedora machine with
> docker installed, it'l still test creating debian packages using
> docker.
>
> diff --git a/tests/test-debian-packages.t b/tests/test-debian-packages.t
> new file mode 100644
> --- /dev/null
> +++ b/tests/test-debian-packages.t
> @@ -0,0 +1,34 @@
> +#require test-repo slow
> +
> +We check debian package contents with portable tools so that when
> +we're on non-debian machines we can still test the packages that are
> +built using docker.
> +  $ checkdeb() {
> +  >   ls *.deb
> +  >   ar x mercurial*.deb
> +  >   tar tf data.tar* | grep localrepo | sort
> +  > }
> +  $ OUTPUTDIR=`pwd`
> +  $ export OUTPUTDIR
> +
> +#if docker
> +  $ cd "$TESTDIR"/..
> +  $ make docker-debian-jessie > $OUTPUTDIR/build.log 2>&1
> +  $ cd $OUTPUTDIR
> +  $ checkdeb
> +  mercurial-*.deb (glob)
> +  ./usr/lib/python2.7/site-packages/mercurial/localrepo.py
> +  ./usr/lib/python2.7/site-packages/mercurial/localrepo.pyc
> +  $ rm -f *.deb build.log
> +#endif
> +
> +#if debhelper
> +  $ cd "$TESTDIR"/..
> +  $ make debian-jessie > $OUTPUTDIR/build.log 2>&1
> +  $ cd $OUTPUTDIR
> +  $ checkdeb
> +  mercurial-*.deb (glob)
> +  ./usr/lib/python2.7/site-packages/mercurial/localrepo.py
> +  ./usr/lib/python2.7/site-packages/mercurial/localrepo.pyc
> +  $ rm -f *.deb build.log
> +#endif
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/tests/test-debian-packages.t b/tests/test-debian-packages.t
new file mode 100644
--- /dev/null
+++ b/tests/test-debian-packages.t
@@ -0,0 +1,34 @@ 
+#require test-repo slow
+
+We check debian package contents with portable tools so that when
+we're on non-debian machines we can still test the packages that are
+built using docker.
+  $ checkdeb() {
+  >   ls *.deb
+  >   ar x mercurial*.deb
+  >   tar tf data.tar* | grep localrepo | sort
+  > }
+  $ OUTPUTDIR=`pwd`
+  $ export OUTPUTDIR
+
+#if docker
+  $ cd "$TESTDIR"/..
+  $ make docker-debian-jessie > $OUTPUTDIR/build.log 2>&1
+  $ cd $OUTPUTDIR
+  $ checkdeb
+  mercurial-*.deb (glob)
+  ./usr/lib/python2.7/site-packages/mercurial/localrepo.py
+  ./usr/lib/python2.7/site-packages/mercurial/localrepo.pyc
+  $ rm -f *.deb build.log
+#endif
+
+#if debhelper
+  $ cd "$TESTDIR"/..
+  $ make debian-jessie > $OUTPUTDIR/build.log 2>&1
+  $ cd $OUTPUTDIR
+  $ checkdeb
+  mercurial-*.deb (glob)
+  ./usr/lib/python2.7/site-packages/mercurial/localrepo.py
+  ./usr/lib/python2.7/site-packages/mercurial/localrepo.pyc
+  $ rm -f *.deb build.log
+#endif