summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-progress-fd-error-postinst
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-10-17 08:03:41 +0200
committerMichael Vogt <mvo@debian.org>2013-10-17 08:03:41 +0200
commite8022b09e73ee89d3b748e1c8dba82abba5b37f3 (patch)
tree2bc51615c21c16040dbb31ebf873bdd2a29565d0 /test/integration/test-apt-progress-fd-error-postinst
parent5e9458e285af11c7fa4308add10d250e3546c8bf (diff)
parentc420fe0096985234e861aaafc2b9908b6259a1bb (diff)
Merge branch 'debian/sid' into feature/install-progress-refactor
Conflicts: apt-pkg/deb/dpkgpm.cc
Diffstat (limited to 'test/integration/test-apt-progress-fd-error-postinst')
-rwxr-xr-xtest/integration/test-apt-progress-fd-error-postinst22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/integration/test-apt-progress-fd-error-postinst b/test/integration/test-apt-progress-fd-error-postinst
new file mode 100755
index 000000000..0b6e70212
--- /dev/null
+++ b/test/integration/test-apt-progress-fd-error-postinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+mkdir -p DEBIAN/
+echo "#!/bin/sh\nexit 1" > DEBIAN/postinst
+chmod 755 DEBIAN/postinst
+
+buildsimplenativepackage 'postinst-error' 'amd64,i386' '0.8.15' 'stable' '' 'pkg with posinst error' '' '' './DEBIAN'
+
+setupaptarchive
+
+exec 3> apt-progress.log
+testfailure aptget install postinst-error -y -o APT::Status-Fd=3
+msgtest "Ensure correct error message for postinst error"
+grep -q "pmerror:postinst-error :80:subprocess installed post-installation script returned error exit status 2" apt-progress.log && msgpass || msgfail
+