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.
 
 
 
 
 
 

121 lines
4.7 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. # we need this construct here as it isn't really possible to fake native arch for dpkg-* tools
  7. NATIVE="$(command dpkg --print-architecture)"
  8. configarchitecture "${NATIVE}" 'armel'
  9. buildsimplenativepackage 'pkg-arch-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !${NATIVE}]
  10. Depends: foo [${NATIVE} !${NATIVE}]"
  11. buildsimplenativepackage 'pkg-arch-no-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!${NATIVE} ${NATIVE}]
  12. Depends: foo [!${NATIVE} ${NATIVE}]"
  13. buildsimplenativepackage 'pkg-arch-foo-unrelated-no' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!someos-any ${NATIVE}]
  14. Depends: foo [!someos-any ${NATIVE}]"
  15. buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !someos-any]
  16. Depends: foo [${NATIVE} !someos-any]"
  17. buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armeb], bar [arm]
  18. Depends: foo [armeb], bar [arm]'
  19. buildsimplenativepackage 'foo' "$NATIVE" '1.0' 'stable'
  20. insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
  21. setupaptarchive
  22. testsuccessequal "Reading package lists...
  23. Building dependency tree...
  24. The following additional packages will be installed:
  25. foo
  26. The following NEW packages will be installed:
  27. foo pkg-arch-foo
  28. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  29. Inst foo (1.0 stable [${NATIVE}])
  30. Inst pkg-arch-foo (1.0 stable [${NATIVE}])
  31. Conf foo (1.0 stable [${NATIVE}])
  32. Conf pkg-arch-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo -s
  33. testsuccessequal "Reading package lists...
  34. Building dependency tree...
  35. The following NEW packages will be installed:
  36. pkg-arch-no-foo
  37. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  38. Inst pkg-arch-no-foo (1.0 stable [${NATIVE}])
  39. Conf pkg-arch-no-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-no-foo -s
  40. testsuccessequal "Reading package lists...
  41. Building dependency tree...
  42. The following additional packages will be installed:
  43. foo
  44. The following NEW packages will be installed:
  45. foo pkg-arch-foo-unrelated-no
  46. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  47. Inst foo (1.0 stable [${NATIVE}])
  48. Inst pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])
  49. Conf foo (1.0 stable [${NATIVE}])
  50. Conf pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no -s
  51. testsuccessequal "Reading package lists...
  52. Building dependency tree...
  53. The following additional packages will be installed:
  54. foo
  55. The following NEW packages will be installed:
  56. foo pkg-arch-foo-unrelated-no2
  57. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  58. Inst foo (1.0 stable [${NATIVE}])
  59. Inst pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])
  60. Conf foo (1.0 stable [${NATIVE}])
  61. Conf pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no2 -s
  62. testsuccessequal "Reading package lists...
  63. Reading package lists...
  64. Building dependency tree...
  65. The following NEW packages will be installed:
  66. foo
  67. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  68. Inst foo (1.0 stable [${NATIVE}])
  69. Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo -s
  70. testsuccessequal 'Reading package lists...
  71. pkg-arch-no-foo has no build depends.
  72. Reading package lists...
  73. Building dependency tree...
  74. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s
  75. testsuccessequal "Reading package lists...
  76. Reading package lists...
  77. Building dependency tree...
  78. The following NEW packages will be installed:
  79. foo
  80. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  81. Inst foo (1.0 stable [${NATIVE}])
  82. Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no -s
  83. testsuccessequal "Reading package lists...
  84. Reading package lists...
  85. Building dependency tree...
  86. The following NEW packages will be installed:
  87. foo
  88. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  89. Inst foo (1.0 stable [${NATIVE}])
  90. Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no2 -s
  91. testsuccessequal 'Reading package lists...
  92. no-depends has no build depends.
  93. Reading package lists...
  94. Building dependency tree...
  95. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s
  96. # this is not really testing APT - more that dpkg is in line with us
  97. configarchitecture 'amd64' 'armel'
  98. testsuccessequal 'Reading package lists...
  99. Building dependency tree...
  100. The following NEW packages will be installed:
  101. no-depends:armel
  102. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  103. Inst no-depends:armel (1.0 stable [armel])
  104. Conf no-depends:armel (1.0 stable [armel])' aptget install no-depends -s