0005-encoding 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #! /bin/bash
  2. #
  3. # © 2020 Ivo De Decker <ivodd@debian.org>
  4. # License: GPL-2+
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. set -e
  19. set -u
  20. . ${DAK_ROOT:?}/integration-tests/common
  21. . ${DAK_ROOT:?}/integration-tests/setup
  22. . ${DAK_ROOT:?}/integration-tests/dinstall
  23. HTMLDIR="${DAKBASE}/html"
  24. mkdir $HTMLDIR
  25. MAILDIR="${DAKBASE}/mail"
  26. mkdir $MAILDIR
  27. cat >> ${DAKBASE}/etc/dak.conf << EOF
  28. Show-New::HTMLPath "${HTMLDIR}";
  29. Dir::Mail "${MAILDIR}";
  30. Dinstall::SendmailCommand "${DAK_ROOT}/integration-tests/fake-mailer";
  31. Dinstall::BugServer "bugs.example.org";
  32. EOF
  33. sed -i 's/No-Mail "true";/#No-Mail "true";/' $DAKBASE/etc/dak.conf
  34. show_subjects() {
  35. grep -h ^Subject ${MAILDIR}/sendmail.* | LC_ALL=C sort
  36. }
  37. setup_empty_archive
  38. setup_unstable
  39. import-fixture-signing-key
  40. dinstall
  41. (
  42. packages=$(fixture-package-dir)
  43. upload_changes ${packages:?}/snowman_0.1-1_amd64.changes
  44. upload_changes ${packages:?}/grave_0.1-1_amd64.changes
  45. process_uploads
  46. # the queue-report contains references to time (age of the uploads), so we
  47. # can't check the output against a reference
  48. dak queue-report
  49. dak show-new
  50. for htmlfile in $HTMLDIR/snowman_0.1-1.html $HTMLDIR/grave_0.1-1.html
  51. do
  52. links -dump $htmlfile
  53. save_ci_artifact $htmlfile
  54. done
  55. printf "c\na\n" | dak process-new snowman_0.1-1_amd64.changes | cat
  56. printf "c\na\n" | dak process-new grave_0.1-1_amd64.changes | cat
  57. dak process-new --automatic
  58. dak process-policy new
  59. dak show-new
  60. )
  61. (
  62. dak contents scan-binary
  63. dak contents scan-source
  64. )
  65. dinstall
  66. check_all_suites after_install
  67. check_output maintainers.txt "dak make-maintainers -a ftp-master -p"
  68. echo y |dak rm -R -C test@example.com -d 123456 -m "remove ☃" snowman
  69. echo y |dak rm -R -C test@example.com -d 123457 -m "remove è" grave
  70. check_all_suites after_remove
  71. check_output changelog_buildd "dak make-changelog -b unstable -s buildd-unstable"
  72. check_output mail_subjects "show_subjects"