]>
Commit | Line | Data |
---|---|---|
35664152 JAK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" | |
5 | . "$TESTDIR/framework" | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture 'i386' | |
9 | confighashes 'SHA512' | |
10 | ||
11 | insertpackage 'unstable' 'foo' 'i386' '1.0' | |
12 | insertpackage 'testing' 'foo' 'any' '1.0' | |
13 | ||
14 | setupaptarchive --no-update | |
15 | APTARCHIVE="$(readlink -f ./aptarchive)" | |
16 | ||
17 | signreleasefiles 'Joe Sixpack' | |
18 | ||
19 | echo 'APT::Update::Post-Invoke-Success { "echo SUCCESS"; };' >> rootdir/etc/apt/apt.conf.d/display-success.conf | |
20 | echo 'APT::Update::Post-Invoke { "echo RUN"; };' >> rootdir/etc/apt/apt.conf.d/display-success.conf | |
21 | ||
22 | ||
23 | msgmsg "All sources OK => run Post-Invoke-Success and Post-Invoke" | |
24 | testsuccess aptget update | |
25 | cp rootdir/tmp/testsuccess.output aptupdate.output | |
26 | testsuccess grep "RUN" aptupdate.output | |
27 | testsuccess grep "SUCCESS" aptupdate.output | |
28 | ||
29 | msgmsg "Some sources broken => run Post-Invoke-Success and Post-Invoke" | |
30 | sed -i -e '/^ / d' -e '/^SHA512:/ d' "$APTARCHIVE/dists/unstable/Release" | |
31 | signreleasefiles | |
32 | testfailure aptget update | |
33 | cp rootdir/tmp/testfailure.output aptupdate.output | |
34 | testsuccess grep "RUN" aptupdate.output | |
35 | testsuccess grep "SUCCESS" aptupdate.output | |
36 | ||
37 | msgmsg "All sources broken => run Post-Invoke" | |
38 | sed -i -e '/^ / d' -e '/^SHA512:/ d' "$APTARCHIVE/dists/testing/Release" | |
39 | signreleasefiles | |
40 | testfailure aptget update | |
41 | cp rootdir/tmp/testfailure.output aptupdate.output | |
42 | testsuccess grep "RUN" aptupdate.output | |
43 | testfailure grep "SUCCESS" aptupdate.output |