1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
#
# Dpkg functional testsuite (kind of)
#
# Copyright © 2008-2015 Guillem Jover <guillem@debian.org>
#
-include .pkg-tests.conf
## Feature checks setup ##
include Feature.mk
## Test cases ##
TESTS_MANUAL :=
TESTS_MANUAL += t-deb-lfs
TESTS_MANUAL += t-conffile-prompt
TESTS_FAIL :=
TESTS_FAIL += t-dir-leftover-deadlock
TESTS_FAIL += t-dir-shared-replaces-lost
TESTS_FAIL += t-breaks-multiarch
TESTS_PASS :=
TESTS_PASS += t-db
TESTS_PASS += t-normal
TESTS_PASS += t-field-priority
TESTS_PASS += t-option-dry-run
TESTS_PASS += t-option-recursive
TESTS_PASS += t-control-bogus
TESTS_PASS += t-control-no-arch
TESTS_PASS += t-unpack-symlink
TESTS_PASS += t-unpack-hardlink
TESTS_PASS += t-unpack-divert-hardlink
TESTS_PASS += t-unpack-divert-nowarn
TESTS_PASS += t-unpack-divert-overwrite
TESTS_PASS += t-unpack-fifo
ifdef DPKG_AS_ROOT
# No permissions for devices
TESTS_PASS += t-unpack-device
endif
TESTS_PASS += t-maintscript-leak
TESTS_PASS += t-filtering
TESTS_PASS += t-depends
TESTS_PASS += t-dir-leftover-parents
TESTS_PASS += t-dir-leftover-conffile
TESTS_PASS += t-disappear
TESTS_PASS += t-disappear-depended
TESTS_PASS += t-disappear-diverted
TESTS_PASS += t-disappear-diverted-other
TESTS_PASS += t-disappear-empty
TESTS_PASS += t-provides
TESTS_PASS += t-provides-self
TESTS_PASS += t-provides-arch-implicit
TESTS_PASS += t-provides-arch-qualified
TESTS_PASS += t-breaks
TESTS_PASS += t-breaks-protected
TESTS_PASS += t-breaks-essential
TESTS_PASS += t-conflicts
TESTS_PASS += t-conflicts-replaces
TESTS_PASS += t-conflict-provide-replace-real
TESTS_PASS += t-conflict-provide-replace-virtual
TESTS_PASS += t-conflict-provide-replace-virtual-multiarch
TESTS_PASS += t-conflict-provide-replace-interface
TESTS_PASS += t-predepends-no-triggers
TESTS_PASS += t-triggers
TESTS_PASS += t-triggers-db
TESTS_PASS += t-triggers-configure
TESTS_PASS += t-triggers-path
TESTS_PASS += t-triggers-depends
TESTS_PASS += t-triggers-depcycle
TESTS_PASS += t-triggers-depfarcycle
TESTS_PASS += t-triggers-selfcycle
TESTS_PASS += t-triggers-cycle
TESTS_PASS += t-triggers-halt
TESTS_PASS += t-file-conflicts
TESTS_PASS += t-file-replaces
TESTS_PASS += t-file-replaces-disappear
TESTS_PASS += t-file-replaces-versioned
TESTS_PASS += t-conffile-normal
TESTS_PASS += t-conffile-obsolete
TESTS_PASS += t-conffile-orphan
TESTS_PASS += t-conffile-forcemiss
TESTS_PASS += t-conffile-forcenew
TESTS_PASS += t-conffile-forceask
TESTS_PASS += t-conffile-root-option
TESTS_PASS += t-conffile-divert-normal
TESTS_PASS += t-conffile-divert-conffile
TESTS_PASS += t-conffile-conflict
TESTS_PASS += t-conffile-replaces
TESTS_PASS += t-conffile-replaces-upgrade
TESTS_PASS += t-conffile-replaces-downgrade
TESTS_PASS += t-conffile-replaces-existing
TESTS_PASS += t-conffile-replaces-existing-and-upgrade
TESTS_PASS += t-conffile-replaces-disappear
TESTS_PASS += t-conffile-replaces-diverted
TESTS_PASS += t-conffile-versioned-replaces-downgrade
TESTS_PASS += t-conffile-rename
TESTS_PASS += t-conffile-declarative-removal
TESTS_PASS += t-queue-process-deconf-dupe
TESTS_PASS += t-symlink-dir
TESTS_PASS += t-switch-symlink-abs-to-dir
TESTS_PASS += t-switch-symlink-rel-to-dir
TESTS_PASS += t-switch-dir-to-symlink-abs
TESTS_PASS += t-switch-dir-to-symlink-rel
TESTS_PASS += t-failinst-failrm
TESTS_PASS += t-dir-extension-check
TESTS_PASS += t-multiarch
ifneq (,$(filter test-all,$(DPKG_TESTSUITE_OPTIONS)))
TESTS := $(TESTS_PASS) $(TESTS_FAIL) $(TESTS_MANUAL)
else
TESTS := $(TESTS_PASS)
endif
# By default do nothing
all help::
@echo "Run 'make test' to run all the tests"
@echo "Run 'make installtest' to run all the tests as installed"
@echo "Run 'make <test-id>-test' to run a specifict test"
@echo "Run 'make clean' to remove all intermediary files"
@echo ""
@echo "The available tests are: $(TESTS)"
build_targets = $(addsuffix -build,$(TESTS))
build:: $(build_targets)
$(build_targets)::
$(MAKE) -C $(subst -build,,$@) build
.PHONY: build $(build_targets)
test_targets = $(addsuffix -test,$(TESTS))
test:: export DPKG_BUILDTREE=$(realpath ..)
test:: $(test_targets)
$(test_targets)::
$(MAKE) -C $(subst -test,,$@) test
installtest: $(test_targets)
.PHONY: test $(test_targets)
test_clean_targets = $(addsuffix -test-clean,$(TESTS))
test-clean:: $(test_clean_targets)
$(test_clean_targets)::
$(MAKE) -C $(subst -test-clean,,$@) test-clean
.PHONY: test-clean $(test_clean_targets)
clean_targets = $(addsuffix -clean,$(TESTS))
clean:: $(clean_targets)
$(clean_targets)::
$(MAKE) -C $(subst -clean,,$@) clean
.PHONY: clean $(clean_targets)
|