0 | |
Description: Regenerate the testsuite script
|
1 | |
Some of the patches added new tests and they were not executed.
|
2 | |
This patch updates the testsuite script so that they are executed.
|
3 | |
.
|
4 | |
To regenerate the tests/testsuite you need a tests/testsuite.at file
|
5 | |
(wich is missing in the package) and you need to run "make check" to let
|
6 | |
it update the file (note that debian/rules touches multiple files to
|
7 | |
avoid the regeneration!).
|
8 | |
.
|
9 | |
You can find the testsuite.at file here on the upstream git repo:
|
10 | |
http://git.savannah.gnu.org/cgit/cpio.git/tree/tests/testsuite.at?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
|
11 | |
.
|
12 | |
The "m4_include([symlink-to-stdout.at])" line must be left out as it's
|
13 | |
not part of this version...
|
14 | |
Author: Raphaël Hertzog <hertzog@debian.org>
|
15 | |
Origin: vendor
|
16 | |
Forwarded: not-needed
|
17 | |
Last-Update: 2016-02-12
|
18 | |
Updated-by: Santiago R.R. <santiagorr@riseup.net>
|
19 | |
|
20 | |
---
|
21 | |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
22 | |
--- a/tests/testsuite
|
23 | |
+++ b/tests/testsuite
|
24 | |
@@ -1,17 +1,17 @@
|
25 | |
#! /bin/sh
|
26 | |
-# Generated from testsuite.at by GNU Autoconf 2.63.
|
27 | |
+# Generated from testsuite.at by GNU Autoconf 2.67.
|
28 | |
+#
|
29 | |
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
30 | |
#
|
31 | |
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
32 | |
-# Free Software Foundation, Inc.
|
33 | |
# This test suite is free software; the Free Software Foundation gives
|
34 | |
# unlimited permission to copy, distribute and modify it.
|
35 | |
-## --------------------- ##
|
36 | |
-## M4sh Initialization. ##
|
37 | |
-## --------------------- ##
|
38 | |
+## -------------------- ##
|
39 | |
+## M4sh Initialization. ##
|
40 | |
+## -------------------- ##
|
41 | |
|
42 | |
# Be more Bourne compatible
|
43 | |
DUALCASE=1; export DUALCASE # for MKS sh
|
44 | |
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
45 | |
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
|
46 | |
emulate sh
|
47 | |
NULLCMD=:
|
48 | |
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
|
49 | |
@@ -19,23 +19,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
50 | |
alias -g '${1+"$@"}'='"$@"'
|
51 | |
setopt NO_GLOB_SUBST
|
52 | |
else
|
53 | |
- case `(set -o) 2>/dev/null` in
|
54 | |
- *posix*) set -o posix ;;
|
55 | |
+ case `(set -o) 2>/dev/null` in #(
|
56 | |
+ *posix*) :
|
57 | |
+ set -o posix ;; #(
|
58 | |
+ *) :
|
59 | |
+ ;;
|
60 | |
esac
|
61 | |
-
|
62 | |
fi
|
63 | |
|
64 | |
|
65 | |
-
|
66 | |
-
|
67 | |
-# PATH needs CR
|
68 | |
-# Avoid depending upon Character Ranges.
|
69 | |
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
|
70 | |
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
71 | |
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
|
72 | |
-as_cr_digits='0123456789'
|
73 | |
-as_cr_alnum=$as_cr_Letters$as_cr_digits
|
74 | |
-
|
75 | |
as_nl='
|
76 | |
'
|
77 | |
export as_nl
|
78 | |
@@ -43,7 +35,13 @@ export as_nl
|
79 | |
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
|
80 | |
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
|
81 | |
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
|
82 | |
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
|
83 | |
+# Prefer a ksh shell builtin over an external printf program on Solaris,
|
84 | |
+# but without wasting forks for bash or zsh.
|
85 | |
+if test -z "$BASH_VERSION$ZSH_VERSION" \
|
86 | |
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
|
87 | |
+ as_echo='print -r --'
|
88 | |
+ as_echo_n='print -rn --'
|
89 | |
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
|
90 | |
as_echo='printf %s\n'
|
91 | |
as_echo_n='printf %s'
|
92 | |
else
|
93 | |
@@ -54,7 +52,7 @@ else
|
94 | |
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
|
95 | |
as_echo_n_body='eval
|
96 | |
arg=$1;
|
97 | |
- case $arg in
|
98 | |
+ case $arg in #(
|
99 | |
*"$as_nl"*)
|
100 | |
expr "X$arg" : "X\\(.*\\)$as_nl";
|
101 | |
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
|
102 | |
@@ -77,13 +75,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
|
103 | |
}
|
104 | |
fi
|
105 | |
|
106 | |
-# Support unset when possible.
|
107 | |
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
|
108 | |
- as_unset=unset
|
109 | |
-else
|
110 | |
- as_unset=false
|
111 | |
-fi
|
112 | |
-
|
113 | |
|
114 | |
# IFS
|
115 | |
# We need space, tab and new line, in precisely that order. Quoting is
|
116 | |
@@ -93,15 +84,15 @@ fi
|
117 | |
IFS=" "" $as_nl"
|
118 | |
|
119 | |
# Find who we are. Look in the path if we contain no directory separator.
|
120 | |
-case $0 in
|
121 | |
+case $0 in #((
|
122 | |
*[\\/]* ) as_myself=$0 ;;
|
123 | |
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
124 | |
for as_dir in $PATH
|
125 | |
do
|
126 | |
IFS=$as_save_IFS
|
127 | |
test -z "$as_dir" && as_dir=.
|
128 | |
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
|
129 | |
-done
|
130 | |
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
|
131 | |
+ done
|
132 | |
IFS=$as_save_IFS
|
133 | |
|
134 | |
;;
|
135 | |
@@ -113,12 +104,16 @@ if test "x$as_myself" = x; then
|
136 | |
fi
|
137 | |
if test ! -f "$as_myself"; then
|
138 | |
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
|
139 | |
- { (exit 1); exit 1; }
|
140 | |
+ exit 1
|
141 | |
fi
|
142 | |
|
143 | |
-# Work around bugs in pre-3.0 UWIN ksh.
|
144 | |
-for as_var in ENV MAIL MAILPATH
|
145 | |
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
|
146 | |
+# Unset variables that we do not need and which cause bugs (e.g. in
|
147 | |
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
|
148 | |
+# suppresses any "Segmentation fault" message there. '((' could
|
149 | |
+# trigger a bug in pdksh 5.2.14.
|
150 | |
+for as_var in BASH_ENV ENV MAIL MAILPATH
|
151 | |
+do eval test x\${$as_var+set} = xset \
|
152 | |
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
|
153 | |
done
|
154 | |
PS1='$ '
|
155 | |
PS2='> '
|
156 | |
@@ -130,330 +125,299 @@ export LC_ALL
|
157 | |
LANGUAGE=C
|
158 | |
export LANGUAGE
|
159 | |
|
160 | |
-# Required to use basename.
|
161 | |
-if expr a : '\(a\)' >/dev/null 2>&1 &&
|
162 | |
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
|
163 | |
- as_expr=expr
|
164 | |
-else
|
165 | |
- as_expr=false
|
166 | |
-fi
|
167 | |
-
|
168 | |
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
|
169 | |
- as_basename=basename
|
170 | |
-else
|
171 | |
- as_basename=false
|
172 | |
-fi
|
173 | |
-
|
174 | |
-
|
175 | |
-# Name of the executable.
|
176 | |
-as_me=`$as_basename -- "$0" ||
|
177 | |
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
|
178 | |
- X"$0" : 'X\(//\)$' \| \
|
179 | |
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
|
180 | |
-$as_echo X/"$0" |
|
181 | |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
|
182 | |
- s//\1/
|
183 | |
- q
|
184 | |
- }
|
185 | |
- /^X\/\(\/\/\)$/{
|
186 | |
- s//\1/
|
187 | |
- q
|
188 | |
- }
|
189 | |
- /^X\/\(\/\).*/{
|
190 | |
- s//\1/
|
191 | |
- q
|
192 | |
- }
|
193 | |
- s/.*/./; q'`
|
194 | |
-
|
195 | |
# CDPATH.
|
196 | |
-$as_unset CDPATH
|
197 | |
-
|
198 | |
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
199 | |
|
200 | |
if test "x$CONFIG_SHELL" = x; then
|
201 | |
- if (eval ":") 2>/dev/null; then
|
202 | |
- as_have_required=yes
|
203 | |
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
|
204 | |
+ emulate sh
|
205 | |
+ NULLCMD=:
|
206 | |
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
|
207 | |
+ # is contrary to our usage. Disable this feature.
|
208 | |
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
|
209 | |
+ setopt NO_GLOB_SUBST
|
210 | |
else
|
211 | |
- as_have_required=no
|
212 | |
+ case \`(set -o) 2>/dev/null\` in #(
|
213 | |
+ *posix*) :
|
214 | |
+ set -o posix ;; #(
|
215 | |
+ *) :
|
216 | |
+ ;;
|
217 | |
+esac
|
218 | |
fi
|
219 | |
-
|
220 | |
- if test $as_have_required = yes && (eval ":
|
221 | |
-(as_func_return () {
|
222 | |
- (exit \$1)
|
223 | |
-}
|
224 | |
-as_func_success () {
|
225 | |
- as_func_return 0
|
226 | |
-}
|
227 | |
-as_func_failure () {
|
228 | |
- as_func_return 1
|
229 | |
-}
|
230 | |
-as_func_ret_success () {
|
231 | |
- return 0
|
232 | |
-}
|
233 | |
-as_func_ret_failure () {
|
234 | |
- return 1
|
235 | |
-}
|
236 | |
+"
|
237 | |
+ as_required="as_fn_return () { (exit \$1); }
|
238 | |
+as_fn_success () { as_fn_return 0; }
|
239 | |
+as_fn_failure () { as_fn_return 1; }
|
240 | |
+as_fn_ret_success () { return 0; }
|
241 | |
+as_fn_ret_failure () { return 1; }
|
242 | |
|
243 | |
exitcode=0
|
244 | |
-if as_func_success; then
|
245 | |
- :
|
246 | |
-else
|
247 | |
- exitcode=1
|
248 | |
- echo as_func_success failed.
|
249 | |
-fi
|
250 | |
-
|
251 | |
-if as_func_failure; then
|
252 | |
- exitcode=1
|
253 | |
- echo as_func_failure succeeded.
|
254 | |
-fi
|
255 | |
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
|
256 | |
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
|
257 | |
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
|
258 | |
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
|
259 | |
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
|
260 | |
|
261 | |
-if as_func_ret_success; then
|
262 | |
- :
|
263 | |
else
|
264 | |
- exitcode=1
|
265 | |
- echo as_func_ret_success failed.
|
266 | |
+ exitcode=1; echo positional parameters were not saved.
|
267 | |
fi
|
268 | |
-
|
269 | |
-if as_func_ret_failure; then
|
270 | |
- exitcode=1
|
271 | |
- echo as_func_ret_failure succeeded.
|
272 | |
-fi
|
273 | |
-
|
274 | |
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
|
275 | |
- :
|
276 | |
+test x\$exitcode = x0 || exit 1"
|
277 | |
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
|
278 | |
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
|
279 | |
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
|
280 | |
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
|
281 | |
+test \$(( 1 + 1 )) = 2 || exit 1"
|
282 | |
+ if (eval "$as_required") 2>/dev/null; then :
|
283 | |
+ as_have_required=yes
|
284 | |
else
|
285 | |
- exitcode=1
|
286 | |
- echo positional parameters were not saved.
|
287 | |
+ as_have_required=no
|
288 | |
fi
|
289 | |
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
|
290 | |
|
291 | |
-test \$exitcode = 0) || { (exit 1); exit 1; }
|
292 | |
-
|
293 | |
-(
|
294 | |
- as_lineno_1=\$LINENO
|
295 | |
- as_lineno_2=\$LINENO
|
296 | |
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
|
297 | |
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
|
298 | |
-") 2> /dev/null; then
|
299 | |
- :
|
300 | |
else
|
301 | |
- as_candidate_shells=
|
302 | |
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
303 | |
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
304 | |
+as_found=false
|
305 | |
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
|
306 | |
do
|
307 | |
IFS=$as_save_IFS
|
308 | |
test -z "$as_dir" && as_dir=.
|
309 | |
- case $as_dir in
|
310 | |
+ as_found=:
|
311 | |
+ case $as_dir in #(
|
312 | |
/*)
|
313 | |
for as_base in sh bash ksh sh5; do
|
314 | |
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
|
315 | |
+ # Try only shells that exist, to save several forks.
|
316 | |
+ as_shell=$as_dir/$as_base
|
317 | |
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
|
318 | |
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
|
319 | |
+ CONFIG_SHELL=$as_shell as_have_required=yes
|
320 | |
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
|
321 | |
+ break 2
|
322 | |
+fi
|
323 | |
+fi
|
324 | |
done;;
|
325 | |
esac
|
326 | |
+ as_found=false
|
327 | |
done
|
328 | |
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
|
329 | |
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
|
330 | |
+ CONFIG_SHELL=$SHELL as_have_required=yes
|
331 | |
+fi; }
|
332 | |
IFS=$as_save_IFS
|
333 | |
|
334 | |
|
335 | |
- for as_shell in $as_candidate_shells $SHELL; do
|
336 | |
- # Try only shells that exist, to save several forks.
|
337 | |
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
|
338 | |
- { ("$as_shell") 2> /dev/null <<\_ASEOF
|
339 | |
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
340 | |
- emulate sh
|
341 | |
- NULLCMD=:
|
342 | |
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
|
343 | |
- # is contrary to our usage. Disable this feature.
|
344 | |
- alias -g '${1+"$@"}'='"$@"'
|
345 | |
- setopt NO_GLOB_SUBST
|
346 | |
-else
|
347 | |
- case `(set -o) 2>/dev/null` in
|
348 | |
- *posix*) set -o posix ;;
|
349 | |
-esac
|
350 | |
-
|
351 | |
-fi
|
352 | |
-
|
353 | |
-
|
354 | |
-:
|
355 | |
-_ASEOF
|
356 | |
-}; then
|
357 | |
- CONFIG_SHELL=$as_shell
|
358 | |
- as_have_required=yes
|
359 | |
- if { "$as_shell" 2> /dev/null <<\_ASEOF
|
360 | |
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
361 | |
- emulate sh
|
362 | |
- NULLCMD=:
|
363 | |
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
|
364 | |
- # is contrary to our usage. Disable this feature.
|
365 | |
- alias -g '${1+"$@"}'='"$@"'
|
366 | |
- setopt NO_GLOB_SUBST
|
367 | |
-else
|
368 | |
- case `(set -o) 2>/dev/null` in
|
369 | |
- *posix*) set -o posix ;;
|
370 | |
-esac
|
371 | |
-
|
372 | |
-fi
|
373 | |
-
|
374 | |
-
|
375 | |
-:
|
376 | |
-(as_func_return () {
|
377 | |
- (exit $1)
|
378 | |
-}
|
379 | |
-as_func_success () {
|
380 | |
- as_func_return 0
|
381 | |
-}
|
382 | |
-as_func_failure () {
|
383 | |
- as_func_return 1
|
384 | |
-}
|
385 | |
-as_func_ret_success () {
|
386 | |
- return 0
|
387 | |
-}
|
388 | |
-as_func_ret_failure () {
|
389 | |
- return 1
|
390 | |
-}
|
391 | |
-
|
392 | |
-exitcode=0
|
393 | |
-if as_func_success; then
|
394 | |
- :
|
395 | |
-else
|
396 | |
- exitcode=1
|
397 | |
- echo as_func_success failed.
|
398 | |
-fi
|
399 | |
-
|
400 | |
-if as_func_failure; then
|
401 | |
- exitcode=1
|
402 | |
- echo as_func_failure succeeded.
|
403 | |
-fi
|
404 | |
-
|
405 | |
-if as_func_ret_success; then
|
406 | |
- :
|
407 | |
-else
|
408 | |
- exitcode=1
|
409 | |
- echo as_func_ret_success failed.
|
410 | |
-fi
|
411 | |
-
|
412 | |
-if as_func_ret_failure; then
|
413 | |
- exitcode=1
|
414 | |
- echo as_func_ret_failure succeeded.
|
415 | |
-fi
|
416 | |
-
|
417 | |
-if ( set x; as_func_ret_success y && test x = "$1" ); then
|
418 | |
- :
|
419 | |
-else
|
420 | |
- exitcode=1
|
421 | |
- echo positional parameters were not saved.
|
422 | |
+ if test "x$CONFIG_SHELL" != x; then :
|
423 | |
+ # We cannot yet assume a decent shell, so we have to provide a
|
424 | |
+ # neutralization value for shells without unset; and this also
|
425 | |
+ # works around shells that cannot unset nonexistent variables.
|
426 | |
+ BASH_ENV=/dev/null
|
427 | |
+ ENV=/dev/null
|
428 | |
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
429 | |
+ export CONFIG_SHELL
|
430 | |
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
|
431 | |
fi
|
432 | |
|
433 | |
-test $exitcode = 0) || { (exit 1); exit 1; }
|
434 | |
-
|
435 | |
-(
|
436 | |
- as_lineno_1=$LINENO
|
437 | |
- as_lineno_2=$LINENO
|
438 | |
- test "x$as_lineno_1" != "x$as_lineno_2" &&
|
439 | |
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
|
440 | |
-
|
441 | |
-_ASEOF
|
442 | |
-}; then
|
443 | |
- break
|
444 | |
+ if test x$as_have_required = xno; then :
|
445 | |
+ $as_echo "$0: This script requires a shell more modern than all"
|
446 | |
+ $as_echo "$0: the shells that I found on your system."
|
447 | |
+ if test x${ZSH_VERSION+set} = xset ; then
|
448 | |
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
|
449 | |
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
|
450 | |
+ else
|
451 | |
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
|
452 | |
+$0: including any error possibly output before this
|
453 | |
+$0: message. Then install a modern shell, or manually run
|
454 | |
+$0: the script under such a shell if you do have one."
|
455 | |
+ fi
|
456 | |
+ exit 1
|
457 | |
fi
|
458 | |
-
|
459 | |
fi
|
460 | |
-
|
461 | |
- done
|
462 | |
-
|
463 | |
- if test "x$CONFIG_SHELL" != x; then
|
464 | |
- for as_var in BASH_ENV ENV
|
465 | |
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
|
466 | |
- done
|
467 | |
- export CONFIG_SHELL
|
468 | |
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
|
469 | |
fi
|
470 | |
+SHELL=${CONFIG_SHELL-/bin/sh}
|
471 | |
+export SHELL
|
472 | |
+# Unset more variables known to interfere with behavior of common tools.
|
473 | |
+CLICOLOR_FORCE= GREP_OPTIONS=
|
474 | |
+unset CLICOLOR_FORCE GREP_OPTIONS
|
475 | |
|
476 | |
+## --------------------- ##
|
477 | |
+## M4sh Shell Functions. ##
|
478 | |
+## --------------------- ##
|
479 | |
+# as_fn_unset VAR
|
480 | |
+# ---------------
|
481 | |
+# Portably unset VAR.
|
482 | |
+as_fn_unset ()
|
483 | |
+{
|
484 | |
+ { eval $1=; unset $1;}
|
485 | |
+}
|
486 | |
+as_unset=as_fn_unset
|
487 | |
|
488 | |
- if test $as_have_required = no; then
|
489 | |
- echo This script requires a shell more modern than all the
|
490 | |
- echo shells that I found on your system. Please install a
|
491 | |
- echo modern shell, or manually run the script under such a
|
492 | |
- echo shell if you do have one.
|
493 | |
- { (exit 1); exit 1; }
|
494 | |
-fi
|
495 | |
-
|
496 | |
+# as_fn_set_status STATUS
|
497 | |
+# -----------------------
|
498 | |
+# Set $? to STATUS, without forking.
|
499 | |
+as_fn_set_status ()
|
500 | |
+{
|
501 | |
+ return $1
|
502 | |
+} # as_fn_set_status
|
503 | |
|
504 | |
-fi
|
505 | |
+# as_fn_exit STATUS
|
506 | |
+# -----------------
|
507 | |
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
|
508 | |
+as_fn_exit ()
|
509 | |
+{
|
510 | |
+ set +e
|
511 | |
+ as_fn_set_status $1
|
512 | |
+ exit $1
|
513 | |
+} # as_fn_exit
|
514 | |
|
515 | |
-fi
|
516 | |
+# as_fn_mkdir_p
|
517 | |
+# -------------
|
518 | |
+# Create "$as_dir" as a directory, including parents if necessary.
|
519 | |
+as_fn_mkdir_p ()
|
520 | |
+{
|
521 | |
|
522 | |
+ case $as_dir in #(
|
523 | |
+ -*) as_dir=./$as_dir;;
|
524 | |
+ esac
|
525 | |
+ test -d "$as_dir" || eval $as_mkdir_p || {
|
526 | |
+ as_dirs=
|
527 | |
+ while :; do
|
528 | |
+ case $as_dir in #(
|
529 | |
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
|
530 | |
+ *) as_qdir=$as_dir;;
|
531 | |
+ esac
|
532 | |
+ as_dirs="'$as_qdir' $as_dirs"
|
533 | |
+ as_dir=`$as_dirname -- "$as_dir" ||
|
534 | |
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
535 | |
+ X"$as_dir" : 'X\(//\)[^/]' \| \
|
536 | |
+ X"$as_dir" : 'X\(//\)$' \| \
|
537 | |
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
|
538 | |
+$as_echo X"$as_dir" |
|
539 | |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
540 | |
+ s//\1/
|
541 | |
+ q
|
542 | |
+ }
|
543 | |
+ /^X\(\/\/\)[^/].*/{
|
544 | |
+ s//\1/
|
545 | |
+ q
|
546 | |
+ }
|
547 | |
+ /^X\(\/\/\)$/{
|
548 | |
+ s//\1/
|
549 | |
+ q
|
550 | |
+ }
|
551 | |
+ /^X\(\/\).*/{
|
552 | |
+ s//\1/
|
553 | |
+ q
|
554 | |
+ }
|
555 | |
+ s/.*/./; q'`
|
556 | |
+ test -d "$as_dir" && break
|
557 | |
+ done
|
558 | |
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
|
559 | |
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
|
560 | |
+
|
561 | |
+
|
562 | |
+} # as_fn_mkdir_p
|
563 | |
+# as_fn_append VAR VALUE
|
564 | |
+# ----------------------
|
565 | |
+# Append the text in VALUE to the end of the definition contained in VAR. Take
|
566 | |
+# advantage of any shell optimizations that allow amortized linear growth over
|
567 | |
+# repeated appends, instead of the typical quadratic growth present in naive
|
568 | |
+# implementations.
|
569 | |
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
|
570 | |
+ eval 'as_fn_append ()
|
571 | |
+ {
|
572 | |
+ eval $1+=\$2
|
573 | |
+ }'
|
574 | |
+else
|
575 | |
+ as_fn_append ()
|
576 | |
+ {
|
577 | |
+ eval $1=\$$1\$2
|
578 | |
+ }
|
579 | |
+fi # as_fn_append
|
580 | |
+
|
581 | |
+# as_fn_arith ARG...
|
582 | |
+# ------------------
|
583 | |
+# Perform arithmetic evaluation on the ARGs, and store the result in the
|
584 | |
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
|
585 | |
+# must be portable across $(()) and expr.
|
586 | |
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
|
587 | |
+ eval 'as_fn_arith ()
|
588 | |
+ {
|
589 | |
+ as_val=$(( $* ))
|
590 | |
+ }'
|
591 | |
+else
|
592 | |
+ as_fn_arith ()
|
593 | |
+ {
|
594 | |
+ as_val=`expr "$@" || test $? -eq 1`
|
595 | |
+ }
|
596 | |
+fi # as_fn_arith
|
597 | |
|
598 | |
|
599 | |
-(eval "as_func_return () {
|
600 | |
- (exit \$1)
|
601 | |
-}
|
602 | |
-as_func_success () {
|
603 | |
- as_func_return 0
|
604 | |
-}
|
605 | |
-as_func_failure () {
|
606 | |
- as_func_return 1
|
607 | |
-}
|
608 | |
-as_func_ret_success () {
|
609 | |
- return 0
|
610 | |
-}
|
611 | |
-as_func_ret_failure () {
|
612 | |
- return 1
|
613 | |
-}
|
614 | |
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
|
615 | |
+# ----------------------------------------
|
616 | |
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
|
617 | |
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
|
618 | |
+# script with STATUS, using 1 if that was 0.
|
619 | |
+as_fn_error ()
|
620 | |
+{
|
621 | |
+ as_status=$1; test $as_status -eq 0 && as_status=1
|
622 | |
+ if test "$4"; then
|
623 | |
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
624 | |
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
|
625 | |
+ fi
|
626 | |
+ $as_echo "$as_me: error: $2" >&2
|
627 | |
+ as_fn_exit $as_status
|
628 | |
+} # as_fn_error
|
629 | |
|
630 | |
-exitcode=0
|
631 | |
-if as_func_success; then
|
632 | |
- :
|
633 | |
+if expr a : '\(a\)' >/dev/null 2>&1 &&
|
634 | |
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
|
635 | |
+ as_expr=expr
|
636 | |
else
|
637 | |
- exitcode=1
|
638 | |
- echo as_func_success failed.
|
639 | |
-fi
|
640 | |
-
|
641 | |
-if as_func_failure; then
|
642 | |
- exitcode=1
|
643 | |
- echo as_func_failure succeeded.
|
644 | |
+ as_expr=false
|
645 | |
fi
|
646 | |
|
647 | |
-if as_func_ret_success; then
|
648 | |
- :
|
649 | |
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
|
650 | |
+ as_basename=basename
|
651 | |
else
|
652 | |
- exitcode=1
|
653 | |
- echo as_func_ret_success failed.
|
654 | |
+ as_basename=false
|
655 | |
fi
|
656 | |
|
657 | |
-if as_func_ret_failure; then
|
658 | |
- exitcode=1
|
659 | |
- echo as_func_ret_failure succeeded.
|
660 | |
-fi
|
661 | |
+as_me=`$as_basename -- "$0" ||
|
662 | |
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
|
663 | |
+ X"$0" : 'X\(//\)$' \| \
|
664 | |
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
|
665 | |
+$as_echo X/"$0" |
|
666 | |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
|
667 | |
+ s//\1/
|
668 | |
+ q
|
669 | |
+ }
|
670 | |
+ /^X\/\(\/\/\)$/{
|
671 | |
+ s//\1/
|
672 | |
+ q
|
673 | |
+ }
|
674 | |
+ /^X\/\(\/\).*/{
|
675 | |
+ s//\1/
|
676 | |
+ q
|
677 | |
+ }
|
678 | |
+ s/.*/./; q'`
|
679 | |
|
680 | |
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
|
681 | |
- :
|
682 | |
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
|
683 | |
+ as_dirname=dirname
|
684 | |
else
|
685 | |
- exitcode=1
|
686 | |
- echo positional parameters were not saved.
|
687 | |
+ as_dirname=false
|
688 | |
fi
|
689 | |
|
690 | |
-test \$exitcode = 0") || {
|
691 | |
- echo No shell found that supports shell functions.
|
692 | |
- echo Please tell bug-autoconf@gnu.org about your system,
|
693 | |
- echo including any error possibly output before this message.
|
694 | |
- echo This can help us improve future autoconf versions.
|
695 | |
- echo Configuration will now proceed without shell functions.
|
696 | |
-}
|
697 | |
-
|
698 | |
-
|
699 | |
+# Avoid depending upon Character Ranges.
|
700 | |
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
|
701 | |
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
702 | |
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
|
703 | |
+as_cr_digits='0123456789'
|
704 | |
+as_cr_alnum=$as_cr_Letters$as_cr_digits
|
705 | |
|
706 | |
- as_lineno_1=$LINENO
|
707 | |
- as_lineno_2=$LINENO
|
708 | |
- test "x$as_lineno_1" != "x$as_lineno_2" &&
|
709 | |
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
|
710 | |
|
711 | |
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
|
712 | |
- # uniformly replaced by the line number. The first 'sed' inserts a
|
713 | |
- # line-number line after each line using $LINENO; the second 'sed'
|
714 | |
- # does the real work. The second script uses 'N' to pair each
|
715 | |
- # line-number line with the line containing $LINENO, and appends
|
716 | |
- # trailing '-' during substitution so that $LINENO is not a special
|
717 | |
- # case at line end.
|
718 | |
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
|
719 | |
- # scripts with optimization help from Paolo Bonzini. Blame Lee
|
720 | |
- # E. McMahon (1931-1989) for sed's syntax. :-)
|
721 | |
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
|
722 | |
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
|
723 | |
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
|
724 | |
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
|
725 | |
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
|
726 | |
sed -n '
|
727 | |
p
|
728 | |
/[$]LINENO/=
|
729 | |
@@ -470,9 +434,7 @@ test \$exitcode = 0") || {
|
730 | |
s/-\n.*//
|
731 | |
' >$as_me.lineno &&
|
732 | |
chmod +x "$as_me.lineno" ||
|
733 | |
- { { $as_echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
|
734 | |
-$as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
|
735 | |
- { (exit 1); exit 1; }; }
|
736 | |
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
|
737 | |
|
738 | |
# Don't try to exec as it changes $[0], causing all sort of problems
|
739 | |
# (the dirname of $[0] is not the place where we might find the
|
740 | |
@@ -482,29 +444,18 @@ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell"
|
741 | |
exit
|
742 | |
}
|
743 | |
|
744 | |
-
|
745 | |
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
|
746 | |
- as_dirname=dirname
|
747 | |
-else
|
748 | |
- as_dirname=false
|
749 | |
-fi
|
750 | |
-
|
751 | |
ECHO_C= ECHO_N= ECHO_T=
|
752 | |
-case `echo -n x` in
|
753 | |
+case `echo -n x` in #(((((
|
754 | |
-n*)
|
755 | |
- case `echo 'x\c'` in
|
756 | |
+ case `echo 'xy\c'` in
|
757 | |
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
|
758 | |
- *) ECHO_C='\c';;
|
759 | |
+ xy) ECHO_C='\c';;
|
760 | |
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
|
761 | |
+ ECHO_T=' ';;
|
762 | |
esac;;
|
763 | |
*)
|
764 | |
ECHO_N='-n';;
|
765 | |
esac
|
766 | |
-if expr a : '\(a\)' >/dev/null 2>&1 &&
|
767 | |
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
|
768 | |
- as_expr=expr
|
769 | |
-else
|
770 | |
- as_expr=false
|
771 | |
-fi
|
772 | |
|
773 | |
rm -f conf$$ conf$$.exe conf$$.file
|
774 | |
if test -d conf$$.dir; then
|
775 | |
@@ -534,7 +485,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
776 | |
rmdir conf$$.dir 2>/dev/null
|
777 | |
|
778 | |
if mkdir -p . 2>/dev/null; then
|
779 | |
- as_mkdir_p=:
|
780 | |
+ as_mkdir_p='mkdir -p "$as_dir"'
|
781 | |
else
|
782 | |
test -d ./-p && rmdir ./-p
|
783 | |
as_mkdir_p=false
|
784 | |
@@ -553,10 +504,10 @@ else
|
785 | |
if test -d "$1"; then
|
786 | |
test -d "$1/.";
|
787 | |
else
|
788 | |
- case $1 in
|
789 | |
+ case $1 in #(
|
790 | |
-*)set "./$1";;
|
791 | |
esac;
|
792 | |
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
|
793 | |
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
|
794 | |
???[sx]*):;;*)false;;esac;fi
|
795 | |
'\'' sh
|
796 | |
'
|
797 | |
@@ -591,6 +542,11 @@ at_errexit_p=false
|
798 | |
# Shall we be verbose? ':' means no, empty means yes.
|
799 | |
at_verbose=:
|
800 | |
at_quiet=
|
801 | |
+# Running several jobs in parallel, 0 means as many as test groups.
|
802 | |
+at_jobs=1
|
803 | |
+at_traceon=:
|
804 | |
+at_trace_echo=:
|
805 | |
+at_check_filter_trace=:
|
806 | |
|
807 | |
# Shall we keep the debug scripts? Must be `:' when the suite is
|
808 | |
# run by a debug script, so that the script doesn't remove itself.
|
809 | |
@@ -605,6 +561,8 @@ at_list_p=false
|
810 | |
at_clean=false
|
811 | |
# Test groups to run
|
812 | |
at_groups=
|
813 | |
+# Whether to rerun failed tests.
|
814 | |
+at_recheck=
|
815 | |
# Whether a write failure occurred
|
816 | |
at_write_fail=0
|
817 | |
|
818 | |
@@ -618,6 +576,8 @@ esac
|
819 | |
# Whether -C is in effect.
|
820 | |
at_change_dir=false
|
821 | |
|
822 | |
+# Whether to enable colored test results.
|
823 | |
+at_color=no
|
824 | |
# List of the tested programs.
|
825 | |
at_tested='cpio'
|
826 | |
# List of the all the test groups.
|
827 | |
@@ -638,11 +598,11 @@ at_help_all="1;version.at:19;cpio version;;
|
828 | |
9;setstat05.at:17;delayed setstat (umask, copy-pass);setstat debian=458079 setstat05;
|
829 | |
"
|
830 | |
|
831 | |
-# at_func_validate_ranges [NAME...]
|
832 | |
-# ---------------------------------
|
833 | |
-# Validate and normalize the test group number contained in each
|
834 | |
-# variable NAME. Leading zeroes are treated as decimal.
|
835 | |
-at_func_validate_ranges ()
|
836 | |
+# at_fn_validate_ranges NAME...
|
837 | |
+# -----------------------------
|
838 | |
+# Validate and normalize the test group number contained in each variable
|
839 | |
+# NAME. Leading zeroes are treated as decimal.
|
840 | |
+at_fn_validate_ranges ()
|
841 | |
{
|
842 | |
for at_grp
|
843 | |
do
|
844 | |
@@ -653,7 +613,7 @@ at_func_validate_ranges ()
|
845 | |
fi
|
846 | |
case $at_value in
|
847 | |
0*) # We want to treat leading 0 as decimal, like expr and test, but
|
848 | |
- # at_func_arith treats it as octal if it uses $(( )).
|
849 | |
+ # AS_VAR_ARITH treats it as octal if it uses $(( )).
|
850 | |
# With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
|
851 | |
# expr fork, but it is not worth the effort to determine if the
|
852 | |
# shell supports XSI when the user can just avoid leading 0.
|
853 | |
@@ -672,8 +632,8 @@ do
|
854 | |
fi
|
855 | |
|
856 | |
case $at_option in
|
857 | |
- *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
|
858 | |
- *) at_optarg= ;;
|
859 | |
+ *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
|
860 | |
+ *) at_optarg= ;;
|
861 | |
esac
|
862 | |
|
863 | |
# Accept the important Cygnus configure options, so we can diagnose typos.
|
864 | |
@@ -695,6 +655,19 @@ do
|
865 | |
at_clean=:
|
866 | |
;;
|
867 | |
|
868 | |
+ --color )
|
869 | |
+ at_color=always
|
870 | |
+ ;;
|
871 | |
+ --color=* )
|
872 | |
+ case $at_optarg in
|
873 | |
+ no | never | none) at_color=never ;;
|
874 | |
+ auto | tty | if-tty) at_color=auto ;;
|
875 | |
+ always | yes | force) at_color=always ;;
|
876 | |
+ *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
|
877 | |
+ as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
|
878 | |
+ esac
|
879 | |
+ ;;
|
880 | |
+
|
881 | |
--debug | -d )
|
882 | |
at_debug_p=:
|
883 | |
;;
|
884 | |
@@ -709,29 +682,31 @@ do
|
885 | |
;;
|
886 | |
|
887 | |
--trace | -x )
|
888 | |
- at_traceon='set -x'; at_traceoff='set +x'
|
889 | |
+ at_traceon='set -x'
|
890 | |
+ at_trace_echo=echo
|
891 | |
+ at_check_filter_trace=at_fn_filter_trace
|
892 | |
;;
|
893 | |
|
894 | |
[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
|
895 | |
- at_func_validate_ranges at_option
|
896 | |
- at_groups="$at_groups$at_option "
|
897 | |
+ at_fn_validate_ranges at_option
|
898 | |
+ as_fn_append at_groups "$at_option "
|
899 | |
;;
|
900 | |
|
901 | |
# Ranges
|
902 | |
[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
|
903 | |
at_range_start=`echo $at_option |tr -d X-`
|
904 | |
- at_func_validate_ranges at_range_start
|
905 | |
+ at_fn_validate_ranges at_range_start
|
906 | |
at_range=`$as_echo " $at_groups_all " | \
|
907 | |
sed -e 's/^.* \('$at_range_start' \)/\1/'`
|
908 | |
- at_groups="$at_groups$at_range "
|
909 | |
+ as_fn_append at_groups "$at_range "
|
910 | |
;;
|
911 | |
|
912 | |
-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
|
913 | |
at_range_end=`echo $at_option |tr -d X-`
|
914 | |
- at_func_validate_ranges at_range_end
|
915 | |
+ at_fn_validate_ranges at_range_end
|
916 | |
at_range=`$as_echo " $at_groups_all " | \
|
917 | |
sed -e 's/\( '$at_range_end'\) .*$/\1/'`
|
918 | |
- at_groups="$at_groups$at_range "
|
919 | |
+ as_fn_append at_groups "$at_range "
|
920 | |
;;
|
921 | |
|
922 | |
[0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
|
923 | |
@@ -747,11 +722,11 @@ do
|
924 | |
at_range_end=$at_range_start
|
925 | |
at_range_start=$at_tmp
|
926 | |
fi
|
927 | |
- at_func_validate_ranges at_range_start at_range_end
|
928 | |
+ at_fn_validate_ranges at_range_start at_range_end
|
929 | |
at_range=`$as_echo " $at_groups_all " | \
|
930 | |
sed -e 's/^.*\( '$at_range_start' \)/\1/' \
|
931 | |
-e 's/\( '$at_range_end'\) .*$/\1/'`
|
932 | |
- at_groups="$at_groups$at_range "
|
933 | |
+ as_fn_append at_groups "$at_range "
|
934 | |
;;
|
935 | |
|
936 | |
# Directory selection.
|
937 | |
@@ -761,6 +736,25 @@ do
|
938 | |
--directory=* )
|
939 | |
at_change_dir=:
|
940 | |
at_dir=$at_optarg
|
941 | |
+ if test x- = "x$at_dir" ; then
|
942 | |
+ at_dir=./-
|
943 | |
+ fi
|
944 | |
+ ;;
|
945 | |
+
|
946 | |
+ # Parallel execution.
|
947 | |
+ --jobs | -j )
|
948 | |
+ at_jobs=0
|
949 | |
+ ;;
|
950 | |
+ --jobs=* | -j[0-9]* )
|
951 | |
+ if test -n "$at_optarg"; then
|
952 | |
+ at_jobs=$at_optarg
|
953 | |
+ else
|
954 | |
+ at_jobs=`expr X$at_option : 'X-j\(.*\)'`
|
955 | |
+ fi
|
956 | |
+ case $at_jobs in *[!0-9]*)
|
957 | |
+ at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
|
958 | |
+ as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
|
959 | |
+ esac
|
960 | |
;;
|
961 | |
|
962 | |
# Keywords.
|
963 | |
@@ -791,7 +785,10 @@ do
|
964 | |
at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//' |
|
965 | |
tr "$as_nl" ' '
|
966 | |
`
|
967 | |
- at_groups="$at_groups$at_groups_selected "
|
968 | |
+ as_fn_append at_groups "$at_groups_selected "
|
969 | |
+ ;;
|
970 | |
+ --recheck)
|
971 | |
+ at_recheck=:
|
972 | |
;;
|
973 | |
|
974 | |
*=*)
|
975 | |
@@ -799,14 +796,12 @@ do
|
976 | |
# Reject names that are not valid shell variable names.
|
977 | |
case $at_envvar in
|
978 | |
'' | [0-9]* | *[!_$as_cr_alnum]* )
|
979 | |
- { { $as_echo "$as_me:$LINENO: error: invalid variable name: $at_envvar" >&5
|
980 | |
-$as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;}
|
981 | |
- { (exit 1); exit 1; }; } ;;
|
982 | |
+ as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
|
983 | |
esac
|
984 | |
at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
|
985 | |
# Export now, but save eval for later and for debug scripts.
|
986 | |
export $at_envvar
|
987 | |
- at_debug_args="$at_debug_args $at_envvar='$at_value'"
|
988 | |
+ as_fn_append at_debug_args " $at_envvar='$at_value'"
|
989 | |
;;
|
990 | |
|
991 | |
*) $as_echo "$as_me: invalid option: $at_option" >&2
|
992 | |
@@ -817,21 +812,44 @@ $as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;}
|
993 | |
done
|
994 | |
|
995 | |
# Verify our last option didn't require an argument
|
996 | |
-if test -n "$at_prev"; then
|
997 | |
- { { $as_echo "$as_me:$LINENO: error: \`$at_prev' requires an argument." >&5
|
998 | |
-$as_echo "$as_me: error: \`$at_prev' requires an argument." >&2;}
|
999 | |
- { (exit 1); exit 1; }; }
|
1000 | |
+if test -n "$at_prev"; then :
|
1001 | |
+ as_fn_error $? "\`$at_prev' requires an argument"
|
1002 | |
fi
|
1003 | |
|
1004 | |
+# The file containing the suite.
|
1005 | |
+at_suite_log=$at_dir/$as_me.log
|
1006 | |
|
1007 | |
# Selected test groups.
|
1008 | |
-if test -z "$at_groups"; then
|
1009 | |
+if test -z "$at_groups$at_recheck"; then
|
1010 | |
at_groups=$at_groups_all
|
1011 | |
else
|
1012 | |
+ if test -n "$at_recheck" && test -r "$at_suite_log"; then
|
1013 | |
+ at_oldfails=`sed -n '
|
1014 | |
+ /^Failed tests:$/,/^Skipped tests:$/{
|
1015 | |
+ s/^[ ]*\([1-9][0-9]*\):.*/\1/p
|
1016 | |
+ }
|
1017 | |
+ /^Unexpected passes:$/,/^## Detailed failed tests/{
|
1018 | |
+ s/^[ ]*\([1-9][0-9]*\):.*/\1/p
|
1019 | |
+ }
|
1020 | |
+ /^## Detailed failed tests/q
|
1021 | |
+ ' "$at_suite_log" | tr "$as_nl" ' '`
|
1022 | |
+ as_fn_append at_groups "$at_oldfails"
|
1023 | |
+ fi
|
1024 | |
# Sort the tests, removing duplicates.
|
1025 | |
at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu`
|
1026 | |
fi
|
1027 | |
|
1028 | |
+if test x"$at_color" = xalways \
|
1029 | |
+ || { test x"$at_color" = xauto && test -t 1; }; then
|
1030 | |
+ at_red=`printf '\033[0;31m'`
|
1031 | |
+ at_grn=`printf '\033[0;32m'`
|
1032 | |
+ at_lgn=`printf '\033[1;32m'`
|
1033 | |
+ at_blu=`printf '\033[1;34m'`
|
1034 | |
+ at_std=`printf '\033[m'`
|
1035 | |
+else
|
1036 | |
+ at_red= at_grn= at_lgn= at_blu= at_std=
|
1037 | |
+fi
|
1038 | |
+
|
1039 | |
# Help message.
|
1040 | |
if $at_help_p; then
|
1041 | |
cat <<_ATEOF || at_write_fail=1
|
1042 | |
@@ -840,16 +858,17 @@ Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
|
1043 | |
Run all the tests, or the selected TESTS, given by numeric ranges, and
|
1044 | |
save a detailed log file. Upon failure, create debugging scripts.
|
1045 | |
|
1046 | |
-You should not change environment variables unless explicitly passed
|
1047 | |
-as command line arguments. Set \`AUTOTEST_PATH' to select the executables
|
1048 | |
+Do not change environment variables directly. Instead, set them via
|
1049 | |
+command line arguments. Set \`AUTOTEST_PATH' to select the executables
|
1050 | |
to exercise. Each relative directory is expanded as build and source
|
1051 | |
-directories relatively to the top level of this distribution. E.g.,
|
1052 | |
+directories relative to the top level of this distribution.
|
1053 | |
+E.g., from within the build directory /tmp/foo-1.0, invoking this:
|
1054 | |
|
1055 | |
$ $0 AUTOTEST_PATH=bin
|
1056 | |
|
1057 | |
-possibly amounts into
|
1058 | |
+is equivalent to the following, assuming the source directory is /src/foo-1.0:
|
1059 | |
|
1060 | |
- PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
|
1061 | |
+ PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
|
1062 | |
_ATEOF
|
1063 | |
cat <<_ATEOF || at_write_fail=1
|
1064 | |
|
1065 | |
@@ -864,9 +883,14 @@ cat <<_ATEOF || at_write_fail=1
|
1066 | |
Execution tuning:
|
1067 | |
-C, --directory=DIR
|
1068 | |
change to directory DIR before starting
|
1069 | |
+ --color[=never|auto|always]
|
1070 | |
+ enable colored test results on terminal, or always
|
1071 | |
+ -j, --jobs[=N]
|
1072 | |
+ Allow N jobs at once; infinite jobs with no arg (default 1)
|
1073 | |
-k, --keywords=KEYWORDS
|
1074 | |
select the tests matching all the comma-separated KEYWORDS
|
1075 | |
multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
|
1076 | |
+ --recheck select all tests that failed or passed unexpectedly last time
|
1077 | |
-e, --errexit abort as soon as a test fails; implies --debug
|
1078 | |
-v, --verbose force more detailed output
|
1079 | |
default for debugging scripts
|
1080 | |
@@ -877,6 +901,7 @@ _ATEOF
|
1081 | |
cat <<_ATEOF || at_write_fail=1
|
1082 | |
|
1083 | |
Report bugs to <bug-cpio@gnu.org>.
|
1084 | |
+General help using GNU software: <http://www.gnu.org/gethelp/>.
|
1085 | |
_ATEOF
|
1086 | |
exit $at_write_fail
|
1087 | |
fi
|
1088 | |
@@ -901,26 +926,45 @@ _ATEOF
|
1089 | |
$as_echo "$at_groups$as_nl$at_help_all" |
|
1090 | |
awk 'BEGIN { FS = ";" }
|
1091 | |
NR == 1 {
|
1092 | |
- for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
|
1093 | |
+ for (n = split ($ 0, a, " "); n; n--)
|
1094 | |
+ selected[a[n]] = 1
|
1095 | |
next
|
1096 | |
}
|
1097 | |
- {
|
1098 | |
+ NF > 0 {
|
1099 | |
if (selected[$ 1]) {
|
1100 | |
printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
|
1101 | |
- if ($ 4) printf " %s\n", $ 4
|
1102 | |
+ if ($ 4) {
|
1103 | |
+ lmax = 79
|
1104 | |
+ indent = " "
|
1105 | |
+ line = indent
|
1106 | |
+ len = length (line)
|
1107 | |
+ n = split ($ 4, a, " ")
|
1108 | |
+ for (i = 1; i <= n; i++) {
|
1109 | |
+ l = length (a[i]) + 1
|
1110 | |
+ if (i > 1 && len + l > lmax) {
|
1111 | |
+ print line
|
1112 | |
+ line = indent " " a[i]
|
1113 | |
+ len = length (line)
|
1114 | |
+ } else {
|
1115 | |
+ line = line " " a[i]
|
1116 | |
+ len += l
|
1117 | |
+ }
|
1118 | |
+ }
|
1119 | |
+ if (n)
|
1120 | |
+ print line
|
1121 | |
+ }
|
1122 | |
}
|
1123 | |
}' || at_write_fail=1
|
1124 | |
exit $at_write_fail
|
1125 | |
fi
|
1126 | |
if $at_version_p; then
|
1127 | |
$as_echo "$as_me (GNU cpio 2.11)" &&
|
1128 | |
- cat <<\_ACEOF || at_write_fail=1
|
1129 | |
+ cat <<\_ATEOF || at_write_fail=1
|
1130 | |
|
1131 | |
-Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
1132 | |
-Free Software Foundation, Inc.
|
1133 | |
+Copyright (C) 2010 Free Software Foundation, Inc.
|
1134 | |
This test suite is free software; the Free Software Foundation gives
|
1135 | |
unlimited permission to copy, distribute and modify it.
|
1136 | |
-_ACEOF
|
1137 | |
+_ATEOF
|
1138 | |
exit $at_write_fail
|
1139 | |
fi
|
1140 | |
|
1141 | |
@@ -935,13 +979,8 @@ esac
|
1142 | |
|
1143 | |
# Take any -C into account.
|
1144 | |
if $at_change_dir ; then
|
1145 | |
- if test x- = "x$at_dir" ; then
|
1146 | |
- at_dir=./-
|
1147 | |
- fi
|
1148 | |
test x != "x$at_dir" && cd "$at_dir" \
|
1149 | |
- || { { $as_echo "$as_me:$LINENO: error: unable to change directory" >&5
|
1150 | |
-$as_echo "$as_me: error: unable to change directory" >&2;}
|
1151 | |
- { (exit 1); exit 1; }; }
|
1152 | |
+ || as_fn_error $? "unable to change directory"
|
1153 | |
at_dir=`pwd`
|
1154 | |
fi
|
1155 | |
|
1156 | |
@@ -949,9 +988,7 @@ fi
|
1157 | |
for at_file in atconfig atlocal
|
1158 | |
do
|
1159 | |
test -r $at_file || continue
|
1160 | |
- . ./$at_file || { { $as_echo "$as_me:$LINENO: error: invalid content: $at_file" >&5
|
1161 | |
-$as_echo "$as_me: error: invalid content: $at_file" >&2;}
|
1162 | |
- { (exit 1); exit 1; }; }
|
1163 | |
+ . ./$at_file || as_fn_error $? "invalid content: $at_file"
|
1164 | |
done
|
1165 | |
|
1166 | |
# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
|
1167 | |
@@ -966,8 +1003,7 @@ if test -n "$at_top_srcdir"; then
|
1168 | |
builddir=../..
|
1169 | |
for at_dir_var in srcdir top_srcdir top_build_prefix
|
1170 | |
do
|
1171 | |
- at_val=`eval 'as_val=${'at_$at_dir_var'}
|
1172 | |
- $as_echo "$as_val"'`
|
1173 | |
+ eval at_val=\$at_$at_dir_var
|
1174 | |
case $at_val in
|
1175 | |
[\\/$]* | ?:[\\/]* ) at_prefix= ;;
|
1176 | |
*) at_prefix=../../ ;;
|
1177 | |
@@ -976,9 +1012,9 @@ if test -n "$at_top_srcdir"; then
|
1178 | |
done
|
1179 | |
fi
|
1180 | |
|
1181 | |
-## ------------------- ##
|
1182 | |
-## Directory structure ##
|
1183 | |
-## ------------------- ##
|
1184 | |
+## -------------------- ##
|
1185 | |
+## Directory structure. ##
|
1186 | |
+## -------------------- ##
|
1187 | |
|
1188 | |
# This is the set of directories and files used by this script
|
1189 | |
# (non-literals are capitalized):
|
1190 | |
@@ -1009,12 +1045,14 @@ fi
|
1191 | |
# The directory the whole suite works in.
|
1192 | |
# Should be absolute to let the user `cd' at will.
|
1193 | |
at_suite_dir=$at_dir/$as_me.dir
|
1194 | |
-# The file containing the suite.
|
1195 | |
+# The file containing the suite ($at_dir might have changed since earlier).
|
1196 | |
at_suite_log=$at_dir/$as_me.log
|
1197 | |
# The directory containing helper files per test group.
|
1198 | |
at_helper_dir=$at_suite_dir/at-groups
|
1199 | |
# Stop file: if it exists, do not start new jobs.
|
1200 | |
at_stop_file=$at_suite_dir/at-stop
|
1201 | |
+# The fifo used for the job dispatcher.
|
1202 | |
+at_job_fifo=$at_suite_dir/at-job-fifo
|
1203 | |
|
1204 | |
if $at_clean; then
|
1205 | |
test -d "$at_suite_dir" &&
|
1206 | |
@@ -1038,23 +1076,23 @@ for as_dir in $AUTOTEST_PATH $PATH
|
1207 | |
do
|
1208 | |
IFS=$as_save_IFS
|
1209 | |
test -z "$as_dir" && as_dir=.
|
1210 | |
- test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
|
1211 | |
+ test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
|
1212 | |
case $as_dir in
|
1213 | |
[\\/]* | ?:[\\/]* )
|
1214 | |
- at_path=$at_path$as_dir
|
1215 | |
+ as_fn_append at_path "$as_dir"
|
1216 | |
;;
|
1217 | |
* )
|
1218 | |
if test -z "$at_top_build_prefix"; then
|
1219 | |
# Stand-alone test suite.
|
1220 | |
- at_path=$at_path$as_dir
|
1221 | |
+ as_fn_append at_path "$as_dir"
|
1222 | |
else
|
1223 | |
# Embedded test suite.
|
1224 | |
- at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
|
1225 | |
- at_path=$at_path$at_top_srcdir/$as_dir
|
1226 | |
+ as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
|
1227 | |
+ as_fn_append at_path "$at_top_srcdir/$as_dir"
|
1228 | |
fi
|
1229 | |
;;
|
1230 | |
esac
|
1231 | |
-done
|
1232 | |
+ done
|
1233 | |
IFS=$as_save_IFS
|
1234 | |
|
1235 | |
|
1236 | |
@@ -1068,7 +1106,7 @@ for as_dir in $at_path
|
1237 | |
do
|
1238 | |
IFS=$as_save_IFS
|
1239 | |
test -z "$as_dir" && as_dir=.
|
1240 | |
- test -d "$as_dir" || continue
|
1241 | |
+ test -d "$as_dir" || continue
|
1242 | |
case $as_dir in
|
1243 | |
[\\/]* | ?:[\\/]* ) ;;
|
1244 | |
* ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
|
1245 | |
@@ -1076,15 +1114,18 @@ esac
|
1246 | |
case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
|
1247 | |
*$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
|
1248 | |
$PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
|
1249 | |
- *) at_new_path=$at_new_path$PATH_SEPARATOR$as_dir ;;
|
1250 | |
+ *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
|
1251 | |
esac
|
1252 | |
-done
|
1253 | |
+ done
|
1254 | |
IFS=$as_save_IFS
|
1255 | |
|
1256 | |
PATH=$at_new_path
|
1257 | |
export PATH
|
1258 | |
|
1259 | |
-# Setting up the FDs.
|
1260 | |
+# Setting up the FDs.
|
1261 | |
+
|
1262 | |
+
|
1263 | |
+
|
1264 | |
# 5 is the log file. Not to be overwritten if `-d'.
|
1265 | |
if $at_debug_p; then
|
1266 | |
at_suite_log=/dev/null
|
1267 | |
@@ -1094,43 +1135,28 @@ fi
|
1268 | |
exec 5>>"$at_suite_log"
|
1269 | |
|
1270 | |
# Banners and logs.
|
1271 | |
-cat <<\_ASBOX
|
1272 | |
-## ------------------------- ##
|
1273 | |
+$as_echo "## ------------------------- ##
|
1274 | |
## GNU cpio 2.11 test suite. ##
|
1275 | |
-## ------------------------- ##
|
1276 | |
-_ASBOX
|
1277 | |
+## ------------------------- ##"
|
1278 | |
{
|
1279 | |
- cat <<\_ASBOX
|
1280 | |
-## ------------------------- ##
|
1281 | |
+ $as_echo "## ------------------------- ##
|
1282 | |
## GNU cpio 2.11 test suite. ##
|
1283 | |
-## ------------------------- ##
|
1284 | |
-_ASBOX
|
1285 | |
+## ------------------------- ##"
|
1286 | |
echo
|
1287 | |
|
1288 | |
$as_echo "$as_me: command line was:"
|
1289 | |
$as_echo " \$ $0 $at_cli_args"
|
1290 | |
echo
|
1291 | |
|
1292 | |
- # Try to find a few ChangeLogs in case it might help determining the
|
1293 | |
- # exact version. Use the relative dir: if the top dir is a symlink,
|
1294 | |
- # find will not follow it (and options to follow the links are not
|
1295 | |
- # portable), which would result in no output here. Prune directories
|
1296 | |
- # matching the package tarname, since they tend to be leftovers from
|
1297 | |
- # `make dist' or `make distcheck' and contain redundant or stale logs.
|
1298 | |
- if test -n "$at_top_srcdir"; then
|
1299 | |
- cat <<\_ASBOX
|
1300 | |
-## ----------- ##
|
1301 | |
-## ChangeLogs. ##
|
1302 | |
-## ----------- ##
|
1303 | |
-_ASBOX
|
1304 | |
+ # If ChangeLog exists, list a few lines in case it might help determining
|
1305 | |
+ # the exact version.
|
1306 | |
+ if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
|
1307 | |
+ $as_echo "## ---------- ##
|
1308 | |
+## ChangeLog. ##
|
1309 | |
+## ---------- ##"
|
1310 | |
+ echo
|
1311 | |
+ sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
|
1312 | |
echo
|
1313 | |
- for at_file in `find "$at_top_srcdir" -name "cpio-*" -prune -o -name ChangeLog -print`
|
1314 | |
- do
|
1315 | |
- $as_echo "$as_me: $at_file:"
|
1316 | |
- sed 's/^/| /;10q' $at_file
|
1317 | |
- echo
|
1318 | |
- done
|
1319 | |
-
|
1320 | |
fi
|
1321 | |
|
1322 | |
{
|
1323 | |
@@ -1163,8 +1189,8 @@ for as_dir in $PATH
|
1324 | |
do
|
1325 | |
IFS=$as_save_IFS
|
1326 | |
test -z "$as_dir" && as_dir=.
|
1327 | |
- $as_echo "PATH: $as_dir"
|
1328 | |
-done
|
1329 | |
+ $as_echo "PATH: $as_dir"
|
1330 | |
+ done
|
1331 | |
IFS=$as_save_IFS
|
1332 | |
|
1333 | |
}
|
1334 | |
@@ -1181,53 +1207,76 @@ IFS=$as_save_IFS
|
1335 | |
} >&5
|
1336 | |
|
1337 | |
|
1338 | |
-## --------------- ##
|
1339 | |
-## Shell functions ##
|
1340 | |
-## --------------- ##
|
1341 | |
+## ------------------------- ##
|
1342 | |
+## Autotest shell functions. ##
|
1343 | |
+## ------------------------- ##
|
1344 | |
|
1345 | |
-# at_func_banner NUMBER
|
1346 | |
-# ---------------------
|
1347 | |
-# Output banner NUMBER, provided the testsuite is running multiple groups
|
1348 | |
-# and this particular banner has not yet been printed.
|
1349 | |
-at_func_banner ()
|
1350 | |
+# at_fn_banner NUMBER
|
1351 | |
+# -------------------
|
1352 | |
+# Output banner NUMBER, provided the testsuite is running multiple groups and
|
1353 | |
+# this particular banner has not yet been printed.
|
1354 | |
+at_fn_banner ()
|
1355 | |
{
|
1356 | |
$at_print_banners || return 0
|
1357 | |
eval at_banner_text=\$at_banner_text_$1
|
1358 | |
test "x$at_banner_text" = x && return 0
|
1359 | |
eval at_banner_text_$1=
|
1360 | |
$as_echo "$as_nl$at_banner_text$as_nl"
|
1361 | |
-} # at_func_banner
|
1362 | |
+} # at_fn_banner
|
1363 | |
|
1364 | |
-# at_func_check_newline COMMAND
|
1365 | |
-# -----------------------------
|
1366 | |
-# Test if COMMAND includes a newline and, if so, print a message and return
|
1367 | |
-# exit code 1
|
1368 | |
-at_func_check_newline ()
|
1369 | |
+# at_fn_check_prepare_notrace REASON LINE
|
1370 | |
+# ---------------------------------------
|
1371 | |
+# Perform AT_CHECK preparations for the command at LINE for an untraceable
|
1372 | |
+# command; REASON is the reason for disabling tracing.
|
1373 | |
+at_fn_check_prepare_notrace ()
|
1374 | |
{
|
1375 | |
- case "$1" in
|
1376 | |
- *'
|
1377 | |
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)'
|
1378 | |
- return 1 ;;
|
1379 | |
- *) return 0 ;;
|
1380 | |
- esac
|
1381 | |
+ $at_trace_echo "Not enabling shell tracing (command contains $1)"
|
1382 | |
+ $as_echo "$2" >"$at_check_line_file"
|
1383 | |
+ at_check_trace=: at_check_filter=:
|
1384 | |
+ : >"$at_stdout"; : >"$at_stderr"
|
1385 | |
}
|
1386 | |
|
1387 | |
-# at_func_filter_trace EXIT-CODE
|
1388 | |
+# at_fn_check_prepare_trace LINE
|
1389 | |
# ------------------------------
|
1390 | |
-# Split the contents of file "$at_stder1" into the "set -x" trace (on stderr)
|
1391 | |
-# and the other lines (on file "$at_stderr"). Return the exit code EXIT-CODE.
|
1392 | |
-at_func_filter_trace ()
|
1393 | |
+# Perform AT_CHECK preparations for the command at LINE for a traceable
|
1394 | |
+# command.
|
1395 | |
+at_fn_check_prepare_trace ()
|
1396 | |
+{
|
1397 | |
+ $as_echo "$1" >"$at_check_line_file"
|
1398 | |
+ at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
|
1399 | |
+ : >"$at_stdout"; : >"$at_stderr"
|
1400 | |
+}
|
1401 | |
+
|
1402 | |
+# at_fn_check_prepare_dynamic COMMAND LINE
|
1403 | |
+# ----------------------------------------
|
1404 | |
+# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
|
1405 | |
+# preparation function.
|
1406 | |
+at_fn_check_prepare_dynamic ()
|
1407 | |
+{
|
1408 | |
+ case $1 in
|
1409 | |
+ *$as_nl*)
|
1410 | |
+ at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
|
1411 | |
+ *)
|
1412 | |
+ at_fn_check_prepare_trace "$2" ;;
|
1413 | |
+ esac
|
1414 | |
+}
|
1415 | |
+
|
1416 | |
+# at_fn_filter_trace
|
1417 | |
+# ------------------
|
1418 | |
+# Remove the lines in the file "$at_stderr" generated by "set -x" and print
|
1419 | |
+# them to stderr.
|
1420 | |
+at_fn_filter_trace ()
|
1421 | |
{
|
1422 | |
+ mv "$at_stderr" "$at_stder1"
|
1423 | |
grep '^ *+' "$at_stder1" >&2
|
1424 | |
grep -v '^ *+' "$at_stder1" >"$at_stderr"
|
1425 | |
- return $1
|
1426 | |
}
|
1427 | |
|
1428 | |
-# at_func_log_failure FILE-LIST
|
1429 | |
-# -----------------------------
|
1430 | |
+# at_fn_log_failure FILE-LIST
|
1431 | |
+# ---------------------------
|
1432 | |
# Copy the files in the list on stdout with a "> " prefix, and exit the shell
|
1433 | |
# with a failure exit code.
|
1434 | |
-at_func_log_failure ()
|
1435 | |
+at_fn_log_failure ()
|
1436 | |
{
|
1437 | |
for file
|
1438 | |
do $as_echo "$file:"; sed 's/^/> /' "$file"; done
|
1439 | |
@@ -1235,56 +1284,62 @@ at_func_log_failure ()
|
1440 | |
exit 1
|
1441 | |
}
|
1442 | |
|
1443 | |
-# at_func_check_skip EXIT-CODE
|
1444 | |
-# ----------------------------
|
1445 | |
-# Check whether EXIT-CODE is the special exit code 77, and if so exit the shell
|
1446 | |
-# with that same exit code.
|
1447 | |
-at_func_check_skip ()
|
1448 | |
+# at_fn_check_skip EXIT-CODE LINE
|
1449 | |
+# -------------------------------
|
1450 | |
+# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
|
1451 | |
+# the test group subshell with that same exit code. Use LINE in any report
|
1452 | |
+# about test failure.
|
1453 | |
+at_fn_check_skip ()
|
1454 | |
{
|
1455 | |
case $1 in
|
1456 | |
+ 99) echo 99 > "$at_status_file"; at_failed=:
|
1457 | |
+ $as_echo "$2: hard failure"; exit 99;;
|
1458 | |
77) echo 77 > "$at_status_file"; exit 77;;
|
1459 | |
esac
|
1460 | |
}
|
1461 | |
|
1462 | |
-# at_func_check_status EXPECTED EXIT-CODE LINE
|
1463 | |
-# --------------------------------------------
|
1464 | |
-# Check whether EXIT-CODE is the expected exit code, and if so do nothing.
|
1465 | |
-# Otherwise, if it is 77 exit the shell with that same exit code; if it is
|
1466 | |
-# anything else print an error message and fail the test.
|
1467 | |
-at_func_check_status ()
|
1468 | |
+# at_fn_check_status EXPECTED EXIT-CODE LINE
|
1469 | |
+# ------------------------------------------
|
1470 | |
+# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
|
1471 | |
+# Otherwise, if it is 77 or 99, exit the test group subshell with that same
|
1472 | |
+# exit code; if it is anything else print an error message referring to LINE,
|
1473 | |
+# and fail the test.
|
1474 | |
+at_fn_check_status ()
|
1475 | |
{
|
1476 | |
case $2 in
|
1477 | |
$1 ) ;;
|
1478 | |
77) echo 77 > "$at_status_file"; exit 77;;
|
1479 | |
+ 99) echo 99 > "$at_status_file"; at_failed=:
|
1480 | |
+ $as_echo "$3: hard failure"; exit 99;;
|
1481 | |
*) $as_echo "$3: exit code was $2, expected $1"
|
1482 | |
at_failed=:;;
|
1483 | |
esac
|
1484 | |
}
|
1485 | |
|
1486 | |
-# at_func_diff_devnull FILE
|
1487 | |
-# -------------------------
|
1488 | |
-# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless
|
1489 | |
-# diff invocations.
|
1490 | |
-at_func_diff_devnull ()
|
1491 | |
+# at_fn_diff_devnull FILE
|
1492 | |
+# -----------------------
|
1493 | |
+# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
|
1494 | |
+# invocations.
|
1495 | |
+at_fn_diff_devnull ()
|
1496 | |
{
|
1497 | |
test -s "$1" || return 0
|
1498 | |
$at_diff "$at_devnull" "$1"
|
1499 | |
}
|
1500 | |
|
1501 | |
-# at_func_test NUMBER
|
1502 | |
-# -------------------
|
1503 | |
+# at_fn_test NUMBER
|
1504 | |
+# -----------------
|
1505 | |
# Parse out test NUMBER from the tail of this file.
|
1506 | |
-at_func_test ()
|
1507 | |
+at_fn_test ()
|
1508 | |
{
|
1509 | |
eval at_sed=\$at_sed$1
|
1510 | |
sed "$at_sed" "$at_myself" > "$at_test_source"
|
1511 | |
}
|
1512 | |
|
1513 | |
-# at_func_create_debugging_script
|
1514 | |
-# -------------------------------
|
1515 | |
+# at_fn_create_debugging_script
|
1516 | |
+# -----------------------------
|
1517 | |
# Create the debugging script $at_group_dir/run which will reproduce the
|
1518 | |
# current test group.
|
1519 | |
-at_func_create_debugging_script ()
|
1520 | |
+at_fn_create_debugging_script ()
|
1521 | |
{
|
1522 | |
{
|
1523 | |
echo "#! /bin/sh" &&
|
1524 | |
@@ -1296,34 +1351,13 @@ at_func_create_debugging_script ()
|
1525 | |
chmod +x "$at_group_dir/run"
|
1526 | |
}
|
1527 | |
|
1528 | |
-# at_func_arith
|
1529 | |
-# -------------
|
1530 | |
-# Arithmetic evaluation, avoids expr if the shell is sane. The
|
1531 | |
-# interpretation of leading zeroes is unspecified.
|
1532 | |
-#
|
1533 | |
-# subshell and eval are needed to keep Solaris sh from bailing out:
|
1534 | |
-if ( eval 'test $(( 1 + 1 )) = 2' ) 2>/dev/null; then
|
1535 | |
- # With "$@", bash does not split positional parameters:
|
1536 | |
- eval 'at_func_arith ()
|
1537 | |
- {
|
1538 | |
- at_func_arith_result=$(( $* ))
|
1539 | |
- }'
|
1540 | |
-else
|
1541 | |
- at_func_arith ()
|
1542 | |
- {
|
1543 | |
- at_func_arith_result=`expr "$@"`
|
1544 | |
- }
|
1545 | |
-fi
|
1546 | |
-
|
1547 | |
-## ---------------------- ##
|
1548 | |
-## End of shell functions ##
|
1549 | |
-## ---------------------- ##
|
1550 | |
+## -------------------------------- ##
|
1551 | |
+## End of autotest shell functions. ##
|
1552 | |
+## -------------------------------- ##
|
1553 | |
{
|
1554 | |
- cat <<\_ASBOX
|
1555 | |
-## ---------------- ##
|
1556 | |
+ $as_echo "## ---------------- ##
|
1557 | |
## Tested programs. ##
|
1558 | |
-## ---------------- ##
|
1559 | |
-_ASBOX
|
1560 | |
+## ---------------- ##"
|
1561 | |
echo
|
1562 | |
} >&5
|
1563 | |
|
1564 | |
@@ -1331,34 +1365,35 @@ _ASBOX
|
1565 | |
for at_program in : $at_tested
|
1566 | |
do
|
1567 | |
test "$at_program" = : && continue
|
1568 | |
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
1569 | |
+ case $at_program in
|
1570 | |
+ [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
|
1571 | |
+ * )
|
1572 | |
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
1573 | |
for as_dir in $PATH
|
1574 | |
do
|
1575 | |
IFS=$as_save_IFS
|
1576 | |
test -z "$as_dir" && as_dir=.
|
1577 | |
- test -f "$as_dir/$at_program" && break
|
1578 | |
-done
|
1579 | |
+ test -f "$as_dir/$at_program" && break
|
1580 | |
+ done
|
1581 | |
IFS=$as_save_IFS
|
1582 | |
|
1583 | |
- if test -f "$as_dir/$at_program"; then
|
1584 | |
+ at_program_=$as_dir/$at_program ;;
|
1585 | |
+ esac
|
1586 | |
+ if test -f "$at_program_"; then
|
1587 | |
{
|
1588 | |
- $as_echo "$at_srcdir/testsuite.at:26: $as_dir/$at_program --version"
|
1589 | |
- "$as_dir/$at_program" --version </dev/null
|
1590 | |
+ $as_echo "$at_srcdir/testsuite.at:26: $at_program_ --version"
|
1591 | |
+ "$at_program_" --version </dev/null
|
1592 | |
echo
|
1593 | |
} >&5 2>&1
|
1594 | |
else
|
1595 | |
- { { $as_echo "$as_me:$LINENO: error: cannot find $at_program" >&5
|
1596 | |
-$as_echo "$as_me: error: cannot find $at_program" >&2;}
|
1597 | |
- { (exit 1); exit 1; }; }
|
1598 | |
+ as_fn_error $? "cannot find $at_program" "$LINENO" 5
|
1599 | |
fi
|
1600 | |
done
|
1601 | |
|
1602 | |
{
|
1603 | |
- cat <<\_ASBOX
|
1604 | |
-## ------------------ ##
|
1605 | |
+ $as_echo "## ------------------ ##
|
1606 | |
## Running the tests. ##
|
1607 | |
-## ------------------ ##
|
1608 | |
-_ASBOX
|
1609 | |
+## ------------------ ##"
|
1610 | |
} >&5
|
1611 | |
|
1612 | |
at_start_date=`date`
|
1613 | |
@@ -1366,11 +1401,8 @@ at_start_time=`date +%s 2>/dev/null`
|
1614 | |
$as_echo "$as_me: starting at: $at_start_date" >&5
|
1615 | |
|
1616 | |
# Create the master directory if it doesn't already exist.
|
1617 | |
-test -d "$at_suite_dir" ||
|
1618 | |
- mkdir "$at_suite_dir" ||
|
1619 | |
- { { $as_echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
|
1620 | |
-$as_echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
|
1621 | |
- { (exit 1); exit 1; }; }
|
1622 | |
+as_dir="$at_suite_dir"; as_fn_mkdir_p ||
|
1623 | |
+ as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
|
1624 | |
|
1625 | |
# Can we diff with `/dev/null'? DU 5.0 refuses.
|
1626 | |
if diff /dev/null /dev/null >/dev/null 2>&1; then
|
1627 | |
@@ -1404,28 +1436,40 @@ BEGIN { FS="" }
|
1628 | |
if (test == "'"$at_group"'") exit
|
1629 | |
}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
|
1630 | |
. "$at_suite_dir/at-source-lines" ||
|
1631 | |
- { { $as_echo "$as_me:$LINENO: error: cannot create test line number cache" >&5
|
1632 | |
-$as_echo "$as_me: error: cannot create test line number cache" >&2;}
|
1633 | |
- { (exit 1); exit 1; }; }
|
1634 | |
+ as_fn_error $? "cannot create test line number cache" "$LINENO" 5
|
1635 | |
rm -f "$at_suite_dir/at-source-lines"
|
1636 | |
|
1637 | |
+# Set number of jobs for `-j'; avoid more jobs than test groups.
|
1638 | |
+set X $at_groups; shift; at_max_jobs=$#
|
1639 | |
+if test $at_max_jobs -eq 0; then
|
1640 | |
+ at_jobs=1
|
1641 | |
+fi
|
1642 | |
+if test $at_jobs -ne 1 &&
|
1643 | |
+ { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
|
1644 | |
+ at_jobs=$at_max_jobs
|
1645 | |
+fi
|
1646 | |
+
|
1647 | |
+# If parallel mode, don't output banners, don't split summary lines.
|
1648 | |
+if test $at_jobs -ne 1; then
|
1649 | |
+ at_print_banners=false
|
1650 | |
+ at_quiet=:
|
1651 | |
+fi
|
1652 | |
+
|
1653 | |
# Set up helper dirs.
|
1654 | |
rm -rf "$at_helper_dir" &&
|
1655 | |
mkdir "$at_helper_dir" &&
|
1656 | |
cd "$at_helper_dir" &&
|
1657 | |
{ test -z "$at_groups" || mkdir $at_groups; } ||
|
1658 | |
-{ { $as_echo "$as_me:$LINENO: error: testsuite directory setup failed" >&5
|
1659 | |
-$as_echo "$as_me: error: testsuite directory setup failed" >&2;}
|
1660 | |
- { (exit 1); exit 1; }; }
|
1661 | |
+as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
|
1662 | |
|
1663 | |
# Functions for running a test group. We leave the actual
|
1664 | |
# test group execution outside of a shell function in order
|
1665 | |
# to avoid hitting zsh 4.x exit status bugs.
|
1666 | |
|
1667 | |
-# at_func_group_prepare
|
1668 | |
-# ---------------------
|
1669 | |
-# Prepare running a test group
|
1670 | |
-at_func_group_prepare ()
|
1671 | |
+# at_fn_group_prepare
|
1672 | |
+# -------------------
|
1673 | |
+# Prepare for running a test group.
|
1674 | |
+at_fn_group_prepare ()
|
1675 | |
{
|
1676 | |
# The directory for additional per-group helper files.
|
1677 | |
at_job_dir=$at_helper_dir/$at_group
|
1678 | |
@@ -1459,56 +1503,20 @@ at_func_group_prepare ()
|
1679 | |
|
1680 | |
|
1681 | |
# Create a fresh directory for the next test group, and enter.
|
1682 | |
+ # If one already exists, the user may have invoked ./run from
|
1683 | |
+ # within that directory; we remove the contents, but not the
|
1684 | |
+ # directory itself, so that we aren't pulling the rug out from
|
1685 | |
+ # under the shell's notion of the current directory.
|
1686 | |
at_group_dir=$at_suite_dir/$at_group_normalized
|
1687 | |
at_group_log=$at_group_dir/$as_me.log
|
1688 | |
if test -d "$at_group_dir"; then
|
1689 | |
- find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
|
1690 | |
- rm -fr "$at_group_dir" ||
|
1691 | |
- { $as_echo "$as_me:$LINENO: WARNING: test directory for $at_group_normalized could not be cleaned." >&5
|
1692 | |
-$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned." >&2;}
|
1693 | |
- fi
|
1694 | |
+ find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
|
1695 | |
+ rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
|
1696 | |
+fi ||
|
1697 | |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
|
1698 | |
+$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
|
1699 | |
# Be tolerant if the above `rm' was not able to remove the directory.
|
1700 | |
- { as_dir="$at_group_dir"
|
1701 | |
- case $as_dir in #(
|
1702 | |
- -*) as_dir=./$as_dir;;
|
1703 | |
- esac
|
1704 | |
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
|
1705 | |
- as_dirs=
|
1706 | |
- while :; do
|
1707 | |
- case $as_dir in #(
|
1708 | |
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
|
1709 | |
- *) as_qdir=$as_dir;;
|
1710 | |
- esac
|
1711 | |
- as_dirs="'$as_qdir' $as_dirs"
|
1712 | |
- as_dir=`$as_dirname -- "$as_dir" ||
|
1713 | |
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
1714 | |
- X"$as_dir" : 'X\(//\)[^/]' \| \
|
1715 | |
- X"$as_dir" : 'X\(//\)$' \| \
|
1716 | |
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
|
1717 | |
-$as_echo X"$as_dir" |
|
1718 | |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
1719 | |
- s//\1/
|
1720 | |
- q
|
1721 | |
- }
|
1722 | |
- /^X\(\/\/\)[^/].*/{
|
1723 | |
- s//\1/
|
1724 | |
- q
|
1725 | |
- }
|
1726 | |
- /^X\(\/\/\)$/{
|
1727 | |
- s//\1/
|
1728 | |
- q
|
1729 | |
- }
|
1730 | |
- /^X\(\/\).*/{
|
1731 | |
- s//\1/
|
1732 | |
- q
|
1733 | |
- }
|
1734 | |
- s/.*/./; q'`
|
1735 | |
- test -d "$as_dir" && break
|
1736 | |
- done
|
1737 | |
- test -z "$as_dirs" || eval "mkdir $as_dirs"
|
1738 | |
- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
|
1739 | |
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
|
1740 | |
- { (exit 1); exit 1; }; }; }
|
1741 | |
+ as_dir="$at_group_dir"; as_fn_mkdir_p
|
1742 | |
|
1743 | |
echo 0 > "$at_status_file"
|
1744 | |
|
1745 | |
@@ -1521,9 +1529,29 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
|
1746 | |
fi
|
1747 | |
}
|
1748 | |
|
1749 | |
-# at_func_group_postprocess
|
1750 | |
-# -------------------------
|
1751 | |
-at_func_group_postprocess ()
|
1752 | |
+# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
|
1753 | |
+# -------------------------------------------------
|
1754 | |
+# Declare the test group ORDINAL, located at LINE with group description DESC,
|
1755 | |
+# and residing under BANNER. Use PAD to align the status column.
|
1756 | |
+at_fn_group_banner ()
|
1757 | |
+{
|
1758 | |
+ at_setup_line="$2"
|
1759 | |
+ test -n "$5" && at_fn_banner $5
|
1760 | |
+ at_desc="$3"
|
1761 | |
+ case $1 in
|
1762 | |
+ [0-9]) at_desc_line=" $1: ";;
|
1763 | |
+ [0-9][0-9]) at_desc_line=" $1: " ;;
|
1764 | |
+ *) at_desc_line="$1: " ;;
|
1765 | |
+ esac
|
1766 | |
+ as_fn_append at_desc_line "$3$4"
|
1767 | |
+ $at_quiet $as_echo_n "$at_desc_line"
|
1768 | |
+ echo "# -*- compilation -*-" >> "$at_group_log"
|
1769 | |
+}
|
1770 | |
+
|
1771 | |
+# at_fn_group_postprocess
|
1772 | |
+# -----------------------
|
1773 | |
+# Perform cleanup after running a test group.
|
1774 | |
+at_fn_group_postprocess ()
|
1775 | |
{
|
1776 | |
# Be sure to come back to the suite directory, in particular
|
1777 | |
# since below we might `rm' the group directory we are in currently.
|
1778 | |
@@ -1536,6 +1564,7 @@ at_func_group_postprocess ()
|
1779 | |
report this failure to <bug-cpio@gnu.org>.
|
1780 | |
_ATEOF
|
1781 | |
$as_echo "$at_setup_line" >"$at_check_line_file"
|
1782 | |
+ at_status=99
|
1783 | |
fi
|
1784 | |
$at_verbose $as_echo_n "$at_group. $at_setup_line: "
|
1785 | |
$as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
|
1786 | |
@@ -1544,31 +1573,41 @@ _ATEOF
|
1787 | |
at_msg="UNEXPECTED PASS"
|
1788 | |
at_res=xpass
|
1789 | |
at_errexit=$at_errexit_p
|
1790 | |
+ at_color=$at_red
|
1791 | |
;;
|
1792 | |
no:0)
|
1793 | |
at_msg="ok"
|
1794 | |
at_res=pass
|
1795 | |
at_errexit=false
|
1796 | |
+ at_color=$at_grn
|
1797 | |
;;
|
1798 | |
*:77)
|
1799 | |
at_msg='skipped ('`cat "$at_check_line_file"`')'
|
1800 | |
at_res=skip
|
1801 | |
at_errexit=false
|
1802 | |
+ at_color=$at_blu
|
1803 | |
+ ;;
|
1804 | |
+ no:* | *:99)
|
1805 | |
+ at_msg='FAILED ('`cat "$at_check_line_file"`')'
|
1806 | |
+ at_res=fail
|
1807 | |
+ at_errexit=$at_errexit_p
|
1808 | |
+ at_color=$at_red
|
1809 | |
;;
|
1810 | |
yes:*)
|
1811 | |
at_msg='expected failure ('`cat "$at_check_line_file"`')'
|
1812 | |
at_res=xfail
|
1813 | |
at_errexit=false
|
1814 | |
- ;;
|
1815 | |
- no:*)
|
1816 | |
- at_msg='FAILED ('`cat "$at_check_line_file"`')'
|
1817 | |
- at_res=fail
|
1818 | |
- at_errexit=$at_errexit_p
|
1819 | |
+ at_color=$at_lgn
|
1820 | |
;;
|
1821 | |
esac
|
1822 | |
echo "$at_res" > "$at_job_dir/$at_res"
|
1823 | |
- # Make sure there is a separator even with long titles.
|
1824 | |
- $as_echo " $at_msg"
|
1825 | |
+ # In parallel mode, output the summary line only afterwards.
|
1826 | |
+ if test $at_jobs -ne 1 && test -n "$at_verbose"; then
|
1827 | |
+ $as_echo "$at_desc_line $at_color$at_msg$at_std"
|
1828 | |
+ else
|
1829 | |
+ # Make sure there is a separator even with long titles.
|
1830 | |
+ $as_echo " $at_color$at_msg$at_std"
|
1831 | |
+ fi
|
1832 | |
at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
|
1833 | |
case $at_status in
|
1834 | |
0|77)
|
1835 | |
@@ -1585,7 +1624,7 @@ _ATEOF
|
1836 | |
|
1837 | |
# Cleanup the group directory, unless the user wants the files.
|
1838 | |
if $at_debug_p; then
|
1839 | |
- at_func_create_debugging_script
|
1840 | |
+ at_fn_create_debugging_script
|
1841 | |
else
|
1842 | |
if test -d "$at_group_dir"; then
|
1843 | |
find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
|
1844 | |
@@ -1602,7 +1641,7 @@ _ATEOF
|
1845 | |
|
1846 | |
# Upon failure, keep the group directory for autopsy, and create
|
1847 | |
# the debugging script. With -e, do not start any further tests.
|
1848 | |
- at_func_create_debugging_script
|
1849 | |
+ at_fn_create_debugging_script
|
1850 | |
if $at_errexit; then
|
1851 | |
echo stop > "$at_stop_file"
|
1852 | |
fi
|
1853 | |
@@ -1615,22 +1654,135 @@ _ATEOF
|
1854 | |
## Driver loop. ##
|
1855 | |
## ------------ ##
|
1856 | |
|
1857 | |
+
|
1858 | |
+if (set -m && set +m && set +b) >/dev/null 2>&1; then
|
1859 | |
+ set +b
|
1860 | |
+ at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
|
1861 | |
+else
|
1862 | |
+ at_job_control_on=: at_job_control_off=: at_job_group=
|
1863 | |
+fi
|
1864 | |
+
|
1865 | |
+for at_signal in 1 2 15; do
|
1866 | |
+ trap 'set +x; set +e
|
1867 | |
+ $at_job_control_off
|
1868 | |
+ at_signal='"$at_signal"'
|
1869 | |
+ echo stop > "$at_stop_file"
|
1870 | |
+ trap "" $at_signal
|
1871 | |
+ at_pgids=
|
1872 | |
+ for at_pgid in `jobs -p 2>/dev/null`; do
|
1873 | |
+ at_pgids="$at_pgids $at_job_group$at_pgid"
|
1874 | |
+ done
|
1875 | |
+ test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
|
1876 | |
+ wait
|
1877 | |
+ if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
|
1878 | |
+ echo >&2
|
1879 | |
+ fi
|
1880 | |
+ at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
|
1881 | |
+ set x $at_signame
|
1882 | |
+ test 0 -gt 2 && at_signame=$at_signal
|
1883 | |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
|
1884 | |
+$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
|
1885 | |
+ as_fn_arith 128 + $at_signal && exit_status=$as_val
|
1886 | |
+ as_fn_exit $exit_status' $at_signal
|
1887 | |
+done
|
1888 | |
+
|
1889 | |
rm -f "$at_stop_file"
|
1890 | |
at_first=:
|
1891 | |
|
1892 | |
-for at_group in $at_groups; do
|
1893 | |
- at_func_group_prepare
|
1894 | |
- if cd "$at_group_dir" &&
|
1895 | |
- at_func_test $at_group &&
|
1896 | |
- . "$at_test_source"; then :; else
|
1897 | |
- { $as_echo "$as_me:$LINENO: WARNING: unable to parse test group: $at_group" >&5
|
1898 | |
+if test $at_jobs -ne 1 &&
|
1899 | |
+ rm -f "$at_job_fifo" &&
|
1900 | |
+ test -n "$at_job_group" &&
|
1901 | |
+ ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
|
1902 | |
+then
|
1903 | |
+ # FIFO job dispatcher.
|
1904 | |
+
|
1905 | |
+ trap 'at_pids=
|
1906 | |
+ for at_pid in `jobs -p`; do
|
1907 | |
+ at_pids="$at_pids $at_job_group$at_pid"
|
1908 | |
+ done
|
1909 | |
+ if test -n "$at_pids"; then
|
1910 | |
+ at_sig=TSTP
|
1911 | |
+ test "${TMOUT+set}" = set && at_sig=STOP
|
1912 | |
+ kill -$at_sig $at_pids 2>/dev/null
|
1913 | |
+ fi
|
1914 | |
+ kill -STOP $$
|
1915 | |
+ test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
|
1916 | |
+
|
1917 | |
+ echo
|
1918 | |
+ # Turn jobs into a list of numbers, starting from 1.
|
1919 | |
+ at_joblist=`$as_echo " $at_groups_all " | \
|
1920 | |
+ sed 's/\( '$at_jobs'\) .*/\1/'`
|
1921 | |
+
|
1922 | |
+ set X $at_joblist
|
1923 | |
+ shift
|
1924 | |
+ for at_group in $at_groups; do
|
1925 | |
+ $at_job_control_on 2>/dev/null
|
1926 | |
+ (
|
1927 | |
+ # Start one test group.
|
1928 | |
+ $at_job_control_off
|
1929 | |
+ if $at_first; then
|
1930 | |
+ exec 7>"$at_job_fifo"
|
1931 | |
+ else
|
1932 | |
+ exec 6<&-
|
1933 | |
+ fi
|
1934 | |
+ trap 'set +x; set +e
|
1935 | |
+ trap "" PIPE
|
1936 | |
+ echo stop > "$at_stop_file"
|
1937 | |
+ echo >&7
|
1938 | |
+ as_fn_exit 141' PIPE
|
1939 | |
+ at_fn_group_prepare
|
1940 | |
+ if cd "$at_group_dir" &&
|
1941 | |
+ at_fn_test $at_group &&
|
1942 | |
+ . "$at_test_source"
|
1943 | |
+ then :; else
|
1944 | |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
|
1945 | |
$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
|
1946 | |
- at_failed=:
|
1947 | |
+ at_failed=:
|
1948 | |
+ fi
|
1949 | |
+ at_fn_group_postprocess
|
1950 | |
+ echo >&7
|
1951 | |
+ ) &
|
1952 | |
+ $at_job_control_off
|
1953 | |
+ if $at_first; then
|
1954 | |
+ at_first=false
|
1955 | |
+ exec 6<"$at_job_fifo" 7>"$at_job_fifo"
|
1956 | |
+ fi
|
1957 | |
+ shift # Consume one token.
|
1958 | |
+ if test $# -gt 0; then :; else
|
1959 | |
+ read at_token <&6 || break
|
1960 | |
+ set x $*
|
1961 | |
+ fi
|
1962 | |
+ test -f "$at_stop_file" && break
|
1963 | |
+ done
|
1964 | |
+ exec 7>&-
|
1965 | |
+ # Read back the remaining ($at_jobs - 1) tokens.
|
1966 | |
+ set X $at_joblist
|
1967 | |
+ shift
|
1968 | |
+ if test $# -gt 0; then
|
1969 | |
+ shift
|
1970 | |
+ for at_job
|
1971 | |
+ do
|
1972 | |
+ read at_token
|
1973 | |
+ done <&6
|
1974 | |
fi
|
1975 | |
- at_func_group_postprocess
|
1976 | |
- test -f "$at_stop_file" && break
|
1977 | |
- at_first=false
|
1978 | |
-done
|
1979 | |
+ exec 6<&-
|
1980 | |
+ wait
|
1981 | |
+else
|
1982 | |
+ # Run serially, avoid forks and other potential surprises.
|
1983 | |
+ for at_group in $at_groups; do
|
1984 | |
+ at_fn_group_prepare
|
1985 | |
+ if cd "$at_group_dir" &&
|
1986 | |
+ at_fn_test $at_group &&
|
1987 | |
+ . "$at_test_source"; then :; else
|
1988 | |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
|
1989 | |
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
|
1990 | |
+ at_failed=:
|
1991 | |
+ fi
|
1992 | |
+ at_fn_group_postprocess
|
1993 | |
+ test -f "$at_stop_file" && break
|
1994 | |
+ at_first=false
|
1995 | |
+ done
|
1996 | |
+fi
|
1997 | |
|
1998 | |
# Wrap up the test suite with summary statistics.
|
1999 | |
cd "$at_helper_dir"
|
2000 | |
@@ -1651,12 +1803,9 @@ set X $at_xfail_list; shift; at_xfail_count=$#
|
2001 | |
set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
|
2002 | |
set X $at_skip_list; shift; at_skip_count=$#
|
2003 | |
|
2004 | |
-at_func_arith $at_group_count - $at_skip_count
|
2005 | |
-at_run_count=$at_func_arith_result
|
2006 | |
-at_func_arith $at_xpass_count + $at_fail_count
|
2007 | |
-at_unexpected_count=$at_func_arith_result
|
2008 | |
-at_func_arith $at_xfail_count + $at_fail_count
|
2009 | |
-at_total_fail_count=$at_func_arith_result
|
2010 | |
+as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
|
2011 | |
+as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
|
2012 | |
+as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
|
2013 | |
|
2014 | |
# Back to the top directory.
|
2015 | |
cd "$at_dir"
|
2016 | |
@@ -1668,35 +1817,26 @@ at_stop_time=`date +%s 2>/dev/null`
|
2017 | |
$as_echo "$as_me: ending at: $at_stop_date" >&5
|
2018 | |
case $at_start_time,$at_stop_time in
|
2019 | |
[0-9]*,[0-9]*)
|
2020 | |
- at_func_arith $at_stop_time - $at_start_time
|
2021 | |
- at_duration_s=$at_func_arith_result
|
2022 | |
- at_func_arith $at_duration_s / 60
|
2023 | |
- at_duration_m=$at_func_arith_result
|
2024 | |
- at_func_arith $at_duration_m / 60
|
2025 | |
- at_duration_h=$at_func_arith_result
|
2026 | |
- at_func_arith $at_duration_s % 60
|
2027 | |
- at_duration_s=$at_func_arith_result
|
2028 | |
- at_func_arith $at_duration_m % 60
|
2029 | |
- at_duration_m=$at_func_arith_result
|
2030 | |
+ as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
|
2031 | |
+ as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
|
2032 | |
+ as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
|
2033 | |
+ as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
|
2034 | |
+ as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
|
2035 | |
at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
|
2036 | |
$as_echo "$as_me: test suite duration: $at_duration" >&5
|
2037 | |
;;
|
2038 | |
esac
|
2039 | |
|
2040 | |
echo
|
2041 | |
-cat <<\_ASBOX
|
2042 | |
-## ------------- ##
|
2043 | |
+$as_echo "## ------------- ##
|
2044 | |
## Test results. ##
|
2045 | |
-## ------------- ##
|
2046 | |
-_ASBOX
|
2047 | |
+## ------------- ##"
|
2048 | |
echo
|
2049 | |
{
|
2050 | |
echo
|
2051 | |
- cat <<\_ASBOX
|
2052 | |
-## ------------- ##
|
2053 | |
+ $as_echo "## ------------- ##
|
2054 | |
## Test results. ##
|
2055 | |
-## ------------- ##
|
2056 | |
-_ASBOX
|
2057 | |
+## ------------- ##"
|
2058 | |
echo
|
2059 | |
} >&5
|
2060 | |
|
2061 | |
@@ -1714,12 +1854,14 @@ if $at_errexit_p && test $at_unexpected_count != 0; then
|
2062 | |
at_result="$at_result $at_were run, one failed"
|
2063 | |
fi
|
2064 | |
at_result="$at_result unexpectedly and inhibited subsequent tests."
|
2065 | |
+ at_color=$at_red
|
2066 | |
else
|
2067 | |
# Don't you just love exponential explosion of the number of cases?
|
2068 | |
+ at_color=$at_red
|
2069 | |
case $at_xpass_count:$at_fail_count:$at_xfail_count in
|
2070 | |
# So far, so good.
|
2071 | |
- 0:0:0) at_result="$at_result $at_were successful." ;;
|
2072 | |
- 0:0:*) at_result="$at_result behaved as expected." ;;
|
2073 | |
+ 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
|
2074 | |
+ 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
|
2075 | |
|
2076 | |
# Some unexpected failures
|
2077 | |
0:*:0) at_result="$at_result $at_were run,
|
2078 | |
@@ -1765,18 +1907,16 @@ $at_skip_count tests were skipped." ;;
|
2079 | |
esac
|
2080 | |
|
2081 | |
if test $at_unexpected_count = 0; then
|
2082 | |
- echo "$at_result"
|
2083 | |
+ echo "$at_color$at_result$at_std"
|
2084 | |
echo "$at_result" >&5
|
2085 | |
else
|
2086 | |
- echo "ERROR: $at_result" >&2
|
2087 | |
+ echo "${at_color}ERROR: $at_result$at_std" >&2
|
2088 | |
echo "ERROR: $at_result" >&5
|
2089 | |
{
|
2090 | |
echo
|
2091 | |
- cat <<\_ASBOX
|
2092 | |
-## ------------------------ ##
|
2093 | |
+ $as_echo "## ------------------------ ##
|
2094 | |
## Summary of the failures. ##
|
2095 | |
-## ------------------------ ##
|
2096 | |
-_ASBOX
|
2097 | |
+## ------------------------ ##"
|
2098 | |
|
2099 | |
# Summary of failed and skipped tests.
|
2100 | |
if test $at_fail_count != 0; then
|
2101 | |
@@ -1795,11 +1935,9 @@ _ASBOX
|
2102 | |
echo
|
2103 | |
fi
|
2104 | |
if test $at_fail_count != 0; then
|
2105 | |
- cat <<\_ASBOX
|
2106 | |
-## ---------------------- ##
|
2107 | |
+ $as_echo "## ---------------------- ##
|
2108 | |
## Detailed failed tests. ##
|
2109 | |
-## ---------------------- ##
|
2110 | |
-_ASBOX
|
2111 | |
+## ---------------------- ##"
|
2112 | |
echo
|
2113 | |
for at_group in $at_fail_list
|
2114 | |
do
|
2115 | |
@@ -1831,19 +1969,21 @@ _ASBOX
|
2116 | |
_ASBOX
|
2117 | |
|
2118 | |
echo
|
2119 | |
- $as_echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:
|
2120 | |
+ if $at_debug_p; then
|
2121 | |
+ at_msg='per-test log files'
|
2122 | |
+ else
|
2123 | |
+ at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
|
2124 | |
+ fi
|
2125 | |
+ $as_echo "Please send $at_msg and all information you think might help:
|
2126 | |
|
2127 | |
To: <bug-cpio@gnu.org>
|
2128 | |
Subject: [GNU cpio 2.11] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
|
2129 | |
+
|
2130 | |
+You may investigate any problem if you feel able to do so, in which
|
2131 | |
+case the test suite provides a good starting point. Its output may
|
2132 | |
+be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
|
2133 | |
"
|
2134 | |
- if test $at_debug_p = false; then
|
2135 | |
- echo
|
2136 | |
- echo 'You may investigate any problem if you feel able to do so, in which'
|
2137 | |
- echo 'case the test suite provides a good starting point. Its output may'
|
2138 | |
- $as_echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
|
2139 | |
- echo
|
2140 | |
- fi
|
2141 | |
- exit 1
|
2142 | |
+ exit 1
|
2143 | |
fi
|
2144 | |
|
2145 | |
exit 0
|
2146 | |
@@ -1852,36 +1992,28 @@ exit 0
|
2147 | |
## Actual tests. ##
|
2148 | |
## ------------- ##
|
2149 | |
#AT_START_1
|
2150 | |
-# 1. version.at:19: cpio version
|
2151 | |
-at_setup_line='version.at:19'
|
2152 | |
-at_desc="cpio version"
|
2153 | |
-$at_quiet $as_echo_n " 1: $at_desc "
|
2154 | |
+at_fn_group_banner 1 'version.at:19' \
|
2155 | |
+ "cpio version" " "
|
2156 | |
at_xfail=no
|
2157 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2158 | |
(
|
2159 | |
- $as_echo "1. version.at:19: testing ..."
|
2160 | |
+ $as_echo "1. $at_setup_line: testing $at_desc ..."
|
2161 | |
$at_traceon
|
2162 | |
|
2163 | |
|
2164 | |
-{ $at_traceoff
|
2165 | |
+{ set +x
|
2166 | |
$as_echo "$at_srcdir/version.at:21: cpio --version | sed 1q"
|
2167 | |
-echo version.at:21 >"$at_check_line_file"
|
2168 | |
-
|
2169 | |
-if test -n "$at_traceon"; then
|
2170 | |
- ( $at_traceon; cpio --version | sed 1q ) >"$at_stdout" 2>"$at_stder1"
|
2171 | |
- at_func_filter_trace $?
|
2172 | |
-else
|
2173 | |
- ( :; cpio --version | sed 1q ) >"$at_stdout" 2>"$at_stderr"
|
2174 | |
-fi
|
2175 | |
-at_status=$?
|
2176 | |
-at_failed=false
|
2177 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2178 | |
+at_fn_check_prepare_notrace 'a shell pipeline' "version.at:21"
|
2179 | |
+( $at_check_trace; cpio --version | sed 1q
|
2180 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2181 | |
+at_status=$? at_failed=false
|
2182 | |
+$at_check_filter
|
2183 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2184 | |
echo >>"$at_stdout"; $as_echo "cpio (GNU cpio) 2.11
|
2185 | |
" | \
|
2186 | |
$at_diff - "$at_stdout" || at_failed=:
|
2187 | |
-at_func_check_status 0 $at_status "$at_srcdir/version.at:21"
|
2188 | |
-if $at_failed; then
|
2189 | |
- :
|
2190 | |
+at_fn_check_status 0 $at_status "$at_srcdir/version.at:21"
|
2191 | |
+if $at_failed; then :
|
2192 | |
+
|
2193 | |
else
|
2194 | |
|
2195 | |
echo '=============================================================='
|
2196 | |
@@ -1889,25 +2021,21 @@ echo 'WARNING: Not using the proper version, *all* checks dubious...'
|
2197 | |
echo '=============================================================='
|
2198 | |
|
2199 | |
fi
|
2200 | |
-
|
2201 | |
-$at_failed && at_func_log_failure
|
2202 | |
+$at_failed && at_fn_log_failure
|
2203 | |
$at_traceon; }
|
2204 | |
|
2205 | |
|
2206 | |
- $at_traceoff
|
2207 | |
+ set +x
|
2208 | |
$at_times_p && times >"$at_times_file"
|
2209 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2210 | |
-at_status=`cat "$at_status_file"`
|
2211 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2212 | |
+read at_status <"$at_status_file"
|
2213 | |
#AT_STOP_1
|
2214 | |
#AT_START_2
|
2215 | |
-# 2. inout.at:19: basic functionality: copyin/copyout
|
2216 | |
-at_setup_line='inout.at:19'
|
2217 | |
-at_desc="basic functionality: copyin/copyout"
|
2218 | |
-$at_quiet $as_echo_n " 2: $at_desc "
|
2219 | |
+at_fn_group_banner 2 'inout.at:19' \
|
2220 | |
+ "basic functionality: copyin/copyout" " "
|
2221 | |
at_xfail=no
|
2222 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2223 | |
(
|
2224 | |
- $as_echo "2. inout.at:19: testing ..."
|
2225 | |
+ $as_echo "2. $at_setup_line: testing $at_desc ..."
|
2226 | |
$at_traceon
|
2227 | |
|
2228 | |
|
2229 | |
@@ -1924,7 +2052,7 @@ h 45
|
2230 | |
_ATEOF
|
2231 | |
|
2232 | |
|
2233 | |
-{ $at_traceoff
|
2234 | |
+{ set +x
|
2235 | |
$as_echo "$at_srcdir/inout.at:32:
|
2236 | |
while read NAME LENGTH
|
2237 | |
do
|
2238 | |
@@ -1932,51 +2060,35 @@ do
|
2239 | |
echo \$NAME
|
2240 | |
done < filelist |
|
2241 | |
cpio --quiet -o > archive"
|
2242 | |
-echo inout.at:32 >"$at_check_line_file"
|
2243 | |
-
|
2244 | |
-if { echo 'Not enabling shell tracing (command contains an embedded newline)'
|
2245 | |
- false; }; then
|
2246 | |
- ( $at_traceon;
|
2247 | |
-while read NAME LENGTH
|
2248 | |
-do
|
2249 | |
- genfile --length $LENGTH > $NAME
|
2250 | |
- echo $NAME
|
2251 | |
-done < filelist |
|
2252 | |
- cpio --quiet -o > archive ) >"$at_stdout" 2>"$at_stder1"
|
2253 | |
- at_func_filter_trace $?
|
2254 | |
-else
|
2255 | |
- ( :;
|
2256 | |
+at_fn_check_prepare_notrace 'an embedded newline' "inout.at:32"
|
2257 | |
+( $at_check_trace;
|
2258 | |
while read NAME LENGTH
|
2259 | |
do
|
2260 | |
genfile --length $LENGTH > $NAME
|
2261 | |
echo $NAME
|
2262 | |
done < filelist |
|
2263 | |
- cpio --quiet -o > archive ) >"$at_stdout" 2>"$at_stderr"
|
2264 | |
-fi
|
2265 | |
-at_status=$?
|
2266 | |
-at_failed=false
|
2267 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2268 | |
-at_func_diff_devnull "$at_stdout" || at_failed=:
|
2269 | |
-at_func_check_status 0 $at_status "$at_srcdir/inout.at:32"
|
2270 | |
-
|
2271 | |
-$at_failed && at_func_log_failure
|
2272 | |
+ cpio --quiet -o > archive
|
2273 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2274 | |
+at_status=$? at_failed=false
|
2275 | |
+$at_check_filter
|
2276 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2277 | |
+at_fn_diff_devnull "$at_stdout" || at_failed=:
|
2278 | |
+at_fn_check_status 0 $at_status "$at_srcdir/inout.at:32"
|
2279 | |
+$at_failed && at_fn_log_failure
|
2280 | |
$at_traceon; }
|
2281 | |
|
2282 | |
|
2283 | |
- $at_traceoff
|
2284 | |
+ set +x
|
2285 | |
$at_times_p && times >"$at_times_file"
|
2286 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2287 | |
-at_status=`cat "$at_status_file"`
|
2288 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2289 | |
+read at_status <"$at_status_file"
|
2290 | |
#AT_STOP_2
|
2291 | |
#AT_START_3
|
2292 | |
-# 3. symlink.at:22: symlink
|
2293 | |
-at_setup_line='symlink.at:22'
|
2294 | |
-at_desc="symlink"
|
2295 | |
-$at_quiet $as_echo_n " 3: $at_desc "
|
2296 | |
+at_fn_group_banner 3 'symlink.at:22' \
|
2297 | |
+ "symlink" " "
|
2298 | |
at_xfail=no
|
2299 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2300 | |
(
|
2301 | |
- $as_echo "3. symlink.at:22: testing ..."
|
2302 | |
+ $as_echo "3. $at_setup_line: testing $at_desc ..."
|
2303 | |
$at_traceon
|
2304 | |
|
2305 | |
|
2306 | |
@@ -1987,7 +2099,7 @@ symlink
|
2307 | |
_ATEOF
|
2308 | |
|
2309 | |
|
2310 | |
-{ $at_traceoff
|
2311 | |
+{ set +x
|
2312 | |
$as_echo "$at_srcdir/symlink.at:29:
|
2313 | |
genfile --file file
|
2314 | |
ln -s file symlink || exit 77
|
2315 | |
@@ -1999,24 +2111,8 @@ cd dir
|
2316 | |
cpio --quiet -i < ../archive
|
2317 | |
find . | sort
|
2318 | |
"
|
2319 | |
-echo symlink.at:29 >"$at_check_line_file"
|
2320 | |
-
|
2321 | |
-if { echo 'Not enabling shell tracing (command contains an embedded newline)'
|
2322 | |
- false; }; then
|
2323 | |
- ( $at_traceon;
|
2324 | |
-genfile --file file
|
2325 | |
-ln -s file symlink || exit 77
|
2326 | |
-echo Creating the archive
|
2327 | |
-cpio --quiet -o < filelist > archive
|
2328 | |
-echo Extracting the archive
|
2329 | |
-mkdir dir
|
2330 | |
-cd dir
|
2331 | |
-cpio --quiet -i < ../archive
|
2332 | |
-find . | sort
|
2333 | |
- ) >"$at_stdout" 2>"$at_stder1"
|
2334 | |
- at_func_filter_trace $?
|
2335 | |
-else
|
2336 | |
- ( :;
|
2337 | |
+at_fn_check_prepare_notrace 'an embedded newline' "symlink.at:29"
|
2338 | |
+( $at_check_trace;
|
2339 | |
genfile --file file
|
2340 | |
ln -s file symlink || exit 77
|
2341 | |
echo Creating the archive
|
2342 | |
@@ -2026,11 +2122,11 @@ mkdir dir
|
2343 | |
cd dir
|
2344 | |
cpio --quiet -i < ../archive
|
2345 | |
find . | sort
|
2346 | |
- ) >"$at_stdout" 2>"$at_stderr"
|
2347 | |
-fi
|
2348 | |
-at_status=$?
|
2349 | |
-at_failed=false
|
2350 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2351 | |
+
|
2352 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2353 | |
+at_status=$? at_failed=false
|
2354 | |
+$at_check_filter
|
2355 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2356 | |
echo >>"$at_stdout"; $as_echo "Creating the archive
|
2357 | |
Extracting the archive
|
2358 | |
.
|
2359 | |
@@ -2038,26 +2134,22 @@ Extracting the archive
|
2360 | |
./symlink
|
2361 | |
" | \
|
2362 | |
$at_diff - "$at_stdout" || at_failed=:
|
2363 | |
-at_func_check_status 0 $at_status "$at_srcdir/symlink.at:29"
|
2364 | |
-
|
2365 | |
-$at_failed && at_func_log_failure
|
2366 | |
+at_fn_check_status 0 $at_status "$at_srcdir/symlink.at:29"
|
2367 | |
+$at_failed && at_fn_log_failure
|
2368 | |
$at_traceon; }
|
2369 | |
|
2370 | |
|
2371 | |
- $at_traceoff
|
2372 | |
+ set +x
|
2373 | |
$at_times_p && times >"$at_times_file"
|
2374 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2375 | |
-at_status=`cat "$at_status_file"`
|
2376 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2377 | |
+read at_status <"$at_status_file"
|
2378 | |
#AT_STOP_3
|
2379 | |
#AT_START_4
|
2380 | |
-# 4. interdir.at:24: interdir
|
2381 | |
-at_setup_line='interdir.at:24'
|
2382 | |
-at_desc="interdir"
|
2383 | |
-$at_quiet $as_echo_n " 4: $at_desc "
|
2384 | |
+at_fn_group_banner 4 'interdir.at:24' \
|
2385 | |
+ "interdir" " "
|
2386 | |
at_xfail=no
|
2387 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2388 | |
(
|
2389 | |
- $as_echo "4. interdir.at:24: testing ..."
|
2390 | |
+ $as_echo "4. $at_setup_line: testing $at_desc ..."
|
2391 | |
$at_traceon
|
2392 | |
|
2393 | |
|
2394 | |
@@ -2068,7 +2160,7 @@ dir/file
|
2395 | |
_ATEOF
|
2396 | |
|
2397 | |
|
2398 | |
-{ $at_traceoff
|
2399 | |
+{ set +x
|
2400 | |
$as_echo "$at_srcdir/interdir.at:31:
|
2401 | |
umask 022
|
2402 | |
mkdir dir
|
2403 | |
@@ -2083,27 +2175,8 @@ genfile --stat=name,mode.777 en/to/tre
|
2404 | |
genfile --stat=name,mode.777 en/to/tre/dir
|
2405 | |
genfile --stat=name,mode.777 en/to/tre/dir/file
|
2406 | |
"
|
2407 | |
-echo interdir.at:31 >"$at_check_line_file"
|
2408 | |
-
|
2409 | |
-if { echo 'Not enabling shell tracing (command contains an embedded newline)'
|
2410 | |
- false; }; then
|
2411 | |
- ( $at_traceon;
|
2412 | |
-umask 022
|
2413 | |
-mkdir dir
|
2414 | |
-chmod 700 dir
|
2415 | |
-genfile --file dir/file
|
2416 | |
-echo Copying the hierarchy
|
2417 | |
-cpio -pdvm en/to/tre < filelist 2>&1
|
2418 | |
-echo Results
|
2419 | |
-genfile --stat=name,mode.777 en
|
2420 | |
-genfile --stat=name,mode.777 en/to
|
2421 | |
-genfile --stat=name,mode.777 en/to/tre
|
2422 | |
-genfile --stat=name,mode.777 en/to/tre/dir
|
2423 | |
-genfile --stat=name,mode.777 en/to/tre/dir/file
|
2424 | |
- ) >"$at_stdout" 2>"$at_stder1"
|
2425 | |
- at_func_filter_trace $?
|
2426 | |
-else
|
2427 | |
- ( :;
|
2428 | |
+at_fn_check_prepare_notrace 'an embedded newline' "interdir.at:31"
|
2429 | |
+( $at_check_trace;
|
2430 | |
umask 022
|
2431 | |
mkdir dir
|
2432 | |
chmod 700 dir
|
2433 | |
@@ -2116,11 +2189,11 @@ genfile --stat=name,mode.777 en/to
|
2434 | |
genfile --stat=name,mode.777 en/to/tre
|
2435 | |
genfile --stat=name,mode.777 en/to/tre/dir
|
2436 | |
genfile --stat=name,mode.777 en/to/tre/dir/file
|
2437 | |
- ) >"$at_stdout" 2>"$at_stderr"
|
2438 | |
-fi
|
2439 | |
-at_status=$?
|
2440 | |
-at_failed=false
|
2441 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2442 | |
+
|
2443 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2444 | |
+at_status=$? at_failed=false
|
2445 | |
+$at_check_filter
|
2446 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2447 | |
echo >>"$at_stdout"; $as_echo "Copying the hierarchy
|
2448 | |
en/to/tre/dir
|
2449 | |
en/to/tre/dir/file
|
2450 | |
@@ -2133,26 +2206,22 @@ en/to/tre/dir 700
|
2451 | |
en/to/tre/dir/file 644
|
2452 | |
" | \
|
2453 | |
$at_diff - "$at_stdout" || at_failed=:
|
2454 | |
-at_func_check_status 0 $at_status "$at_srcdir/interdir.at:31"
|
2455 | |
-
|
2456 | |
-$at_failed && at_func_log_failure
|
2457 | |
+at_fn_check_status 0 $at_status "$at_srcdir/interdir.at:31"
|
2458 | |
+$at_failed && at_fn_log_failure
|
2459 | |
$at_traceon; }
|
2460 | |
|
2461 | |
|
2462 | |
- $at_traceoff
|
2463 | |
+ set +x
|
2464 | |
$at_times_p && times >"$at_times_file"
|
2465 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2466 | |
-at_status=`cat "$at_status_file"`
|
2467 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2468 | |
+read at_status <"$at_status_file"
|
2469 | |
#AT_STOP_4
|
2470 | |
#AT_START_5
|
2471 | |
-# 5. setstat01.at:17: delayed setstat
|
2472 | |
-at_setup_line='setstat01.at:17'
|
2473 | |
-at_desc="delayed setstat"
|
2474 | |
-$at_quiet $as_echo_n " 5: $at_desc "
|
2475 | |
+at_fn_group_banner 5 'setstat01.at:17' \
|
2476 | |
+ "delayed setstat" " "
|
2477 | |
at_xfail=no
|
2478 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2479 | |
(
|
2480 | |
- $as_echo "5. setstat01.at:17: testing ..."
|
2481 | |
+ $as_echo "5. $at_setup_line: testing $at_desc ..."
|
2482 | |
$at_traceon
|
2483 | |
|
2484 | |
|
2485 | |
@@ -2162,7 +2231,7 @@ echo "# -*- compilation -*-" >> "$at_group_log"
|
2486 | |
# permissions did not allow writing to it, cpio was unable to populate
|
2487 | |
# the directory.
|
2488 | |
|
2489 | |
-{ $at_traceoff
|
2490 | |
+{ set +x
|
2491 | |
$as_echo "$at_srcdir/setstat01.at:25:
|
2492 | |
mkdir dir
|
2493 | |
echo \"test file\" > dir/file
|
2494 | |
@@ -2174,11 +2243,8 @@ mv dir old
|
2495 | |
cpio -i --quiet < archive
|
2496 | |
genfile --stat=mode.777 dir
|
2497 | |
"
|
2498 | |
-echo setstat01.at:25 >"$at_check_line_file"
|
2499 | |
-
|
2500 | |
-if { echo 'Not enabling shell tracing (command contains an embedded newline)'
|
2501 | |
- false; }; then
|
2502 | |
- ( $at_traceon;
|
2503 | |
+at_fn_check_prepare_notrace 'an embedded newline' "setstat01.at:25"
|
2504 | |
+( $at_check_trace;
|
2505 | |
mkdir dir
|
2506 | |
echo "test file" > dir/file
|
2507 | |
chmod 500 dir
|
2508 | |
@@ -2188,47 +2254,30 @@ mv dir old
|
2509 | |
|
2510 | |
cpio -i --quiet < archive
|
2511 | |
genfile --stat=mode.777 dir
|
2512 | |
- ) >"$at_stdout" 2>"$at_stder1"
|
2513 | |
- at_func_filter_trace $?
|
2514 | |
-else
|
2515 | |
- ( :;
|
2516 | |
-mkdir dir
|
2517 | |
-echo "test file" > dir/file
|
2518 | |
-chmod 500 dir
|
2519 | |
-
|
2520 | |
-find dir | cpio -o --quiet > archive
|
2521 | |
-mv dir old
|
2522 | |
|
2523 | |
-cpio -i --quiet < archive
|
2524 | |
-genfile --stat=mode.777 dir
|
2525 | |
- ) >"$at_stdout" 2>"$at_stderr"
|
2526 | |
-fi
|
2527 | |
-at_status=$?
|
2528 | |
-at_failed=false
|
2529 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2530 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2531 | |
+at_status=$? at_failed=false
|
2532 | |
+$at_check_filter
|
2533 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2534 | |
echo >>"$at_stdout"; $as_echo "500
|
2535 | |
" | \
|
2536 | |
$at_diff - "$at_stdout" || at_failed=:
|
2537 | |
-at_func_check_status 0 $at_status "$at_srcdir/setstat01.at:25"
|
2538 | |
-
|
2539 | |
-$at_failed && at_func_log_failure
|
2540 | |
+at_fn_check_status 0 $at_status "$at_srcdir/setstat01.at:25"
|
2541 | |
+$at_failed && at_fn_log_failure
|
2542 | |
$at_traceon; }
|
2543 | |
|
2544 | |
|
2545 | |
- $at_traceoff
|
2546 | |
+ set +x
|
2547 | |
$at_times_p && times >"$at_times_file"
|
2548 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2549 | |
-at_status=`cat "$at_status_file"`
|
2550 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2551 | |
+read at_status <"$at_status_file"
|
2552 | |
#AT_STOP_5
|
2553 | |
#AT_START_6
|
2554 | |
-# 6. setstat02.at:17: delayed setstat (with -depth)
|
2555 | |
-at_setup_line='setstat02.at:17'
|
2556 | |
-at_desc="delayed setstat (with -depth)"
|
2557 | |
-$at_quiet $as_echo_n " 6: $at_desc "
|
2558 | |
+at_fn_group_banner 6 'setstat02.at:17' \
|
2559 | |
+ "delayed setstat (with -depth)" " "
|
2560 | |
at_xfail=no
|
2561 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2562 | |
(
|
2563 | |
- $as_echo "6. setstat02.at:17: testing ..."
|
2564 | |
+ $as_echo "6. $at_setup_line: testing $at_desc ..."
|
2565 | |
$at_traceon
|
2566 | |
|
2567 | |
|
2568 | |
@@ -2243,7 +2292,7 @@ echo "# -*- compilation -*-" >> "$at_group_log"
|
2569 | |
#
|
2570 | |
# See also: setstat03, setstat04, setstat05
|
2571 | |
|
2572 | |
-{ $at_traceoff
|
2573 | |
+{ set +x
|
2574 | |
$as_echo "$at_srcdir/setstat02.at:30:
|
2575 | |
mkdir dir
|
2576 | |
echo \"test file\" > dir/file
|
2577 | |
@@ -2255,11 +2304,8 @@ mv dir old
|
2578 | |
cpio -id --quiet < archive
|
2579 | |
genfile --stat=mode.777 dir
|
2580 | |
"
|
2581 | |
-echo setstat02.at:30 >"$at_check_line_file"
|
2582 | |
-
|
2583 | |
-if { echo 'Not enabling shell tracing (command contains an embedded newline)'
|
2584 | |
- false; }; then
|
2585 | |
- ( $at_traceon;
|
2586 | |
+at_fn_check_prepare_notrace 'an embedded newline' "setstat02.at:30"
|
2587 | |
+( $at_check_trace;
|
2588 | |
mkdir dir
|
2589 | |
echo "test file" > dir/file
|
2590 | |
chmod 500 dir
|
2591 | |
@@ -2269,47 +2315,30 @@ mv dir old
|
2592 | |
|
2593 | |
cpio -id --quiet < archive
|
2594 | |
genfile --stat=mode.777 dir
|
2595 | |
- ) >"$at_stdout" 2>"$at_stder1"
|
2596 | |
- at_func_filter_trace $?
|
2597 | |
-else
|
2598 | |
- ( :;
|
2599 | |
-mkdir dir
|
2600 | |
-echo "test file" > dir/file
|
2601 | |
-chmod 500 dir
|
2602 | |
-
|
2603 | |
-find dir -depth | cpio -o --quiet > archive
|
2604 | |
-mv dir old
|
2605 | |
|
2606 | |
-cpio -id --quiet < archive
|
2607 | |
-genfile --stat=mode.777 dir
|
2608 | |
- ) >"$at_stdout" 2>"$at_stderr"
|
2609 | |
-fi
|
2610 | |
-at_status=$?
|
2611 | |
-at_failed=false
|
2612 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2613 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2614 | |
+at_status=$? at_failed=false
|
2615 | |
+$at_check_filter
|
2616 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2617 | |
echo >>"$at_stdout"; $as_echo "500
|
2618 | |
" | \
|
2619 | |
$at_diff - "$at_stdout" || at_failed=:
|
2620 | |
-at_func_check_status 0 $at_status "$at_srcdir/setstat02.at:30"
|
2621 | |
-
|
2622 | |
-$at_failed && at_func_log_failure
|
2623 | |
+at_fn_check_status 0 $at_status "$at_srcdir/setstat02.at:30"
|
2624 | |
+$at_failed && at_fn_log_failure
|
2625 | |
$at_traceon; }
|
2626 | |
|
2627 | |
|
2628 | |
- $at_traceoff
|
2629 | |
+ set +x
|
2630 | |
$at_times_p && times >"$at_times_file"
|
2631 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2632 | |
-at_status=`cat "$at_status_file"`
|
2633 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2634 | |
+read at_status <"$at_status_file"
|
2635 | |
#AT_STOP_6
|
2636 | |
#AT_START_7
|
2637 | |
-# 7. setstat03.at:17: delayed setstat (copy-pass)
|
2638 | |
-at_setup_line='setstat03.at:17'
|
2639 | |
-at_desc="delayed setstat (copy-pass)"
|
2640 | |
-$at_quiet $as_echo_n " 7: $at_desc "
|
2641 | |
+at_fn_group_banner 7 'setstat03.at:17' \
|
2642 | |
+ "delayed setstat (copy-pass)" " "
|
2643 | |
at_xfail=no
|
2644 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2645 | |
(
|
2646 | |
- $as_echo "7. setstat03.at:17: testing ..."
|
2647 | |
+ $as_echo "7. $at_setup_line: testing $at_desc ..."
|
2648 | |
$at_traceon
|
2649 | |
|
2650 | |
|
2651 | |
@@ -2325,7 +2354,7 @@ echo "# -*- compilation -*-" >> "$at_group_log"
|
2652 | |
#
|
2653 | |
# See also: setstat02, setstat04. setstat05
|
2654 | |
|
2655 | |
-{ $at_traceoff
|
2656 | |
+{ set +x
|
2657 | |
$as_echo "$at_srcdir/setstat03.at:31:
|
2658 | |
mkdir dir
|
2659 | |
echo \"test file\" > dir/file
|
2660 | |
@@ -2335,11 +2364,8 @@ mkdir newdir
|
2661 | |
find dir -depth | cpio -pmaud --quiet newdir
|
2662 | |
genfile --stat=mode.777 newdir/dir
|
2663 | |
"
|
2664 | |
-echo setstat03.at:31 >"$at_check_line_file"
|
2665 | |
-
|
2666 | |
-if { echo 'Not enabling shell tracing (command contains an embedded newline)'
|
2667 | |
- false; }; then
|
2668 | |
- ( $at_traceon;
|
2669 | |
+at_fn_check_prepare_notrace 'an embedded newline' "setstat03.at:31"
|
2670 | |
+( $at_check_trace;
|
2671 | |
mkdir dir
|
2672 | |
echo "test file" > dir/file
|
2673 | |
chmod 500 dir
|
2674 | |
@@ -2347,45 +2373,30 @@ mkdir newdir
|
2675 | |
|
2676 | |
find dir -depth | cpio -pmaud --quiet newdir
|
2677 | |
genfile --stat=mode.777 newdir/dir
|
2678 | |
- ) >"$at_stdout" 2>"$at_stder1"
|
2679 | |
- at_func_filter_trace $?
|
2680 | |
-else
|
2681 | |
- ( :;
|
2682 | |
-mkdir dir
|
2683 | |
-echo "test file" > dir/file
|
2684 | |
-chmod 500 dir
|
2685 | |
-mkdir newdir
|
2686 | |
|
2687 | |
-find dir -depth | cpio -pmaud --quiet newdir
|
2688 | |
-genfile --stat=mode.777 newdir/dir
|
2689 | |
- ) >"$at_stdout" 2>"$at_stderr"
|
2690 | |
-fi
|
2691 | |
-at_status=$?
|
2692 | |
-at_failed=false
|
2693 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2694 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2695 | |
+at_status=$? at_failed=false
|
2696 | |
+$at_check_filter
|
2697 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2698 | |
echo >>"$at_stdout"; $as_echo "500
|
2699 | |
" | \
|
2700 | |
$at_diff - "$at_stdout" || at_failed=:
|
2701 | |
-at_func_check_status 0 $at_status "$at_srcdir/setstat03.at:31"
|
2702 | |
-
|
2703 | |
-$at_failed && at_func_log_failure
|
2704 | |
+at_fn_check_status 0 $at_status "$at_srcdir/setstat03.at:31"
|
2705 | |
+$at_failed && at_fn_log_failure
|
2706 | |
$at_traceon; }
|
2707 | |
|
2708 | |
|
2709 | |
- $at_traceoff
|
2710 | |
+ set +x
|
2711 | |
$at_times_p && times >"$at_times_file"
|
2712 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2713 | |
-at_status=`cat "$at_status_file"`
|
2714 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2715 | |
+read at_status <"$at_status_file"
|
2716 | |
#AT_STOP_7
|
2717 | |
#AT_START_8
|
2718 | |
-# 8. setstat04.at:17: delayed setstat (umask)
|
2719 | |
-at_setup_line='setstat04.at:17'
|
2720 | |
-at_desc="delayed setstat (umask)"
|
2721 | |
-$at_quiet $as_echo_n " 8: $at_desc "
|
2722 | |
+at_fn_group_banner 8 'setstat04.at:17' \
|
2723 | |
+ "delayed setstat (umask)" " "
|
2724 | |
at_xfail=no
|
2725 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2726 | |
(
|
2727 | |
- $as_echo "8. setstat04.at:17: testing ..."
|
2728 | |
+ $as_echo "8. $at_setup_line: testing $at_desc ..."
|
2729 | |
$at_traceon
|
2730 | |
|
2731 | |
|
2732 | |
@@ -2402,7 +2413,7 @@ echo "# -*- compilation -*-" >> "$at_group_log"
|
2733 | |
#
|
2734 | |
# See also: setstat02, setstat03, setstat05
|
2735 | |
|
2736 | |
-{ $at_traceoff
|
2737 | |
+{ set +x
|
2738 | |
$as_echo "$at_srcdir/setstat04.at:32:
|
2739 | |
umask 022
|
2740 | |
mkdir dir
|
2741 | |
@@ -2415,11 +2426,8 @@ umask 077
|
2742 | |
cpio -id --quiet < archive
|
2743 | |
genfile --stat=mode.777 dir
|
2744 | |
"
|
2745 | |
-echo setstat04.at:32 >"$at_check_line_file"
|
2746 | |
-
|
2747 | |
-if { echo 'Not enabling shell tracing (command contains an embedded newline)'
|
2748 | |
- false; }; then
|
2749 | |
- ( $at_traceon;
|
2750 | |
+at_fn_check_prepare_notrace 'an embedded newline' "setstat04.at:32"
|
2751 | |
+( $at_check_trace;
|
2752 | |
umask 022
|
2753 | |
mkdir dir
|
2754 | |
echo "test file" > dir/file
|
2755 | |
@@ -2430,48 +2438,30 @@ mv dir old
|
2756 | |
umask 077
|
2757 | |
cpio -id --quiet < archive
|
2758 | |
genfile --stat=mode.777 dir
|
2759 | |
- ) >"$at_stdout" 2>"$at_stder1"
|
2760 | |
- at_func_filter_trace $?
|
2761 | |
-else
|
2762 | |
- ( :;
|
2763 | |
-umask 022
|
2764 | |
-mkdir dir
|
2765 | |
-echo "test file" > dir/file
|
2766 | |
-mkdir newdir
|
2767 | |
-find dir -depth | cpio -o --quiet > archive
|
2768 | |
-mv dir old
|
2769 | |
|
2770 | |
-umask 077
|
2771 | |
-cpio -id --quiet < archive
|
2772 | |
-genfile --stat=mode.777 dir
|
2773 | |
- ) >"$at_stdout" 2>"$at_stderr"
|
2774 | |
-fi
|
2775 | |
-at_status=$?
|
2776 | |
-at_failed=false
|
2777 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2778 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2779 | |
+at_status=$? at_failed=false
|
2780 | |
+$at_check_filter
|
2781 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2782 | |
echo >>"$at_stdout"; $as_echo "755
|
2783 | |
" | \
|
2784 | |
$at_diff - "$at_stdout" || at_failed=:
|
2785 | |
-at_func_check_status 0 $at_status "$at_srcdir/setstat04.at:32"
|
2786 | |
-
|
2787 | |
-$at_failed && at_func_log_failure
|
2788 | |
+at_fn_check_status 0 $at_status "$at_srcdir/setstat04.at:32"
|
2789 | |
+$at_failed && at_fn_log_failure
|
2790 | |
$at_traceon; }
|
2791 | |
|
2792 | |
|
2793 | |
- $at_traceoff
|
2794 | |
+ set +x
|
2795 | |
$at_times_p && times >"$at_times_file"
|
2796 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2797 | |
-at_status=`cat "$at_status_file"`
|
2798 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2799 | |
+read at_status <"$at_status_file"
|
2800 | |
#AT_STOP_8
|
2801 | |
#AT_START_9
|
2802 | |
-# 9. setstat05.at:17: delayed setstat (umask, copy-pass)
|
2803 | |
-at_setup_line='setstat05.at:17'
|
2804 | |
-at_desc="delayed setstat (umask, copy-pass)"
|
2805 | |
-$at_quiet $as_echo_n " 9: $at_desc "
|
2806 | |
+at_fn_group_banner 9 'setstat05.at:17' \
|
2807 | |
+ "delayed setstat (umask, copy-pass)" " "
|
2808 | |
at_xfail=no
|
2809 | |
-echo "# -*- compilation -*-" >> "$at_group_log"
|
2810 | |
(
|
2811 | |
- $as_echo "9. setstat05.at:17: testing ..."
|
2812 | |
+ $as_echo "9. $at_setup_line: testing $at_desc ..."
|
2813 | |
$at_traceon
|
2814 | |
|
2815 | |
|
2816 | |
@@ -2488,7 +2478,7 @@ echo "# -*- compilation -*-" >> "$at_group_log"
|
2817 | |
#
|
2818 | |
# See also: setstat02, setstat03
|
2819 | |
|
2820 | |
-{ $at_traceoff
|
2821 | |
+{ set +x
|
2822 | |
$as_echo "$at_srcdir/setstat05.at:32:
|
2823 | |
umask 022
|
2824 | |
mkdir dir
|
2825 | |
@@ -2498,22 +2488,8 @@ umask 077
|
2826 | |
find dir -depth | cpio -pmaud --quiet newdir
|
2827 | |
genfile --stat=mode.777 newdir/dir
|
2828 | |
"
|
2829 | |
-echo setstat05.at:32 >"$at_check_line_file"
|
2830 | |
-
|
2831 | |
-if { echo 'Not enabling shell tracing (command contains an embedded newline)'
|
2832 | |
- false; }; then
|
2833 | |
- ( $at_traceon;
|
2834 | |
-umask 022
|
2835 | |
-mkdir dir
|
2836 | |
-echo "test file" > dir/file
|
2837 | |
-mkdir newdir
|
2838 | |
-umask 077
|
2839 | |
-find dir -depth | cpio -pmaud --quiet newdir
|
2840 | |
-genfile --stat=mode.777 newdir/dir
|
2841 | |
- ) >"$at_stdout" 2>"$at_stder1"
|
2842 | |
- at_func_filter_trace $?
|
2843 | |
-else
|
2844 | |
- ( :;
|
2845 | |
+at_fn_check_prepare_notrace 'an embedded newline' "setstat05.at:32"
|
2846 | |
+( $at_check_trace;
|
2847 | |
umask 022
|
2848 | |
mkdir dir
|
2849 | |
echo "test file" > dir/file
|
2850 | |
@@ -2521,22 +2497,21 @@ mkdir newdir
|
2851 | |
umask 077
|
2852 | |
find dir -depth | cpio -pmaud --quiet newdir
|
2853 | |
genfile --stat=mode.777 newdir/dir
|
2854 | |
- ) >"$at_stdout" 2>"$at_stderr"
|
2855 | |
-fi
|
2856 | |
-at_status=$?
|
2857 | |
-at_failed=false
|
2858 | |
-at_func_diff_devnull "$at_stderr" || at_failed=:
|
2859 | |
+
|
2860 | |
+) >>"$at_stdout" 2>>"$at_stderr"
|
2861 | |
+at_status=$? at_failed=false
|
2862 | |
+$at_check_filter
|
2863 | |
+at_fn_diff_devnull "$at_stderr" || at_failed=:
|
2864 | |
echo >>"$at_stdout"; $as_echo "755
|
2865 | |
" | \
|
2866 | |
$at_diff - "$at_stdout" || at_failed=:
|
2867 | |
-at_func_check_status 0 $at_status "$at_srcdir/setstat05.at:32"
|
2868 | |
-
|
2869 | |
-$at_failed && at_func_log_failure
|
2870 | |
+at_fn_check_status 0 $at_status "$at_srcdir/setstat05.at:32"
|
2871 | |
+$at_failed && at_fn_log_failure
|
2872 | |
$at_traceon; }
|
2873 | |
|
2874 | |
|
2875 | |
- $at_traceoff
|
2876 | |
+ set +x
|
2877 | |
$at_times_p && times >"$at_times_file"
|
2878 | |
-) 5>&1 2>&1 | eval $at_tee_pipe
|
2879 | |
-at_status=`cat "$at_status_file"`
|
2880 | |
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
|
2881 | |
+read at_status <"$at_status_file"
|
2882 | |
#AT_STOP_9
|