test-architecture-specification-parsing 4.1 KB

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