From 05429577db36fa4e71743f3695e03e2d19bf509e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Jan 2017 15:52:51 +0000 Subject: [PATCH] test suite: Refactor lib-reprepro * Break out t-reprepro-cfg. * Introduce the variables `mir' and `etcapt' to many functions. No functional change. Signed-off-by: Ian Jackson --- tests/lib-reprepro | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/tests/lib-reprepro b/tests/lib-reprepro index af331432..88102c89 100644 --- a/tests/lib-reprepro +++ b/tests/lib-reprepro @@ -4,17 +4,24 @@ t-reprepro () { t_archive_method=reprepro + t-reprepro-cfg +} + +t-reprepro-cfg () { + local etcapt=$tmp/etc-apt + local mir=$tmp/mirror + t-git-config dgit-distro.test-dummy.archive-query aptget: - t-git-config dgit-distro.test-dummy.mirror file://$tmp/mirror/ + t-git-config dgit-distro.test-dummy.mirror file://$mir/ - mkdir $tmp/etc-apt - cat >$tmp/etc-apt/conf <$etcapt/conf <han.pgp fakeroot apt-key add $rrc/distributions @@ -42,10 +50,10 @@ t-reprepro-setup () { local suite=${suitespec%%:*} local sname=${suitespec#*:} - mkdir -p $tmp/mirror/dists + mkdir -p $mir/dists if [ $sname != $suite ]; then - rm -f $tmp/mirror/dists/$sname - ln -s $suite $tmp/mirror/dists/$sname + rm -f $mir/dists/$sname + ln -s $suite $mir/dists/$sname fi cat >&3 <