X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/294a80209a0c6ea617a14fb2ae650d4fd329eab5..f695e76199a43b7f4d5816e20d18496b6448b833:/test/integration/test-external-dependency-solver-protocol diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index cc8b5f1c4..32c5fc354 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture 'amd64' 'i386' @@ -124,7 +124,7 @@ rm -f "$APT_EDSP_DUMP_FILENAME" testfailure aptget install --solver dump awesomecoolstuff:i386 -s testsuccess test -s "$APT_EDSP_DUMP_FILENAME" testequal 'Install: awesomecoolstuff:i386' grep :i386 "$APT_EDSP_DUMP_FILENAME" -testempty grep -e ':amd64' -e 'Architecture: any' "$APT_EDSP_DUMP_FILENAME" +testfailure grep -e ':amd64' -e 'Architecture: any' "$APT_EDSP_DUMP_FILENAME" testsuccess aptget dist-upgrade -s testsuccess aptget dist-upgrade -s --solver apt @@ -139,14 +139,14 @@ testsuccess grep 'ERR_UNSOLVABLE' rootdir/tmp/testfailure.output configarchitecture 'armel' testfailure aptget install --solver apt awesomecoolstuff:i386 -s msgtest 'An invalid EDSP file generates a' 'hard error' -if echo "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver -q=0 > solver.result 2>&1; then +if echo "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver > solver.result 2>&1; then cat solver.result msgfail else msgpass fi msgtest 'Test direct calling is okay for' 'apt-internal-solver' -cat "$APT_EDSP_DUMP_FILENAME" | aptinternalsolver -q=0 > solver.result 2>&1 || true +cat "$APT_EDSP_DUMP_FILENAME" | aptinternalsolver > solver.result 2>&1 || true if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then msgpass else @@ -159,12 +159,38 @@ testsuccess aptinternalsolver scenario testsuccessequal 'Package: stuff Source: stuff Architecture: all +Version: 3 +Source-Version: 3 +APT-ID: 1 +Priority: optional +Section: other +Multi-Arch: foreign +APT-Release: + a=experimental,n=experimental,c=main,b=all +APT-Pin: 1 + +Package: stuff +Source: stuff +Architecture: all +Version: 2 +Source-Version: 2 +APT-ID: 3 +Priority: optional +Section: other +Multi-Arch: foreign +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes + +Package: stuff +Source: stuff +Architecture: all Version: 1 Source-Version: 1 Installed: yes -APT-ID: 2 +APT-ID: 8 Priority: optional Section: other APT-Pin: 100 -APT-Candidate: yes ' aptinternalsolver scenario stuff