]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-external-installation-planner-protocol
implement socks5h proxy support for http method
[apt.git] / test / integration / test-external-installation-planner-protocol
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6setupenvironment
7configarchitecture 'amd64'
8
9buildsimplenativepackage 'libfoo' 'amd64' '3' 'experimental' 'Multi-Arch: same'
10buildsimplenativepackage 'foo' 'all' '3' 'experimental' 'Depends: newstuff'
11buildsimplenativepackage 'foo' 'all' '2' 'unstable' 'Depends: libfoo:amd64, stuff
12Conflicts: bar, libfoo:i386
13Recommends: unrelated'
14buildsimplenativepackage 'libfoo' 'amd64' '2' 'unstable' 'Multi-Arch: same'
15buildsimplenativepackage 'unrelated-2' 'amd64' '2' 'unstable'
16insertinstalledpackage 'foo' 'all' '1'
17insertinstalledpackage 'bar' 'all' '1'
18insertinstalledpackage 'stuff' 'all' '1'
19insertinstalledpackage 'unrelated-1' 'all' '1'
20
21setupaptarchive --no-update
22
23EIPPLOG="${TMPWORKINGDIRECTORY}/rootdir/var/log/apt/eipp.log"
24echo "Dir::Log::Planner \"$EIPPLOG\";" > ./rootdir/etc/apt/apt.conf.d/eipp-logging
25
26testsuccess apt update
27export APT_EDSP_DUMP_FILENAME="${TMPWORKINGDIRECTORY}/downloaded/dump.eipp"
28testfailure test -r "$EIPPLOG"
29testfailure aptget install foo --planner dump -y
30testfailure test -r "$EIPPLOG"
31testfailure grep 'unrelated-2' "$APT_EDSP_DUMP_FILENAME"
32testsuccessequal '2' grep -c '^Package: foo$' "$APT_EDSP_DUMP_FILENAME"
33testsuccessequal '1' grep -c '^Package: libfoo$' "$APT_EDSP_DUMP_FILENAME"
34testsuccessequal 'Planner: dump' grep '^Planner: ' "$APT_EDSP_DUMP_FILENAME"
35
36testsuccess aptget install foo -s
37testsuccess aptget install foo -y
38testsuccess test -r "$EIPPLOG"
39testsuccessequal 'Request: EIPP 0.1
40Architecture: amd64
41Architectures: amd64
42Remove: bar:amd64
43Install: libfoo:amd64 foo:amd64
44Planner: internal' head -n 6 "$EIPPLOG"
45aptinternalplanner < "$EIPPLOG" > planner.log || true
46testsuccessequal 'Remove: 6
47Unpack: 2
48Unpack: 4
49Configure: 2
50Configure: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log
51
52rm -f "$EIPPLOG"
53testsuccess aptget install foo -s --reinstall
54testsuccess aptget install foo -y --reinstall
55testsuccess test -r "$EIPPLOG"
56testsuccessequal 'Request: EIPP 0.1
57Architecture: amd64
58Architectures: amd64
59ReInstall: foo:amd64
60Planner: internal' head -n 5 "$EIPPLOG"
61aptinternalplanner < "$EIPPLOG" > planner.log || true
62testsuccessequal 'Unpack: 4
63Configure: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log
64
65rm -f "$EIPPLOG"
66testsuccess aptget purge foo -s
67testsuccess aptget purge foo -y
68testsuccess test -r "$EIPPLOG"
69testsuccessequal 'Request: EIPP 0.1
70Architecture: amd64
71Architectures: amd64
72Remove: foo:amd64
73Planner: internal' head -n 5 "$EIPPLOG"
74aptinternalplanner < "$EIPPLOG" > planner.log || true
75testsuccessequal 'Remove: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log