blob: ee90be0814b7e9c11c0ab2529a0fae2ccc583601 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001am__tty_colors_dummy = \
2 mgn= red= grn= lgn= blu= brg= std=; \
3 am__color_tests=no
4
5am__tty_colors = \
6$(am__tty_colors_dummy); \
7test "X$(AM_COLOR_TESTS)" != Xno \
8&& test "X$$TERM" != Xdumb \
9&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
10&& { \
11 am__color_tests=yes; \
12 red=''; \
13 grn=''; \
14 lgn=''; \
15 blu=''; \
16 mgn=''; \
17 brg=''; \
18 std=''; \
19}
20
21am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
22am__vpath_adj = case $$p in \
23 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
24 *) f=$$p;; \
25 esac;
26am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
27am__rst_section = { sed 'p;s/./=/g;' && echo; }
28am__sh_e_setup = case $$- in *e*) set +e;; esac
29
30am__common_driver_flags = \
31 --color-tests "$$am__color_tests" \
32 --enable-hard-errors "$$am__enable_hard_errors" \
33 --expect-failure "$$am__expect_failure"
34am__check_pre = \
35$(am__sh_e_setup); \
36$(am__vpath_adj_setup) $(am__vpath_adj) \
37$(am__tty_colors); \
38srcdir=$(srcdir); export srcdir; \
39am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \
40test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \
41if test -f "./$$f"; then dir=./; \
42elif test -f "$$f"; then dir=; \
43else dir="$(srcdir)/"; fi; \
44tst=$$dir$$f; log='$@'; \
45if test -n '$(DISABLE_HARD_ERRORS)'; then \
46 am__enable_hard_errors=no; \
47else \
48 am__enable_hard_errors=yes; \
49fi; \
50$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
51
52am__set_TESTS_bases = \
53 bases='$(TEST_LOGS)'; \
54 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
55 bases=`echo $$bases`
56
57RECHECK_LOGS = $(TEST_LOGS)
58TEST_SUITE_LOG = test-suite.log
59am__test_logs1 = $(TESTS:=.log)
60am__test_logs2 = $(am__test_logs1:.log=.log)
61TEST_LOGS = $(am__test_logs2:.sh.log=.log)
62SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
63SH_LOG_COMPILE = $(SH_LOG_COMPILER)
64
65am__set_b = \
66 case '$@' in \
67 */*) \
68 case '$*' in \
69 */*) b='$*';; \
70 *) b=`echo '$@' | sed 's/\.log$$//'`; \
71 esac;; \
72 *) \
73 b='$*';; \
74 esac
75
76MKDIR_P = /bin/mkdir -p
77SHELL = /bin/bash
78VERSION = 3.1
79PACKAGE_STRING = GNU parted 3.1
80PACKAGE_BUGREPORT = bug-parted@gnu.org
81abs_srcdir = $(PWD)
82abs_top_builddir = $(PWD)/..
83abs_top_srcdir = $(PWD)/..
84srcdir = .
85top_srcdir = ..
86subdir = tests
87SH_LOG_COMPILER = $(SHELL)
88
89TESTS = \
90 help-version.sh \
91 t0000-basic.sh \
92 t0001-tiny.sh \
93 t0010-script-no-ctrl-chars.sh \
94 t0100-print.sh \
95 t0101-print-empty.sh \
96 t0200-gpt.sh \
97 t0201-gpt.sh \
98 t0202-gpt-pmbr.sh \
99 t0203-gpt-tiny-device-abort.sh \
100 t0203-gpt-shortened-device-primary-valid.sh \
101 t0205-gpt-list-clobbers-pmbr.sh \
102 t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \
103 t0207-IEC-binary-notation.sh \
104 t0208-mkpart-end-in-IEC.sh \
105 t0209-gpt-pmbr_boot.sh \
106 t0210-gpt-resized-partition-entry-array.sh \
107 t0211-gpt-rewrite-header.sh \
108 t0212-gpt-many-partitions.sh \
109 t0220-gpt-msftres.sh \
110 t0250-gpt.sh \
111 t0280-gpt-corrupt.sh \
112 t0300-dos-on-gpt.sh \
113 t0400-loop-clobber-infloop.sh \
114 t0500-dup-clobber.sh \
115 t0501-duplicate.sh \
116 t1100-busy-label.sh \
117 t1101-busy-partition.sh \
118 t1700-probe-fs.sh \
119 t2200-dos-label-recog.sh \
120 t2201-pc98-label-recog.sh \
121 t2300-dos-label-extended-bootcode.sh \
122 t2310-dos-extended-2-sector-min-offset.sh \
123 t2400-dos-hfs-partition-type.sh \
124 t2500-probe-corrupt-hfs.sh \
125 t3000-resize-fs.sh \
126 t3200-type-change.sh \
127 t3300-palo-prep.sh \
128 t3310-flags.sh \
129 t3400-whole-disk-FAT-partition.sh \
130 t4000-sun-raid-type.sh \
131 t4001-sun-vtoc.sh \
132 t4100-msdos-partition-limits.sh \
133 t4100-dvh-partition-limits.sh \
134 t4100-msdos-starting-sector.sh \
135 t4200-partprobe.sh \
136 t4300-nilfs2-tiny.sh \
137 t5000-tags.sh \
138 t6000-dm.sh \
139 t6001-psep.sh \
140 t6100-mdraid-partitions.sh \
141 t7000-scripting.sh \
142 t8000-loop.sh \
143 t8001-loop-blkpg.sh \
144 t9010-big-sector.sh \
145 t9020-alignment.sh \
146 t9021-maxima.sh \
147 t9022-one-unit-snap.sh \
148 t9023-value-lt-one.sh \
149 t9030-align-check.sh \
150 t9040-many-partitions.sh \
151 t9041-undetected-in-use-16th-partition.sh \
152 t9042-dos-partition-limit.sh \
153 t9050-partition-table-types.sh
154
155TESTS_ENVIRONMENT = \
156 export \
157 abs_top_builddir='$(abs_top_builddir)' \
158 abs_top_srcdir='$(abs_top_srcdir)' \
159 abs_srcdir='$(abs_srcdir)' \
160 built_programs=parted \
161 srcdir='$(srcdir)' \
162 top_srcdir='$(top_srcdir)' \
163 VERSION=$(VERSION) \
164 ; 9>&2
165
166.SUFFIXES: .log
167
168$(TEST_SUITE_LOG): $(TEST_LOGS)
169 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
170 ws='[ ]'; \
171 results=`for b in $$bases; do echo $$b.trs; done`; \
172 test -n "$$results" || results=/dev/null; \
173 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
174 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
175 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
176 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
177 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
178 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
179 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
180 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
181 success=true; \
182 else \
183 success=false; \
184 fi; \
185 br='==================='; br=$$br$$br$$br$$br; \
186 result_count () \
187 { \
188 if test x"$$1" = x"--maybe-color"; then \
189 maybe_colorize=yes; \
190 elif test x"$$1" = x"--no-color"; then \
191 maybe_colorize=no; \
192 else \
193 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
194 fi; \
195 shift; \
196 desc=$$1 count=$$2; \
197 if test $$maybe_colorize = yes && test $$count -gt 0; then \
198 color_start=$$3 color_end=$$std; \
199 else \
200 color_start= color_end=; \
201 fi; \
202 echo "$${color_start}# $$desc $$count$${color_end}"; \
203 }; \
204 create_testsuite_report () \
205 { \
206 result_count $$1 "TOTAL:" $$all "$$brg"; \
207 result_count $$1 "PASS: " $$pass "$$grn"; \
208 result_count $$1 "SKIP: " $$skip "$$blu"; \
209 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
210 result_count $$1 "FAIL: " $$fail "$$red"; \
211 result_count $$1 "XPASS:" $$xpass "$$red"; \
212 result_count $$1 "ERROR:" $$error "$$mgn"; \
213 }; \
214 { \
215 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
216 $(am__rst_title); \
217 create_testsuite_report --no-color; \
218 echo; \
219 echo ".. contents:: :depth: 2"; \
220 echo; \
221 for i in $$bases; do \
222 if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \
223 >/dev/null; then continue; \
224 fi; \
225 glob_res=`sed -n -e "s/$$ws*$$//" \
226 -e "s/^$$ws*:global-test-result:$$ws*//p" \
227 $$i.trs`; \
228 test -n "$$glob_res" || glob_res=RUN; \
229 echo "$$glob_res: $$i" | $(am__rst_section); \
230 if test ! -r $$i.log; then \
231 echo "fatal: making $@: $$i.log is unreadable" >&2; \
232 exit 1; \
233 fi; \
234 cat $$i.log; echo; \
235 done; \
236 } >$(TEST_SUITE_LOG).tmp; \
237 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
238 if $$success; then \
239 col="$$grn"; \
240 else \
241 col="$$red"; \
242 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
243 fi; \
244 echo "$${col}$$br$${std}"; \
245 echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
246 echo "$${col}$$br$${std}"; \
247 create_testsuite_report --maybe-color; \
248 echo "$$col$$br$$std"; \
249 if $$success; then :; else \
250 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
251 if test -n "$(PACKAGE_BUGREPORT)"; then \
252 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
253 fi; \
254 echo "$$col$$br$$std"; \
255 fi; \
256 $$success || exit 1
257
258check-TESTS:
259 @if test $@ != recheck; then \
260 list='$(RECHECK_LOGS)'; \
261 test -z "$$list" || rm -f $$list; \
262 fi
263 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
264 @ws='[ ]'; \
265 log_list='' trs_list=''; $(am__set_TESTS_bases); \
266 for i in $$bases; do \
267 if test -z "$$log_list"; then \
268 log_list="$$i.log"; \
269 else \
270 log_list="$$log_list $$i.log"; \
271 fi; \
272 if test -z "$$trs_list"; then \
273 trs_list="$$i.trs"; \
274 else \
275 trs_list="$$trs_list $$i.trs"; \
276 fi; \
277 done; \
278 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
279
280.sh.log:
281 @p='$<'; \
282 $(am__set_b); \
283 $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
284 --log-file $$b.log --trs-file $$b.trs \
285 $(am__common_driver_flags) -- $(SH_LOG_COMPILE) "$$tst"