test-apt-progress-fd-deb822 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64' 'i386'
  7. buildsimplenativepackage 'testing' 'amd64' '0.1' 'stable'
  8. buildsimplenativepackage 'testing' 'all' '0.8.15' 'stable'
  9. buildsimplenativepackage 'testing2' 'amd64,i386' '0.8.15' 'stable'
  10. setupaptarchive
  11. # install native
  12. exec 3> apt-progress.log
  13. testsuccess aptget install testing=0.1 -y -o APT::Status-deb822-Fd=3
  14. testfileequal './apt-progress.log' 'Status: progress
  15. Percent: 0.0000
  16. Message: Running dpkg
  17. Status: progress
  18. Package: testing:amd64
  19. Percent: 0.0000
  20. Message: Installing testing (amd64)
  21. Status: progress
  22. Package: testing:amd64
  23. Percent: 16.6667
  24. Message: Preparing testing (amd64)
  25. Status: progress
  26. Package: testing:amd64
  27. Percent: 33.3333
  28. Message: Unpacking testing (amd64)
  29. Status: progress
  30. Package: testing:amd64
  31. Percent: 50.0000
  32. Message: Preparing to configure testing (amd64)
  33. Status: progress
  34. Percent: 50.0000
  35. Message: Running dpkg
  36. Status: progress
  37. Package: testing:amd64
  38. Percent: 50.0000
  39. Message: Configuring testing (amd64)
  40. Status: progress
  41. Package: testing:amd64
  42. Percent: 66.6667
  43. Message: Configuring testing (amd64)
  44. Status: progress
  45. Package: testing:amd64
  46. Percent: 83.3333
  47. Message: Installed testing (amd64)
  48. '
  49. rm -f apt-progress*.log