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