summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-05-28 15:40:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-27 11:57:12 +0200
commitf74d99c6a78caafdc6e32d8cb135683b7154795c (patch)
tree3056bcf8fa40dd70c65ae073e634aa142ab8e628 /test
parentdae197476f1831269d13f4e990276ce25c483842 (diff)
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.
Diffstat (limited to 'test')
-rw-r--r--test/integration/framework3
-rwxr-xr-xtest/integration/test-00-commands-have-help2
-rwxr-xr-xtest/integration/test-external-installation-planer-protocol3
3 files changed, 7 insertions, 1 deletions
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