Debian Codegraph @

testsuite

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