From f74d99c6a78caafdc6e32d8cb135683b7154795c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 28 May 2016 15:40:59 +0200 Subject: eipp: provide the internal planer as an external one Testing the current implementation can benefit from being able to be feed an EIPP request and produce a fully compliant response. It is also a great test for EIPP in general. --- test/integration/framework | 3 +++ test/integration/test-00-commands-have-help | 2 +- test/integration/test-external-installation-planer-protocol | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 6276ae825..93e17e454 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -191,6 +191,7 @@ aptitude() { runapt aptitude "$@"; } aptextracttemplates() { runapt apt-extracttemplates "$@"; } aptinternalsolver() { runapt "${APTINTERNALSOLVER}" "$@"; } aptdumpsolver() { runapt "${APTDUMPSOLVER}" "$@"; } +aptinternalplaner() { runapt "${APTINTERNALPLANER}" "$@"; } dpkg() { "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" "$@" @@ -289,6 +290,7 @@ setupenvironment() { APTWEBSERVERBINDIR="${APT_INTEGRATION_TESTS_WEBSERVER_BIN_DIR:-"${BUILDDIRECTORY}"}" APTINTERNALSOLVER="${APT_INTEGRATION_TESTS_INTERNAL_SOLVER:-"${BUILDDIRECTORY}/apt-internal-solver"}" APTDUMPSOLVER="${APT_INTEGRATION_TESTS_DUMP_SOLVER:-"${BUILDDIRECTORY}/apt-dump-solver"}" + APTINTERNALPLANER="${APT_INTEGRATION_TESTS_INTERNAL_PLANER:-"${BUILDDIRECTORY}/apt-internal-planer"}" test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first" # ----- @@ -306,6 +308,7 @@ setupenvironment() { ln -s "${BUILDDIRECTORY}/apt-dump-solver" usr/lib/apt/solvers/dump ln -s "${BUILDDIRECTORY}/apt-dump-solver" usr/lib/apt/planers/dump ln -s "${BUILDDIRECTORY}/apt-internal-solver" usr/lib/apt/solvers/apt + ln -s "${BUILDDIRECTORY}/apt-internal-planer" usr/lib/apt/planers/apt echo "Dir::Bin::Solvers \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/solvers\";" > etc/apt/apt.conf.d/externalsolver.conf echo "Dir::Bin::Planers \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/planers\";" > etc/apt/apt.conf.d/externalplaner.conf fi diff --git a/test/integration/test-00-commands-have-help b/test/integration/test-00-commands-have-help index c7d794b34..ae724fb9e 100755 --- a/test/integration/test-00-commands-have-help +++ b/test/integration/test-00-commands-have-help @@ -49,7 +49,7 @@ for CMD in 'apt-cache' 'apt-cdrom' 'apt-config' \ checkoptions "$cmd" done -for CMD in 'apt-dump-solver' 'apt-internal-solver'; do +for CMD in 'apt-dump-solver' 'apt-internal-solver' 'apt-internal-planer'; do checkoptions "$(echo "$CMD" | tr -d '-')" done diff --git a/test/integration/test-external-installation-planer-protocol b/test/integration/test-external-installation-planer-protocol index db43675e1..605efcd7b 100755 --- a/test/integration/test-external-installation-planer-protocol +++ b/test/integration/test-external-installation-planer-protocol @@ -26,3 +26,6 @@ testfailure aptget install foo --planer dump -y testfailure grep 'unrelated-2' "$APT_EDSP_DUMP_FILENAME" testsuccessequal '2' grep -c '^Package: foo$' "$APT_EDSP_DUMP_FILENAME" testsuccessequal '1' grep -c '^Package: libfoo$' "$APT_EDSP_DUMP_FILENAME" +#less "$APT_EDSP_DUMP_FILENAME" + +aptget install foo -ys #--planer apt -- cgit v1.2.3