From e5bdcc8708ee571a7d7d54bbdfa7e226300344ea Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 Nov 2012 11:31:29 +0100 Subject: add testcase for the autoremove feature Conflicts: debian/apt.auto-removal.sh --- test/integration/test-kernel-helper-autoremove.fake-dpkg | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/integration/test-kernel-helper-autoremove.fake-dpkg (limited to 'test/integration/test-kernel-helper-autoremove.fake-dpkg') diff --git a/test/integration/test-kernel-helper-autoremove.fake-dpkg b/test/integration/test-kernel-helper-autoremove.fake-dpkg new file mode 100644 index 000000000..aec6d4418 --- /dev/null +++ b/test/integration/test-kernel-helper-autoremove.fake-dpkg @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +if [ "$1" = "-l" ]; then + echo "ii linux-image-1.0.0-2-generic 1.0.01-2 amd64" + echo "ii linux-image-3.5.0-17-generic 3.5.0-17 amd64" + echo "ii linux-image-10.0.0-1-generic 10.0.0.1-1 amd64" +elif [ "$1" = "--compare-versions" ]; then + dpkg "$1" "$2" "$3" "$4" +else + dpkg $@ +fi + -- cgit v1.2.3 From 86eab64799033223f073ca30a6b9655fbab2c214 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 Nov 2012 11:39:47 +0100 Subject: also check that the running kernel is kept --- test/integration/test-kernel-helper-autoremove.fake-dpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/integration/test-kernel-helper-autoremove.fake-dpkg') diff --git a/test/integration/test-kernel-helper-autoremove.fake-dpkg b/test/integration/test-kernel-helper-autoremove.fake-dpkg index aec6d4418..a365c5370 100644 --- a/test/integration/test-kernel-helper-autoremove.fake-dpkg +++ b/test/integration/test-kernel-helper-autoremove.fake-dpkg @@ -3,7 +3,7 @@ set -e if [ "$1" = "-l" ]; then echo "ii linux-image-1.0.0-2-generic 1.0.01-2 amd64" - echo "ii linux-image-3.5.0-17-generic 3.5.0-17 amd64" + echo "ii linux-image-$(uname -r) not-used amd64" echo "ii linux-image-10.0.0-1-generic 10.0.0.1-1 amd64" elif [ "$1" = "--compare-versions" ]; then dpkg "$1" "$2" "$3" "$4" -- cgit v1.2.3