]>
Commit | Line | Data |
---|---|---|
42d41ddb DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
10 | buildsimplenativepackage 'apt' 'all' '1.0' 'stable' | |
11 | buildsimplenativepackage 'apt' 'all' '2.0' 'unstable' | |
12 | ||
13 | setupaptarchive | |
14 | ||
15 | testdownload() { | |
2aa7df1d DK |
16 | local APT="$2" |
17 | if [ -n "$3" ]; then | |
18 | APT="${APT}/${3}" | |
42d41ddb | 19 | fi |
2aa7df1d DK |
20 | msgtest "Test download of package file $1 with" "$APT" |
21 | aptget -qq download ${APT} && test -f $1 && msgpass || msgfail | |
42d41ddb DK |
22 | } |
23 | ||
24 | testdownload apt_1.0_all.deb apt stable | |
25 | testdownload apt_2.0_all.deb apt | |
26 | ||
27 | DEBFILE="$(readlink -f aptarchive)/pool/apt_2.0_all.deb" | |
28 | testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) sha256:$(sha256sum $DEBFILE | cut -d' ' -f 1)" aptget download apt --print-uris |