]>
git.saurik.com Git - apt.git/blob - test/integration/test-apt-update-hooks
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture 'i386'
11 insertpackage 'unstable' 'foo' 'i386' '1.0'
12 insertpackage 'testing' 'foo' 'any' '1.0'
14 setupaptarchive --no-update
15 APTARCHIVE="$(readlink -f ./aptarchive)"
17 signreleasefiles 'Joe Sixpack'
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
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
29 msgmsg "Some sources broken
=> run Post
-Invoke-Success and Post
-Invoke"
30 sed -i -e '/^ / d' -e '/^SHA512:/ d' "$APTARCHIVE/dists
/unstable
/Release
"
32 testfailure aptget update
33 cp rootdir/tmp/testfailure.output aptupdate.output
34 testsuccess grep "RUN
" aptupdate.output
35 testsuccess grep "SUCCESS
" aptupdate.output
37 msgmsg "All sources broken
=> run Post
-Invoke"
38 sed -i -e '/^ / d' -e '/^SHA512:/ d' "$APTARCHIVE/dists
/testing
/Release
"
40 testfailure aptget update
41 cp rootdir/tmp/testfailure.output aptupdate.output
42 testsuccess grep "RUN
" aptupdate.output
43 testfailure grep "SUCCESS
" aptupdate.output