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