summaryrefslogtreecommitdiff
path: root/test/integration/test-external-installation-planer-protocol
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-26 13:20:19 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-27 11:57:13 +0200
commitb4f91d4d150a0d9bcc77563abbc03d28da2ff4e3 (patch)
tree1098af95242129e5182b1b40c19cf7b50e80286b /test/integration/test-external-installation-planer-protocol
parent262fdd8b5882dcd23f3b4cb266132ad3c326f83a (diff)
eipp: enable xz-compressed scenario logging
In 385d9f2f23057bc5808b5e013e77ba16d1c94da4 I implemented the storage of scenario files based on enabling this by default for EIPP, but I implemented it first optionally for EDSP to have it independent. The reasons mentioned in the earlier commit (debugging and bugreports) obviously apply here, especially as EIPP solutions aren't user approved, nearly impossible to verify before starting the execution and at the time of error the scenario has changed already, so that reproducing the issue becomes hard(er).
Diffstat (limited to 'test/integration/test-external-installation-planer-protocol')
-rwxr-xr-xtest/integration/test-external-installation-planer-protocol48
1 files changed, 46 insertions, 2 deletions
diff --git a/test/integration/test-external-installation-planer-protocol b/test/integration/test-external-installation-planer-protocol
index 605efcd7b..15ecd23a3 100755
--- a/test/integration/test-external-installation-planer-protocol
+++ b/test/integration/test-external-installation-planer-protocol
@@ -20,12 +20,56 @@ insertinstalledpackage 'unrelated-1' 'all' '1'
setupaptarchive --no-update
+EIPPLOG="${TMPWORKINGDIRECTORY}/rootdir/var/log/apt/eipp.log"
+echo "Dir::Log::Planer \"$EIPPLOG\";" > ./rootdir/etc/apt/apt.conf.d/eipp-logging
+
testsuccess apt update
export APT_EDSP_DUMP_FILENAME="${TMPWORKINGDIRECTORY}/eipp.dump"
+testfailure test -r "$EIPPLOG"
testfailure aptget install foo --planer dump -y
+testfailure test -r "$EIPPLOG"
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"
+testsuccessequal 'Planer: dump' grep '^Planer: ' "$APT_EDSP_DUMP_FILENAME"
+
+testsuccess aptget install foo -s
+testsuccess aptget install foo -y
+testsuccess test -r "$EIPPLOG"
+testsuccessequal 'Request: EIPP 0.1
+Architecture: amd64
+Architectures: amd64
+Remove: bar:amd64
+Install: libfoo:amd64 foo:amd64
+Planer: internal' head -n 6 "$EIPPLOG"
+aptinternalplaner < "$EIPPLOG" > planer.log || true
+testsuccessequal 'Remove: 6
+Unpack: 2
+Unpack: 4
+Configure: 2
+Configure: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planer.log
+
+rm -f "$EIPPLOG"
+testsuccess aptget install foo -s --reinstall
+testsuccess aptget install foo -y --reinstall
+testsuccess test -r "$EIPPLOG"
+testsuccessequal 'Request: EIPP 0.1
+Architecture: amd64
+Architectures: amd64
+ReInstall: foo:amd64
+Planer: internal' head -n 5 "$EIPPLOG"
+aptinternalplaner < "$EIPPLOG" > planer.log || true
+testsuccessequal 'Unpack: 4
+Configure: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planer.log
-aptget install foo -ys #--planer apt
+rm -f "$EIPPLOG"
+testsuccess aptget purge foo -s
+testsuccess aptget purge foo -y
+testsuccess test -r "$EIPPLOG"
+testsuccessequal 'Request: EIPP 0.1
+Architecture: amd64
+Architectures: amd64
+Remove: foo:amd64
+Planer: internal' head -n 5 "$EIPPLOG"
+aptinternalplaner < "$EIPPLOG" > planer.log || true
+testsuccessequal 'Remove: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planer.log