You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test-apt-progress-fd-error 866 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'native'
  7. mkdir -p usr/bin
  8. touch usr/bin/file-conflict
  9. buildsimplenativepackage 'foo1' 'native' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
  10. buildsimplenativepackage 'foo2' 'native' '0.8.15' 'stable' '' 'pkg with file conflicts' '' '' 'usr/'
  11. insertinstalledpackage 'apport' 'native' '1'
  12. setupaptarchive
  13. exec 3> apt-progress.log
  14. testfailure aptget install foo1 foo2 -y -o APT::Status-Fd=3
  15. msgtest 'Ensure correct error message' 'file-conflict'
  16. testsuccess --nomsg grep "foo2_0.8.15_[^.]\+.deb:[0-9.]\+:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log
  17. testsuccess test -s rootdir/var/crash/foo2.0.crash
  18. testsuccess grep '^Package: foo2 0.8.15$' rootdir/var/crash/foo2.0.crash