4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64'
9 TESTFILE
="$TESTDIR/framework"
10 cp $TESTFILE aptarchive
/foo
11 APTARCHIVE
="$(readlink -f ./aptarchive)"
13 getcodenamefromsuite
() { echo "jessie"; }
14 buildsimplenativepackage
'foo' 'all' '1.0' 'stable'
15 setupaptarchive
--no-update
16 ln -s "${APTARCHIVE}/dists/stable" "${APTARCHIVE}/dists/jessie"
17 for FILE
in rootdir
/etc
/apt
/sources.list.d
/*-stable-* ; do
18 sed 's#stable#jessie#g' $FILE > $(echo "$FILE" | sed 's#stable#jessie#g')
21 # install a slowed down file: otherwise its to fast to reproduce combining
22 NEWMETHODS
="$(readlink -f rootdir)/usr/lib/apt/methods"
23 OLDMETHODS
="$(readlink -f rootdir/usr/lib/apt/methods)"
26 for METH
in $(find $OLDMETHODS ! -type d); do
27 ln -s $OLDMETHODS/$(basename $METH) $NEWMETHODS
30 cat >$NEWMETHODS/file <<EOF
34 if [ -z "\$line" ]; then
37 done | $OLDMETHODS/file
39 chmod +x
$NEWMETHODS/file
42 msgtest
"Downloading the same repository twice over $1" "$3"
43 testsuccess
--nomsg aptget update
-o Debug
::pkgAcquire
::Worker
=1
44 cp rootdir
/tmp
/testsuccess.output download.log
46 aptget files
--format '$(FILENAME)' --no-release-info | sort > file.lst
47 testequal
"$(find $(readlink -f ./rootdir/var/lib/apt/lists) -name '*_dists_*' \( ! -name '*InRelease' \) -type f | sort)" cat file.lst
48 testsuccess aptcache policy
54 500 $1:$2 jessie/main amd64 Packages
55 500 $1:$2 stable/main amd64 Packages" aptcache policy foo
56 testfailure aptcache show foo
/unstable
57 testsuccess aptcache show foo
/stable
58 testsuccess aptcache show foo
/jessie
61 tworepos
'file' "$APTARCHIVE" 'no partial'
62 testequal
'12' grep -c '200%20URI%20Start' .
/download.log
63 testequal
'12' grep -c '201%20URI%20Done' .
/download.log
64 testequal
'6' grep -c '^ @ Queue: Action combined' .
/download.log
65 tworepos
'file' "$APTARCHIVE" 'hit'
66 testequal
'6' grep -c '200%20URI%20Start' .
/download.log
67 testequal
'6' grep -c '201%20URI%20Done' .
/download.log
68 testequal
'0' grep -c '^ @ Queue: Action combined' .
/download.log
69 rm -rf rootdir
/var
/lib
/apt
/lists
73 tworepos
'http' '//localhost:8080' 'no partial'
74 testequal
'10' grep -c '200%20URI%20Start' .
/download.log
75 testequal
'10' grep -c '201%20URI%20Done' .
/download.log
76 testequal
'6' grep -c '^ @ Queue: Action combined' .
/download.log
77 tworepos
'http' '//localhost:8080' 'hit'
78 testequal
'2' grep -c '200%20URI%20Start' .
/download.log
79 testequal
'4' grep -c '201%20URI%20Done' .
/download.log
80 testequal
'0' grep -c '^ @ Queue: Action combined' .
/download.log
81 rm -rf rootdir
/var
/lib
/apt
/lists