From a88e7bbd4c9fda64ecd018a298684be2f625dc81 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 6 Nov 2016 20:43:41 +0000 Subject: [PATCH] Test suite: Provide reprepro test (for aptget method) Signed-off-by: Ian Jackson --- debian/tests/control | 4 +++ tests/lib-reprepro | 69 ++++++++++++++++++++++++++++++++++++++ tests/tests/clone-reprepro | 17 ++++++++++ 3 files changed, 90 insertions(+) create mode 100644 tests/lib-reprepro create mode 100755 tests/tests/clone-reprepro diff --git a/debian/tests/control b/debian/tests/control index 6a6d92a6..0aaabedb 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -2,6 +2,10 @@ Tests: build-modes-gbp Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, make, git-buildpackage +Tests: clone-reprepro +Tests-Directory: tests/tests +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, make, reprepro + Tests: dsd-clone-drs Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, make diff --git a/tests/lib-reprepro b/tests/lib-reprepro new file mode 100644 index 00000000..87020444 --- /dev/null +++ b/tests/lib-reprepro @@ -0,0 +1,69 @@ +# -*- bash -*- + +t-reprepro () { + + t_archive_method=reprepro + + t-git-config dgit-distro.test-dummy.archive-query aptget: + t-git-config dgit-distro.test-dummy.mirror file://$tmp/mirror/ + + mkdir $tmp/etc-apt + cat >$tmp/etc-apt/conf <han.pgp + fakeroot apt-key add $rrc/distributions + + local arch=`dpkg --print-architecture` + + for suitespec in $suitespecs; do + local suite=${suitespec%%:*} + local sname=${suitespec#*:} + + mkdir $tmp/mirror/dists + rm -f $tmp/mirror/dists/$sname + ln -s $suite $tmp/mirror/dists/$sname + + cat >&3 <