0001-basic 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #! /bin/bash
  2. #
  3. # © 2017 Ansgar Burchardt <ansgar@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. # add a unstable suite with amd64
  23. dak admin architecture add amd64 AMD64
  24. dak admin suite add unstable "" codename=sid
  25. dak admin suite-architecture add unstable source all amd64
  26. dak admin suite-component add unstable main contrib non-free
  27. (
  28. suites="$(dak admin suite list | sort | xargs)"
  29. suites_e="byhand new unstable"
  30. assert-equal "dak admin suite list" "${suites}" "${suites_e}"
  31. )
  32. (
  33. unstable_archs="$(dak admin s-a list-arch unstable | sort | xargs)"
  34. assert-equal "dak admin s-a list-arch unstable" "${unstable_archs}" "amd64"
  35. )
  36. (
  37. cs_unstable="$(dak control-suite -l unstable)"
  38. assert-equal "dak control-suite -l unstable" "${cs_unstable}" ""
  39. )
  40. (
  41. co_unstable="$(dak control-override -l unstable)"
  42. assert-equal "dak control-override -l unstable" "${co_unstable}" ""
  43. )
  44. (
  45. dak control-overrides -s unstable -t deb -a << EOF
  46. package required admin
  47. EOF
  48. dak control-overrides -s unstable -t dsc -a << EOF
  49. package admin
  50. EOF
  51. )
  52. (
  53. packages=$(fixture-package-dir)
  54. import-fixture-signing-key
  55. cp ${packages:?}/nonfree-package_* ${packages:?}/package_0.1* ${DAKBASE}/tmp
  56. dak process-upload -d ${DAKBASE}/tmp --automatic
  57. )
  58. (
  59. dak contents scan-binary
  60. dak contents scan-source
  61. )
  62. (
  63. dak generate-packages-sources2 -s unstable
  64. dak contents generate -a dak-master -s unstable
  65. dak generate-release -s unstable
  66. )
  67. check_all_suites after_accept
  68. (
  69. dak rm -n -s unstable package
  70. )
  71. (
  72. export REASON="not accepted"
  73. unset VISUAL
  74. export EDITOR=integration-tests/reject-editor
  75. # M: manual reject, R: reject
  76. printf "M\nR\n" | dak process-new nonfree-package_0.1-1_amd64.changes
  77. dak process-new --automatic
  78. dak process-policy new
  79. )