]> git.saurik.com Git - apt.git/blob - test/integration/test-external-dependency-solver-protocol
Merge remote-tracking branch 'mvo/feature/drop-rights' into debian/experimental
[apt.git] / test / integration / test-external-dependency-solver-protocol
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6 setupenvironment
7 configarchitecture 'amd64' 'i386'
8
9 insertinstalledpackage 'cool' 'all' '1'
10 insertinstalledpackage 'stuff' 'all' '1'
11
12 insertpackage 'unstable' 'cool' 'all' '2' 'Multi-Arch: foreign'
13 insertpackage 'unstable' 'stuff' 'all' '2' 'Multi-Arch: foreign'
14 insertpackage 'unstable' 'coolstuff' 'i386,amd64' '2' 'Depends: cool, stuff'
15 insertpackage 'unstable' 'awesome' 'all' '2' 'Multi-Arch: foreign'
16 insertpackage 'unstable' 'awesomecoolstuff' 'i386' '2' 'Depends: coolstuff, awesome'
17
18 insertpackage 'experimental' 'cool' 'all' '3' 'Multi-Arch: foreign'
19 insertpackage 'experimental' 'stuff' 'all' '3' 'Multi-Arch: foreign'
20 insertpackage 'experimental' 'coolstuff' 'i386,amd64' '3' 'Depends: cool, stuff'
21
22 setupaptarchive
23
24 rm -f /tmp/dump.edsp
25 testequal 'Reading package lists...
26 Building dependency tree...
27 Execute external solver...
28 The solver encountered an error of type: ERR_JUST_DUMPING
29 The following information might help you to understand what is wrong:
30 I am too dumb, i can just dump!
31 Please use one of my friends instead!
32
33 E: External solver failed with: I am too dumb, i can just dump!' aptget install --solver dump coolstuff -s
34 testsuccess test -s /tmp/dump.edsp
35 rm -f /tmp/dump.edsp
36
37 #FIXME: this should be unstable, but we don't support pinning yet
38 testequal 'Reading package lists...
39 Building dependency tree...
40 Execute external solver...
41 The following NEW packages will be installed:
42 coolstuff
43 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
44 Inst coolstuff (3 experimental [amd64])
45 Conf coolstuff (3 experimental [amd64])' aptget install --solver apt coolstuff -s
46
47 testsuccess aptget install awesomecoolstuff:i386 -s
48 testsuccess aptget install --solver apt awesomecoolstuff:i386 -s
49
50 rm -f /tmp/dump.edsp
51 testfailure aptget install --solver dump awesomecoolstuff:i386 -s
52 testsuccess test -s /tmp/dump.edsp
53
54 configarchitecture 'armel'
55 msgtest 'Test direct calling is okay for' 'apt-internal-solver'
56 cat /tmp/dump.edsp | aptinternalsolver > solver.result 2>&1 || true
57 if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then
58 msgpass
59 else
60 cat solver.result
61 msgfail
62 fi
63 rm -f /tmp/dump.edsp
64
65 testfailure aptget install --solver apt awesomecoolstuff:i386 -s