test-apt-progress-fd-error-postinst 654 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'amd64' 'i386'
  7. mkdir -p DEBIAN/
  8. echo "#!/bin/sh\nexit 1" > DEBIAN/postinst
  9. chmod 755 DEBIAN/postinst
  10. buildsimplenativepackage 'postinst-error' 'amd64,i386' '0.8.15' 'stable' '' 'pkg with posinst error' '' '' './DEBIAN'
  11. setupaptarchive
  12. exec 3> apt-progress.log
  13. testfailure aptget install postinst-error -y -o APT::Status-Fd=3
  14. msgtest "Ensure correct error message for postinst error"
  15. grep -q "pmerror:postinst-error :80:subprocess installed post-installation script returned error exit status 2" apt-progress.log && msgpass || msgfail