summaryrefslogtreecommitdiffstats
path: root/test/integration/test-apt-progress-fd-error
blob: 39c1053a18263b5d292df58f2a860c7be39f9b9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"

setupenvironment
configarchitecture 'native'

mkdir -p usr/bin
touch usr/bin/file-conflict

buildsimplenativepackage 'foo1' 'native' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
buildsimplenativepackage 'foo2' 'native' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
insertinstalledpackage 'apport' 'native' '1'

setupaptarchive

exec 3> apt-progress.log
testfailure aptget install foo1 foo2 -y -o APT::Status-Fd=3
msgtest 'Ensure correct error message' 'file-conflict'
testsuccess --nomsg grep "foo2_0.8.15_[^.]\+.deb:[0-9.]\+:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log

testsuccess test -s rootdir/var/crash/foo2.0.crash
testsuccess grep '^Package: foo2 0.8.15$' rootdir/var/crash/foo2.0.crash