chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test suite: manpages-format: New test
[dgit.git]
/
tests
/
lib-reprepro
diff --git
a/tests/lib-reprepro
b/tests/lib-reprepro
index d025d48dd40747738dc497b0cf3733f43b78ee21..0a688f655728219330cdba551d3fd78226cf5364 100644
(file)
--- a/
tests/lib-reprepro
+++ b/
tests/lib-reprepro
@@
-4,48
+4,63
@@
t-reprepro () {
t_archive_method=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/
+ t-reprepro-cfg
+}
+
+t-reprepro-cfg () {
+ local rrinst=$1
+ local rrdistro=${2:-test-dummy}
+
+ local etcapt=$tmp/${rrinst}etc-apt
+ local mir=$tmp/${rrinst}mirror
- mkdir $tmp/etc-apt
- cat >$tmp/etc-apt/conf <<END
-Dir::Etc "$tmp/etc-apt";
+ t-git-config dgit-distro.$rrdistro.archive-query aptget:
+ t-git-config dgit-distro.$rrdistro.mirror file://$mir/
+
+ mkdir $etcapt
+ cat >$etcapt/conf <<END
+Dir::Etc "$etcapt";
END
END
- export APT_CONFIG=$
tmp/etc-
apt/conf
+ export APT_CONFIG=$
etc
apt/conf
gpg --export Hannibal >han.pgp
fakeroot apt-key add <han.pgp
gpg --export Hannibal >han.pgp
fakeroot apt-key add <han.pgp
- mkdir $
tmp/etc-
apt/apt.conf.d
+ mkdir $
etc
apt/apt.conf.d
}
}
-t-archive-none-reprepro () {
+t-archive-none-reprepro () {
# hook called by t-archive-none
t-reprepro-setup
t-reprepro-regen
t-reprepro-setup
t-reprepro-regen
+ local rrinst=
}
}
-t-archive-query-reprepro () {
+t-archive-query-reprepro () {
# hook called by t-archive-query
local suite=$1
local p=$2
local v=$3
local dscf=$4
local suite=$1
local p=$2
local v=$3
local dscf=$4
- t-run-reprepro includedsc $suite $tmp/mirror/pool/$dscf
+ local rrinst=
+ t-reprepro-includedsc $suite $tmp/mirror/pool/$dscf "$rrinst"
}
t-reprepro-setup () {
}
t-reprepro-setup () {
- local rrc=$tmp/mirror/conf
+ local rrinst=$1
+
+ local mir=$tmp/${rrinst}mirror
+ local rrc=$mir/conf
mkdir -p $rrc
mkdir -p $rrc
- mkdir -p $
tmp/mirro
r/pool/main
+ mkdir -p $
mi
r/pool/main
exec 3>$rrc/distributions
exec 3>$rrc/distributions
- local arch=`dpkg --print-architecture`
+ local arch
; arch
=`dpkg --print-architecture`
for suitespec in $suitespecs; do
local suite=${suitespec%%:*}
local sname=${suitespec#*:}
for suitespec in $suitespecs; do
local suite=${suitespec%%:*}
local sname=${suitespec#*:}
- mkdir -p $
tmp/mirro
r/dists
+ mkdir -p $
mi
r/dists
if [ $sname != $suite ]; then
if [ $sname != $suite ]; then
- rm -f $
tmp/mirro
r/dists/$sname
- ln -s $suite $
tmp/mirro
r/dists/$sname
+ rm -f $
mi
r/dists/$sname
+ ln -s $suite $
mi
r/dists/$sname
fi
cat >&3 <<END
fi
cat >&3 <<END
@@
-59,13
+74,24
@@
END
done
}
done
}
-t-run-reprepro () {
+t-reprepro-includedsc () {
+ local suite=$1
+ local dscf=$2
+ local rrinst=$3
+ t-reprepro--run includedsc $suite $dscf
+}
+
+t-reprepro--run () {
+ # caller is supposed to have set rrinst
+ local mir=$tmp/${rrinst}mirror
reprepro \
reprepro \
- --outdir $
tmp/mirro
r \
- --basedir $
tmp/mirro
r \
+ --outdir $
mi
r \
+ --basedir $
mi
r \
"$@"
}
t-reprepro-regen () {
"$@"
}
t-reprepro-regen () {
- t-run-reprepro export
+ local rrinst=$1
+
+ t-reprepro--run export
}
}