| 1 |
TESTS_DEB := pkg-conff-original pkg-conff-takeover |
| 2 |
|
| 3 |
include ../Test.mk |
| 4 |
|
| 5 |
TEST_CASES += test-two-run-ordered |
| 6 |
TEST_CASES += test-one-run-ordered |
| 7 |
TEST_CASES += test-two-run-reverse |
| 8 |
TEST_CASES += test-one-run-reverse |
| 9 |
|
| 10 |
test-case: $(TEST_CASES) |
| 11 |
|
| 12 |
define VERIFY |
| 13 |
$(call pkg_is_installed,pkg-conff-takeover) |
| 14 |
test "`$(DPKG_QUERY) -S /test-conffile`" = "pkg-conff-takeover: /test-conffile" |
| 15 |
cmp ref-conffile "$(DPKG_INSTDIR)/test-conffile" |
| 16 |
endef |
| 17 |
|
| 18 |
test-two-run-ordered: |
| 19 |
# test-two-run-ordered |
| 20 |
$(DPKG_INSTALL) pkg-conff-original.deb |
| 21 |
$(DPKG_INSTALL) pkg-conff-takeover.deb |
| 22 |
$(call pkg_is_not_installed,pkg-conff-original) |
| 23 |
$(VERIFY) |
| 24 |
$(DPKG_PURGE) pkg-conff-original pkg-conff-takeover |
| 25 |
test ! -f "$(DPKG_INSTDIR)/test-conffile" |
| 26 |
|
| 27 |
test-one-run-ordered: |
| 28 |
# test-one-run-ordered |
| 29 |
$(DPKG_INSTALL) pkg-conff-original.deb pkg-conff-takeover.deb |
| 30 |
$(call pkg_is_not_installed,pkg-conff-original) |
| 31 |
$(VERIFY) |
| 32 |
$(DPKG_PURGE) pkg-conff-original pkg-conff-takeover |
| 33 |
test ! -f "$(DPKG_INSTDIR)/test-conffile" |
| 34 |
|
| 35 |
test-two-run-reverse: |
| 36 |
# test-two-run-reverse |
| 37 |
$(DPKG_INSTALL) pkg-conff-takeover.deb |
| 38 |
$(DPKG_INSTALL) pkg-conff-original.deb |
| 39 |
$(call pkg_is_installed,pkg-conff-original) |
| 40 |
$(VERIFY) |
| 41 |
$(DPKG_PURGE) pkg-conff-original pkg-conff-takeover |
| 42 |
test ! -f "$(DPKG_INSTDIR)/test-conffile" |
| 43 |
|
| 44 |
test-one-run-reverse: |
| 45 |
# test-one-run-reverse |
| 46 |
$(DPKG_INSTALL) pkg-conff-takeover.deb pkg-conff-original.deb |
| 47 |
$(call pkg_is_installed,pkg-conff-original) |
| 48 |
$(VERIFY) |
| 49 |
$(DPKG_PURGE) pkg-conff-original pkg-conff-takeover |
| 50 |
test ! -f "$(DPKG_INSTDIR)/test-conffile" |
| 51 |
|