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.
 
 
 
 
 
 

116 lines
4.6 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. Building dependency tree...
  64. The following NEW packages will be installed:
  65. foo
  66. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  67. Inst foo (1.0 stable [${NATIVE}])
  68. Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo -s
  69. testsuccessequal 'Reading package lists...
  70. Building dependency tree...
  71. pkg-arch-no-foo has no build depends.
  72. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s
  73. testsuccessequal "Reading package lists...
  74. Building dependency tree...
  75. The following NEW packages will be installed:
  76. foo
  77. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  78. Inst foo (1.0 stable [${NATIVE}])
  79. Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no -s
  80. testsuccessequal "Reading package lists...
  81. Building dependency tree...
  82. The following NEW packages will be installed:
  83. foo
  84. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  85. Inst foo (1.0 stable [${NATIVE}])
  86. Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no2 -s
  87. testsuccessequal 'Reading package lists...
  88. Building dependency tree...
  89. no-depends has no build depends.
  90. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s
  91. # this is not really testing APT - more that dpkg is in line with us
  92. configarchitecture 'amd64' 'armel'
  93. testsuccessequal 'Reading package lists...
  94. Building dependency tree...
  95. The following NEW packages will be installed:
  96. no-depends:armel
  97. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  98. Inst no-depends:armel (1.0 stable [armel])
  99. Conf no-depends:armel (1.0 stable [armel])' aptget install no-depends -s