0001-basic 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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=${DAK_ROOT:?}/tests/fixtures/packages
  54. ln -sf ${packages:?}/gpg/pubring.gpg ${DAKBASE:?}/keyrings/upload-keyring.gpg
  55. dak import-keyring -U "%s" ${DAKBASE}/keyrings/upload-keyring.gpg
  56. cp ${packages:?}/nonfree-package_* ${packages:?}/package_* ${DAKBASE}/tmp
  57. dak process-upload -d ${DAKBASE}/tmp --automatic
  58. )
  59. (
  60. dak contents scan-binary
  61. dak contents scan-source
  62. )
  63. (
  64. dak generate-packages-sources2 -s unstable
  65. dak contents generate -a dak-master -s unstable
  66. # TODO: make this work in the CI; needs GnuPG key
  67. #dak generate-release -s unstable
  68. )
  69. (
  70. dak rm -n -s unstable package
  71. )