1#! /bin/sh 2# Generated from /usr/opt/projects/source/fth/tests/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 13DUALCASE=1; export DUALCASE # for MKS sh 14if 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 21else 22 case `(set -o) 2>/dev/null` in #( 23 *posix*) : 24 set -o posix ;; #( 25 *) : 26 ;; 27esac 28fi 29 30 31as_nl=' 32' 33export as_nl 34# Printing a long string crashes Solaris 7 /usr/bin/printf. 35as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 36as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 37as_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. 40if 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 --' 44elif (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' 47else 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' 67fi 68 69# The user is always right. 70if 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 } 76fi 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.) 84IFS=" "" $as_nl" 85 86# Find who we are. Look in the path if we contain no directory separator. 87as_myself= 88case $0 in #(( 89 *[\\/]* ) as_myself=$0 ;; 90 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 91for as_dir in $PATH 92do 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 97IFS=$as_save_IFS 98 99 ;; 100esac 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. 103if test "x$as_myself" = x; then 104 as_myself=$0 105fi 106if test ! -f "$as_myself"; then 107 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 108 exit 1 109fi 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. 115for as_var in BASH_ENV ENV MAIL MAILPATH 116do eval test x\${$as_var+set} = xset \ 117 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 118done 119PS1='$ ' 120PS2='> ' 121PS4='+ ' 122 123# NLS nuisances. 124LC_ALL=C 125export LC_ALL 126LANGUAGE=C 127export LANGUAGE 128 129# CDPATH. 130(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 131 132if 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 140else 141 case \`(set -o) 2>/dev/null\` in #( 142 *posix*) : 143 set -o posix ;; #( 144 *) : 145 ;; 146esac 147fi 148" 149 as_required="as_fn_return () { (exit \$1); } 150as_fn_success () { as_fn_return 0; } 151as_fn_failure () { as_fn_return 1; } 152as_fn_ret_success () { return 0; } 153as_fn_ret_failure () { return 1; } 154 155exitcode=0 156as_fn_success || { exitcode=1; echo as_fn_success failed.; } 157as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 158as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 159as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 160if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 161 162else 163 exitcode=1; echo positional parameters were not saved. 164fi 165test x\$exitcode = x0 || exit 1 166test -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 171test \$(( 1 + 1 )) = 2 || exit 1" 172 if (eval "$as_required") 2>/dev/null; then : 173 as_have_required=yes 174else 175 as_have_required=no 176fi 177 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 178 179else 180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 181as_found=false 182for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 183do 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 197fi 198fi 199 done;; 200 esac 201 as_found=false 202done 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 206fi; } 207IFS=$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. 216BASH_ENV=/dev/null 217ENV=/dev/null 218(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 219case $- in # (((( 220 *v*x* | *x*v* ) as_opts=-vx ;; 221 *v* ) as_opts=-v ;; 222 *x* ) as_opts=-x ;; 223 * ) as_opts= ;; 224esac 225exec $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 229exit 255 230fi 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 bug-autoconf@gnu.org 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 245fi 246fi 247fi 248SHELL=${CONFIG_SHELL-/bin/sh} 249export SHELL 250# Unset more variables known to interfere with behavior of common tools. 251CLICOLOR_FORCE= GREP_OPTIONS= 252unset CLICOLOR_FORCE GREP_OPTIONS 253 254## --------------------- ## 255## M4sh Shell Functions. ## 256## --------------------- ## 257# as_fn_unset VAR 258# --------------- 259# Portably unset VAR. 260as_fn_unset () 261{ 262 { eval $1=; unset $1;} 263} 264as_unset=as_fn_unset 265 266# as_fn_set_status STATUS 267# ----------------------- 268# Set $? to STATUS, without forking. 269as_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. 277as_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. 287as_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. 335as_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. 345if (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 }' 350else 351 as_fn_append () 352 { 353 eval $1=\$$1\$2 354 } 355fi # 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. 362if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 363 eval 'as_fn_arith () 364 { 365 as_val=$(( $* )) 366 }' 367else 368 as_fn_arith () 369 { 370 as_val=`expr "$@" || test $? -eq 1` 371 } 372fi # 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. 380as_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 391if expr a : '\(a\)' >/dev/null 2>&1 && 392 test "X`expr 00001 : '.*\(...\)'`" = X001; then 393 as_expr=expr 394else 395 as_expr=false 396fi 397 398if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 399 as_basename=basename 400else 401 as_basename=false 402fi 403 404as_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 423if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 424 as_dirname=dirname 425else 426 as_dirname=false 427fi 428 429# Avoid depending upon Character Ranges. 430as_cr_letters='abcdefghijklmnopqrstuvwxyz' 431as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 432as_cr_Letters=$as_cr_letters$as_cr_LETTERS 433as_cr_digits='0123456789' 434as_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 472ECHO_C= ECHO_N= ECHO_T= 473case `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';; 483esac 484 485rm -f conf$$ conf$$.exe conf$$.file 486if test -d conf$$.dir; then 487 rm -f conf$$.dir/conf$$.file 488else 489 rm -f conf$$.dir 490 mkdir conf$$.dir 2>/dev/null 491fi 492if (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 506else 507 as_ln_s='cp -pR' 508fi 509rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 510rmdir conf$$.dir 2>/dev/null 511 512if mkdir -p . 2>/dev/null; then 513 as_mkdir_p='mkdir -p "$as_dir"' 514else 515 test -d ./-p && rmdir ./-p 516 as_mkdir_p=false 517fi 518 519as_test_x='test -x' 520as_executable_p=as_fn_executable_p 521 522# Sed expression to map a string onto a valid CPP name. 523as_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. 526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 527 528 529 530 531 532SHELL=${CONFIG_SHELL-/bin/sh} 533 534# How were we run? 535at_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. 540at_times_p=false 541(times) >/dev/null 2>&1 && at_times_p=: 542 543# CLI Arguments to pass to the debugging scripts. 544at_debug_args= 545# -e sets to true 546at_errexit_p=false 547# Shall we be verbose? ':' means no, empty means yes. 548at_verbose=: 549at_quiet= 550# Running several jobs in parallel, 0 means as many as test groups. 551at_jobs=1 552at_traceon=: 553at_trace_echo=: 554at_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. 558at_debug_p=false 559# Display help message? 560at_help_p=false 561# Display the version message? 562at_version_p=false 563# List test groups? 564at_list_p=false 565# --clean 566at_clean=false 567# Test groups to run 568at_groups= 569# Whether to rerun failed tests. 570at_recheck= 571# Whether a write failure occurred 572at_write_fail=0 573 574# The directory we run the suite in. Default to . if no -C option. 575at_dir=`pwd` 576# An absolute reference to this testsuite script. 577case $as_myself in 578 [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;; 579 * ) at_myself=$at_dir/$as_myself ;; 580esac 581# Whether -C is in effect. 582at_change_dir=false 583 584# Whether to enable colored test results. 585at_color=no 586# List of the tested programs. 587at_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. 591at_format='??' 592# Description of all the test groups. 593at_help_all="1;testsuite.at:45;array ...;; 5942;testsuite.at:46;list ...;; 5953;testsuite.at:47;hash ...;; 5964;testsuite.at:48;IO ...;; 5975;testsuite.at:50;file ...;; 5986;testsuite.at:52;misc ...;; 5997;testsuite.at:53;numbers ...;; 6008;testsuite.at:54;proc ...;; 6019;testsuite.at:55;hook ...;; 60210;testsuite.at:56;string ...;; 60311;testsuite.at:57;regexp ...;; 60412;testsuite.at:58;symbol, keyword, exception ...;; 605" 606# List of the all the test groups. 607at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'` 608 609# at_fn_validate_ranges NAME... 610# ----------------------------- 611# Validate and normalize the test group number contained in each variable 612# NAME. Leading zeroes are treated as decimal. 613at_fn_validate_ranges () 614{ 615 for at_grp 616 do 617 eval at_value=\$$at_grp 618 if test $at_value -lt 1 || test $at_value -gt 12; then 619 $as_echo "invalid test group: $at_value" >&2 620 exit 1 621 fi 622 case $at_value in 623 0*) # We want to treat leading 0 as decimal, like expr and test, but 624 # AS_VAR_ARITH treats it as octal if it uses $(( )). 625 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the 626 # expr fork, but it is not worth the effort to determine if the 627 # shell supports XSI when the user can just avoid leading 0. 628 eval $at_grp='`expr $at_value + 0`' ;; 629 esac 630 done 631} 632 633at_prev= 634for at_option 635do 636 # If the previous option needs an argument, assign it. 637 if test -n "$at_prev"; then 638 at_option=$at_prev=$at_option 639 at_prev= 640 fi 641 642 case $at_option in 643 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;; 644 *) at_optarg= ;; 645 esac 646 647 # Accept the important Cygnus configure options, so we can diagnose typos. 648 649 case $at_option in 650 --help | -h ) 651 at_help_p=: 652 ;; 653 654 --list | -l ) 655 at_list_p=: 656 ;; 657 658 --version | -V ) 659 at_version_p=: 660 ;; 661 662 --clean | -c ) 663 at_clean=: 664 ;; 665 666 --color ) 667 at_color=always 668 ;; 669 --color=* ) 670 case $at_optarg in 671 no | never | none) at_color=never ;; 672 auto | tty | if-tty) at_color=auto ;; 673 always | yes | force) at_color=always ;; 674 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'` 675 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;; 676 esac 677 ;; 678 679 --debug | -d ) 680 at_debug_p=: 681 ;; 682 683 --errexit | -e ) 684 at_debug_p=: 685 at_errexit_p=: 686 ;; 687 688 --verbose | -v ) 689 at_verbose=; at_quiet=: 690 ;; 691 692 --trace | -x ) 693 at_traceon='set -x' 694 at_trace_echo=echo 695 at_check_filter_trace=at_fn_filter_trace 696 ;; 697 698 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) 699 at_fn_validate_ranges at_option 700 as_fn_append at_groups "$at_option$as_nl" 701 ;; 702 703 # Ranges 704 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) 705 at_range_start=`echo $at_option |tr -d X-` 706 at_fn_validate_ranges at_range_start 707 at_range=`$as_echo "$at_groups_all" | \ 708 sed -ne '/^'$at_range_start'$/,$p'` 709 as_fn_append at_groups "$at_range$as_nl" 710 ;; 711 712 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) 713 at_range_end=`echo $at_option |tr -d X-` 714 at_fn_validate_ranges at_range_end 715 at_range=`$as_echo "$at_groups_all" | \ 716 sed -ne '1,/^'$at_range_end'$/p'` 717 as_fn_append at_groups "$at_range$as_nl" 718 ;; 719 720 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ 721 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \ 722 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \ 723 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \ 724 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \ 725 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] ) 726 at_range_start=`expr $at_option : '\(.*\)-'` 727 at_range_end=`expr $at_option : '.*-\(.*\)'` 728 if test $at_range_start -gt $at_range_end; then 729 at_tmp=$at_range_end 730 at_range_end=$at_range_start 731 at_range_start=$at_tmp 732 fi 733 at_fn_validate_ranges at_range_start at_range_end 734 at_range=`$as_echo "$at_groups_all" | \ 735 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'` 736 as_fn_append at_groups "$at_range$as_nl" 737 ;; 738 739 # Directory selection. 740 --directory | -C ) 741 at_prev=--directory 742 ;; 743 --directory=* ) 744 at_change_dir=: 745 at_dir=$at_optarg 746 if test x- = "x$at_dir" ; then 747 at_dir=./- 748 fi 749 ;; 750 751 # Parallel execution. 752 --jobs | -j ) 753 at_jobs=0 754 ;; 755 --jobs=* | -j[0-9]* ) 756 if test -n "$at_optarg"; then 757 at_jobs=$at_optarg 758 else 759 at_jobs=`expr X$at_option : 'X-j\(.*\)'` 760 fi 761 case $at_jobs in *[!0-9]*) 762 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` 763 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;; 764 esac 765 ;; 766 767 # Keywords. 768 --keywords | -k ) 769 at_prev=--keywords 770 ;; 771 --keywords=* ) 772 at_groups_selected=$at_help_all 773 at_save_IFS=$IFS 774 IFS=, 775 set X $at_optarg 776 shift 777 IFS=$at_save_IFS 778 for at_keyword 779 do 780 at_invert= 781 case $at_keyword in 782 '!'*) 783 at_invert="-v" 784 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'` 785 ;; 786 esac 787 # It is on purpose that we match the test group titles too. 788 at_groups_selected=`$as_echo "$at_groups_selected" | 789 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` 790 done 791 # Smash the keywords. 792 at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'` 793 as_fn_append at_groups "$at_groups_selected$as_nl" 794 ;; 795 --recheck) 796 at_recheck=: 797 ;; 798 799 *=*) 800 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` 801 # Reject names that are not valid shell variable names. 802 case $at_envvar in 803 '' | [0-9]* | *[!_$as_cr_alnum]* ) 804 as_fn_error $? "invalid variable name: \`$at_envvar'" ;; 805 esac 806 at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` 807 # Export now, but save eval for later and for debug scripts. 808 export $at_envvar 809 as_fn_append at_debug_args " $at_envvar='$at_value'" 810 ;; 811 812 *) $as_echo "$as_me: invalid option: $at_option" >&2 813 $as_echo "Try \`$0 --help' for more information." >&2 814 exit 1 815 ;; 816 esac 817done 818 819# Verify our last option didn't require an argument 820if test -n "$at_prev"; then : 821 as_fn_error $? "\`$at_prev' requires an argument" 822fi 823 824# The file containing the suite. 825at_suite_log=$at_dir/$as_me.log 826 827# Selected test groups. 828if test -z "$at_groups$at_recheck"; then 829 at_groups=$at_groups_all 830else 831 if test -n "$at_recheck" && test -r "$at_suite_log"; then 832 at_oldfails=`sed -n ' 833 /^Failed tests:$/,/^Skipped tests:$/{ 834 s/^[ ]*\([1-9][0-9]*\):.*/\1/p 835 } 836 /^Unexpected passes:$/,/^## Detailed failed tests/{ 837 s/^[ ]*\([1-9][0-9]*\):.*/\1/p 838 } 839 /^## Detailed failed tests/q 840 ' "$at_suite_log"` 841 as_fn_append at_groups "$at_oldfails$as_nl" 842 fi 843 # Sort the tests, removing duplicates. 844 at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'` 845fi 846 847if test x"$at_color" = xalways \ 848 || { test x"$at_color" = xauto && test -t 1; }; then 849 at_red=`printf '\033[0;31m'` 850 at_grn=`printf '\033[0;32m'` 851 at_lgn=`printf '\033[1;32m'` 852 at_blu=`printf '\033[1;34m'` 853 at_std=`printf '\033[m'` 854else 855 at_red= at_grn= at_lgn= at_blu= at_std= 856fi 857 858# Help message. 859if $at_help_p; then 860 cat <<_ATEOF || at_write_fail=1 861Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] 862 863Run all the tests, or the selected TESTS, given by numeric ranges, and 864save a detailed log file. Upon failure, create debugging scripts. 865 866Do not change environment variables directly. Instead, set them via 867command line arguments. Set \`AUTOTEST_PATH' to select the executables 868to exercise. Each relative directory is expanded as build and source 869directories relative to the top level of this distribution. 870E.g., from within the build directory /tmp/foo-1.0, invoking this: 871 872 $ $0 AUTOTEST_PATH=bin 873 874is equivalent to the following, assuming the source directory is /src/foo-1.0: 875 876 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0 877_ATEOF 878cat <<_ATEOF || at_write_fail=1 879 880Operation modes: 881 -h, --help print the help message, then exit 882 -V, --version print version number, then exit 883 -c, --clean remove all the files this test suite might create and exit 884 -l, --list describes all the tests, or the selected TESTS 885_ATEOF 886cat <<_ATEOF || at_write_fail=1 887 888Execution tuning: 889 -C, --directory=DIR 890 change to directory DIR before starting 891 --color[=never|auto|always] 892 enable colored test results on terminal, or always 893 -j, --jobs[=N] 894 Allow N jobs at once; infinite jobs with no arg (default 1) 895 -k, --keywords=KEYWORDS 896 select the tests matching all the comma-separated KEYWORDS 897 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD 898 --recheck select all tests that failed or passed unexpectedly last time 899 -e, --errexit abort as soon as a test fails; implies --debug 900 -v, --verbose force more detailed output 901 default for debugging scripts 902 -d, --debug inhibit clean up and top-level logging 903 default for debugging scripts 904 -x, --trace enable tests shell tracing 905_ATEOF 906cat <<_ATEOF || at_write_fail=1 907 908Report bugs to <mi-scholz@users.sourceforge.net>. 909_ATEOF 910 exit $at_write_fail 911fi 912 913# List of tests. 914if $at_list_p; then 915 cat <<_ATEOF || at_write_fail=1 916FTH 1.4.1 test suite: primitive test groups: 917 918 NUM: FILE-NAME:LINE TEST-GROUP-NAME 919 KEYWORDS 920 921_ATEOF 922 # Pass an empty line as separator between selected groups and help. 923 $as_echo "$at_groups$as_nl$as_nl$at_help_all" | 924 awk 'NF == 1 && FS != ";" { 925 selected[$ 1] = 1 926 next 927 } 928 /^$/ { FS = ";" } 929 NF > 0 { 930 if (selected[$ 1]) { 931 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 932 if ($ 4) { 933 lmax = 79 934 indent = " " 935 line = indent 936 len = length (line) 937 n = split ($ 4, a, " ") 938 for (i = 1; i <= n; i++) { 939 l = length (a[i]) + 1 940 if (i > 1 && len + l > lmax) { 941 print line 942 line = indent " " a[i] 943 len = length (line) 944 } else { 945 line = line " " a[i] 946 len += l 947 } 948 } 949 if (n) 950 print line 951 } 952 } 953 }' || at_write_fail=1 954 exit $at_write_fail 955fi 956if $at_version_p; then 957 $as_echo "$as_me (FTH 1.4.1)" && 958 cat <<\_ATEOF || at_write_fail=1 959 960Copyright (C) 2012 Free Software Foundation, Inc. 961This test suite is free software; the Free Software Foundation gives 962unlimited permission to copy, distribute and modify it. 963_ATEOF 964 exit $at_write_fail 965fi 966 967# Should we print banners? Yes if more than one test is run. 968case $at_groups in #( 969 *$as_nl* ) 970 at_print_banners=: ;; #( 971 * ) at_print_banners=false ;; 972esac 973# Text for banner N, set to a single space once printed. 974 975# Take any -C into account. 976if $at_change_dir ; then 977 test x != "x$at_dir" && cd "$at_dir" \ 978 || as_fn_error $? "unable to change directory" 979 at_dir=`pwd` 980fi 981 982# Load the config files for any default variable assignments. 983for at_file in atconfig atlocal 984do 985 test -r $at_file || continue 986 . ./$at_file || as_fn_error $? "invalid content: $at_file" 987done 988 989# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: 990: "${at_top_build_prefix=$at_top_builddir}" 991 992# Perform any assignments requested during argument parsing. 993eval "$at_debug_args" 994 995# atconfig delivers names relative to the directory the test suite is 996# in, but the groups themselves are run in testsuite-dir/group-dir. 997if test -n "$at_top_srcdir"; then 998 builddir=../.. 999 for at_dir_var in srcdir top_srcdir top_build_prefix 1000 do 1001 eval at_val=\$at_$at_dir_var 1002 case $at_val in 1003 [\\/$]* | ?:[\\/]* ) at_prefix= ;; 1004 *) at_prefix=../../ ;; 1005 esac 1006 eval "$at_dir_var=\$at_prefix\$at_val" 1007 done 1008fi 1009 1010## -------------------- ## 1011## Directory structure. ## 1012## -------------------- ## 1013 1014# This is the set of directories and files used by this script 1015# (non-literals are capitalized): 1016# 1017# TESTSUITE - the testsuite 1018# TESTSUITE.log - summarizes the complete testsuite run 1019# TESTSUITE.dir/ - created during a run, remains after -d or failed test 1020# + at-groups/ - during a run: status of all groups in run 1021# | + NNN/ - during a run: meta-data about test group NNN 1022# | | + check-line - location (source file and line) of current AT_CHECK 1023# | | + status - exit status of current AT_CHECK 1024# | | + stdout - stdout of current AT_CHECK 1025# | | + stder1 - stderr, including trace 1026# | | + stderr - stderr, with trace filtered out 1027# | | + test-source - portion of testsuite that defines group 1028# | | + times - timestamps for computing duration 1029# | | + pass - created if group passed 1030# | | + xpass - created if group xpassed 1031# | | + fail - created if group failed 1032# | | + xfail - created if group xfailed 1033# | | + skip - created if group skipped 1034# + at-stop - during a run: end the run if this file exists 1035# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction 1036# + 0..NNN/ - created for each group NNN, remains after -d or failed test 1037# | + TESTSUITE.log - summarizes the group results 1038# | + ... - files created during the group 1039 1040# The directory the whole suite works in. 1041# Should be absolute to let the user `cd' at will. 1042at_suite_dir=$at_dir/$as_me.dir 1043# The file containing the suite ($at_dir might have changed since earlier). 1044at_suite_log=$at_dir/$as_me.log 1045# The directory containing helper files per test group. 1046at_helper_dir=$at_suite_dir/at-groups 1047# Stop file: if it exists, do not start new jobs. 1048at_stop_file=$at_suite_dir/at-stop 1049# The fifo used for the job dispatcher. 1050at_job_fifo=$at_suite_dir/at-job-fifo 1051 1052if $at_clean; then 1053 test -d "$at_suite_dir" && 1054 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; 1055 rm -f -r "$at_suite_dir" "$at_suite_log" 1056 exit $? 1057fi 1058 1059# Don't take risks: use only absolute directories in PATH. 1060# 1061# For stand-alone test suites (ie. atconfig was not found), 1062# AUTOTEST_PATH is relative to `.'. 1063# 1064# For embedded test suites, AUTOTEST_PATH is relative to the top level 1065# of the package. Then expand it into build/src parts, since users 1066# may create executables in both places. 1067AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"` 1068at_path= 1069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1070for as_dir in $AUTOTEST_PATH $PATH 1071do 1072 IFS=$as_save_IFS 1073 test -z "$as_dir" && as_dir=. 1074 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR 1075case $as_dir in 1076 [\\/]* | ?:[\\/]* ) 1077 as_fn_append at_path "$as_dir" 1078 ;; 1079 * ) 1080 if test -z "$at_top_build_prefix"; then 1081 # Stand-alone test suite. 1082 as_fn_append at_path "$as_dir" 1083 else 1084 # Embedded test suite. 1085 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR" 1086 as_fn_append at_path "$at_top_srcdir/$as_dir" 1087 fi 1088 ;; 1089esac 1090 done 1091IFS=$as_save_IFS 1092 1093 1094# Now build and simplify PATH. 1095# 1096# There might be directories that don't exist, but don't redirect 1097# builtins' (eg., cd) stderr directly: Ultrix's sh hates that. 1098at_new_path= 1099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1100for as_dir in $at_path 1101do 1102 IFS=$as_save_IFS 1103 test -z "$as_dir" && as_dir=. 1104 test -d "$as_dir" || continue 1105case $as_dir in 1106 [\\/]* | ?:[\\/]* ) ;; 1107 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; 1108esac 1109case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in 1110 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; 1111 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; 1112 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;; 1113esac 1114 done 1115IFS=$as_save_IFS 1116 1117PATH=$at_new_path 1118export PATH 1119 1120# Setting up the FDs. 1121 1122 1123 1124# 5 is the log file. Not to be overwritten if `-d'. 1125if $at_debug_p; then 1126 at_suite_log=/dev/null 1127else 1128 : >"$at_suite_log" 1129fi 1130exec 5>>"$at_suite_log" 1131 1132# Banners and logs. 1133$as_echo "## -------------------------------- ## 1134## FTH 1.4.1 test suite: primitive. ## 1135## -------------------------------- ##" 1136{ 1137 $as_echo "## -------------------------------- ## 1138## FTH 1.4.1 test suite: primitive. ## 1139## -------------------------------- ##" 1140 echo 1141 1142 $as_echo "$as_me: command line was:" 1143 $as_echo " \$ $0 $at_cli_args" 1144 echo 1145 1146 # If ChangeLog exists, list a few lines in case it might help determining 1147 # the exact version. 1148 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then 1149 $as_echo "## ---------- ## 1150## ChangeLog. ## 1151## ---------- ##" 1152 echo 1153 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog" 1154 echo 1155 fi 1156 1157 { 1158cat <<_ASUNAME 1159## --------- ## 1160## Platform. ## 1161## --------- ## 1162 1163hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1164uname -m = `(uname -m) 2>/dev/null || echo unknown` 1165uname -r = `(uname -r) 2>/dev/null || echo unknown` 1166uname -s = `(uname -s) 2>/dev/null || echo unknown` 1167uname -v = `(uname -v) 2>/dev/null || echo unknown` 1168 1169/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1170/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1171 1172/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1173/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1174/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1175/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1176/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1177/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1178/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1179 1180_ASUNAME 1181 1182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1183for as_dir in $PATH 1184do 1185 IFS=$as_save_IFS 1186 test -z "$as_dir" && as_dir=. 1187 $as_echo "PATH: $as_dir" 1188 done 1189IFS=$as_save_IFS 1190 1191} 1192 echo 1193 1194 # Contents of the config files. 1195 for at_file in atconfig atlocal 1196 do 1197 test -r $at_file || continue 1198 $as_echo "$as_me: $at_file:" 1199 sed 's/^/| /' $at_file 1200 echo 1201 done 1202} >&5 1203 1204 1205## ------------------------- ## 1206## Autotest shell functions. ## 1207## ------------------------- ## 1208 1209# at_fn_banner NUMBER 1210# ------------------- 1211# Output banner NUMBER, provided the testsuite is running multiple groups and 1212# this particular banner has not yet been printed. 1213at_fn_banner () 1214{ 1215 $at_print_banners || return 0 1216 eval at_banner_text=\$at_banner_text_$1 1217 test "x$at_banner_text" = "x " && return 0 1218 eval "at_banner_text_$1=\" \"" 1219 if test -z "$at_banner_text"; then 1220 $at_first || echo 1221 else 1222 $as_echo "$as_nl$at_banner_text$as_nl" 1223 fi 1224} # at_fn_banner 1225 1226# at_fn_check_prepare_notrace REASON LINE 1227# --------------------------------------- 1228# Perform AT_CHECK preparations for the command at LINE for an untraceable 1229# command; REASON is the reason for disabling tracing. 1230at_fn_check_prepare_notrace () 1231{ 1232 $at_trace_echo "Not enabling shell tracing (command contains $1)" 1233 $as_echo "$2" >"$at_check_line_file" 1234 at_check_trace=: at_check_filter=: 1235 : >"$at_stdout"; : >"$at_stderr" 1236} 1237 1238# at_fn_check_prepare_trace LINE 1239# ------------------------------ 1240# Perform AT_CHECK preparations for the command at LINE for a traceable 1241# command. 1242at_fn_check_prepare_trace () 1243{ 1244 $as_echo "$1" >"$at_check_line_file" 1245 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace 1246 : >"$at_stdout"; : >"$at_stderr" 1247} 1248 1249# at_fn_check_prepare_dynamic COMMAND LINE 1250# ---------------------------------------- 1251# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate 1252# preparation function. 1253at_fn_check_prepare_dynamic () 1254{ 1255 case $1 in 1256 *$as_nl*) 1257 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;; 1258 *) 1259 at_fn_check_prepare_trace "$2" ;; 1260 esac 1261} 1262 1263# at_fn_filter_trace 1264# ------------------ 1265# Remove the lines in the file "$at_stderr" generated by "set -x" and print 1266# them to stderr. 1267at_fn_filter_trace () 1268{ 1269 mv "$at_stderr" "$at_stder1" 1270 grep '^ *+' "$at_stder1" >&2 1271 grep -v '^ *+' "$at_stder1" >"$at_stderr" 1272} 1273 1274# at_fn_log_failure FILE-LIST 1275# --------------------------- 1276# Copy the files in the list on stdout with a "> " prefix, and exit the shell 1277# with a failure exit code. 1278at_fn_log_failure () 1279{ 1280 for file 1281 do $as_echo "$file:"; sed 's/^/> /' "$file"; done 1282 echo 1 > "$at_status_file" 1283 exit 1 1284} 1285 1286# at_fn_check_skip EXIT-CODE LINE 1287# ------------------------------- 1288# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit 1289# the test group subshell with that same exit code. Use LINE in any report 1290# about test failure. 1291at_fn_check_skip () 1292{ 1293 case $1 in 1294 99) echo 99 > "$at_status_file"; at_failed=: 1295 $as_echo "$2: hard failure"; exit 99;; 1296 77) echo 77 > "$at_status_file"; exit 77;; 1297 esac 1298} 1299 1300# at_fn_check_status EXPECTED EXIT-CODE LINE 1301# ------------------------------------------ 1302# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing. 1303# Otherwise, if it is 77 or 99, exit the test group subshell with that same 1304# exit code; if it is anything else print an error message referring to LINE, 1305# and fail the test. 1306at_fn_check_status () 1307{ 1308 case $2 in 1309 $1 ) ;; 1310 77) echo 77 > "$at_status_file"; exit 77;; 1311 99) echo 99 > "$at_status_file"; at_failed=: 1312 $as_echo "$3: hard failure"; exit 99;; 1313 *) $as_echo "$3: exit code was $2, expected $1" 1314 at_failed=:;; 1315 esac 1316} 1317 1318# at_fn_diff_devnull FILE 1319# ----------------------- 1320# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff 1321# invocations. 1322at_fn_diff_devnull () 1323{ 1324 test -s "$1" || return 0 1325 $at_diff "$at_devnull" "$1" 1326} 1327 1328# at_fn_test NUMBER 1329# ----------------- 1330# Parse out test NUMBER from the tail of this file. 1331at_fn_test () 1332{ 1333 eval at_sed=\$at_sed$1 1334 sed "$at_sed" "$at_myself" > "$at_test_source" 1335} 1336 1337# at_fn_create_debugging_script 1338# ----------------------------- 1339# Create the debugging script $at_group_dir/run which will reproduce the 1340# current test group. 1341at_fn_create_debugging_script () 1342{ 1343 { 1344 echo "#! /bin/sh" && 1345 echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' && 1346 $as_echo "cd '$at_dir'" && 1347 $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" && 1348 echo 'exit 1' 1349 } >"$at_group_dir/run" && 1350 chmod +x "$at_group_dir/run" 1351} 1352 1353## -------------------------------- ## 1354## End of autotest shell functions. ## 1355## -------------------------------- ## 1356{ 1357 $as_echo "## ---------------- ## 1358## Tested programs. ## 1359## ---------------- ##" 1360 echo 1361} >&5 1362 1363# Report what programs are being tested. 1364for at_program in : $at_tested 1365do 1366 test "$at_program" = : && continue 1367 case $at_program in 1368 [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;; 1369 * ) 1370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1371for as_dir in $PATH 1372do 1373 IFS=$as_save_IFS 1374 test -z "$as_dir" && as_dir=. 1375 test -f "$as_dir/$at_program" && break 1376 done 1377IFS=$as_save_IFS 1378 1379 at_program_=$as_dir/$at_program ;; 1380 esac 1381 if test -f "$at_program_"; then 1382 { 1383 $as_echo "$at_srcdir/testsuite.at:43: $at_program_ --version" 1384 "$at_program_" --version </dev/null 1385 echo 1386 } >&5 2>&1 1387 else 1388 as_fn_error $? "cannot find $at_program" "$LINENO" 5 1389 fi 1390done 1391 1392{ 1393 $as_echo "## ------------------ ## 1394## Running the tests. ## 1395## ------------------ ##" 1396} >&5 1397 1398at_start_date=`date` 1399at_start_time=`date +%s 2>/dev/null` 1400$as_echo "$as_me: starting at: $at_start_date" >&5 1401 1402# Create the master directory if it doesn't already exist. 1403as_dir="$at_suite_dir"; as_fn_mkdir_p || 1404 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5 1405 1406# Can we diff with `/dev/null'? DU 5.0 refuses. 1407if diff /dev/null /dev/null >/dev/null 2>&1; then 1408 at_devnull=/dev/null 1409else 1410 at_devnull=$at_suite_dir/devnull 1411 >"$at_devnull" 1412fi 1413 1414# Use `diff -u' when possible. 1415if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff" 1416then 1417 at_diff='diff -u' 1418else 1419 at_diff=diff 1420fi 1421 1422# Get the last needed group. 1423for at_group in : $at_groups; do :; done 1424 1425# Extract the start and end lines of each test group at the tail 1426# of this file 1427awk ' 1428BEGIN { FS="" } 1429/^#AT_START_/ { 1430 start = NR 1431} 1432/^#AT_STOP_/ { 1433 test = substr ($ 0, 10) 1434 print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" 1435 if (test == "'"$at_group"'") exit 1436}' "$at_myself" > "$at_suite_dir/at-source-lines" && 1437. "$at_suite_dir/at-source-lines" || 1438 as_fn_error $? "cannot create test line number cache" "$LINENO" 5 1439rm -f "$at_suite_dir/at-source-lines" 1440 1441# Set number of jobs for `-j'; avoid more jobs than test groups. 1442set X $at_groups; shift; at_max_jobs=$# 1443if test $at_max_jobs -eq 0; then 1444 at_jobs=1 1445fi 1446if test $at_jobs -ne 1 && 1447 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then 1448 at_jobs=$at_max_jobs 1449fi 1450 1451# If parallel mode, don't output banners, don't split summary lines. 1452if test $at_jobs -ne 1; then 1453 at_print_banners=false 1454 at_quiet=: 1455fi 1456 1457# Set up helper dirs. 1458rm -rf "$at_helper_dir" && 1459mkdir "$at_helper_dir" && 1460cd "$at_helper_dir" && 1461{ test -z "$at_groups" || mkdir $at_groups; } || 1462as_fn_error $? "testsuite directory setup failed" "$LINENO" 5 1463 1464# Functions for running a test group. We leave the actual 1465# test group execution outside of a shell function in order 1466# to avoid hitting zsh 4.x exit status bugs. 1467 1468# at_fn_group_prepare 1469# ------------------- 1470# Prepare for running a test group. 1471at_fn_group_prepare () 1472{ 1473 # The directory for additional per-group helper files. 1474 at_job_dir=$at_helper_dir/$at_group 1475 # The file containing the location of the last AT_CHECK. 1476 at_check_line_file=$at_job_dir/check-line 1477 # The file containing the exit status of the last command. 1478 at_status_file=$at_job_dir/status 1479 # The files containing the output of the tested commands. 1480 at_stdout=$at_job_dir/stdout 1481 at_stder1=$at_job_dir/stder1 1482 at_stderr=$at_job_dir/stderr 1483 # The file containing the code for a test group. 1484 at_test_source=$at_job_dir/test-source 1485 # The file containing dates. 1486 at_times_file=$at_job_dir/times 1487 1488 # Be sure to come back to the top test directory. 1489 cd "$at_suite_dir" 1490 1491 # Clearly separate the test groups when verbose. 1492 $at_first || $at_verbose echo 1493 1494 at_group_normalized=$at_group 1495 1496 eval 'while :; do 1497 case $at_group_normalized in #( 1498 '"$at_format"'*) break;; 1499 esac 1500 at_group_normalized=0$at_group_normalized 1501 done' 1502 1503 1504 # Create a fresh directory for the next test group, and enter. 1505 # If one already exists, the user may have invoked ./run from 1506 # within that directory; we remove the contents, but not the 1507 # directory itself, so that we aren't pulling the rug out from 1508 # under the shell's notion of the current directory. 1509 at_group_dir=$at_suite_dir/$at_group_normalized 1510 at_group_log=$at_group_dir/$as_me.log 1511 if test -d "$at_group_dir"; then 1512 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \; 1513 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??* 1514fi || 1515 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5 1516$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;} 1517 # Be tolerant if the above `rm' was not able to remove the directory. 1518 as_dir="$at_group_dir"; as_fn_mkdir_p 1519 1520 echo 0 > "$at_status_file" 1521 1522 # In verbose mode, append to the log file *and* show on 1523 # the standard output; in quiet mode only write to the log. 1524 if test -z "$at_verbose"; then 1525 at_tee_pipe='tee -a "$at_group_log"' 1526 else 1527 at_tee_pipe='cat >> "$at_group_log"' 1528 fi 1529} 1530 1531# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER] 1532# ------------------------------------------------- 1533# Declare the test group ORDINAL, located at LINE with group description DESC, 1534# and residing under BANNER. Use PAD to align the status column. 1535at_fn_group_banner () 1536{ 1537 at_setup_line="$2" 1538 test -n "$5" && at_fn_banner $5 1539 at_desc="$3" 1540 case $1 in 1541 [0-9]) at_desc_line=" $1: ";; 1542 [0-9][0-9]) at_desc_line=" $1: " ;; 1543 *) at_desc_line="$1: " ;; 1544 esac 1545 as_fn_append at_desc_line "$3$4" 1546 $at_quiet $as_echo_n "$at_desc_line" 1547 echo "# -*- compilation -*-" >> "$at_group_log" 1548} 1549 1550# at_fn_group_postprocess 1551# ----------------------- 1552# Perform cleanup after running a test group. 1553at_fn_group_postprocess () 1554{ 1555 # Be sure to come back to the suite directory, in particular 1556 # since below we might `rm' the group directory we are in currently. 1557 cd "$at_suite_dir" 1558 1559 if test ! -f "$at_check_line_file"; then 1560 sed "s/^ */$as_me: WARNING: /" <<_ATEOF 1561 A failure happened in a test group before any test could be 1562 run. This means that test suite is improperly designed. Please 1563 report this failure to <mi-scholz@users.sourceforge.net>. 1564_ATEOF 1565 $as_echo "$at_setup_line" >"$at_check_line_file" 1566 at_status=99 1567 fi 1568 $at_verbose $as_echo_n "$at_group. $at_setup_line: " 1569 $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" 1570 case $at_xfail:$at_status in 1571 yes:0) 1572 at_msg="UNEXPECTED PASS" 1573 at_res=xpass 1574 at_errexit=$at_errexit_p 1575 at_color=$at_red 1576 ;; 1577 no:0) 1578 at_msg="ok" 1579 at_res=pass 1580 at_errexit=false 1581 at_color=$at_grn 1582 ;; 1583 *:77) 1584 at_msg='skipped ('`cat "$at_check_line_file"`')' 1585 at_res=skip 1586 at_errexit=false 1587 at_color=$at_blu 1588 ;; 1589 no:* | *:99) 1590 at_msg='FAILED ('`cat "$at_check_line_file"`')' 1591 at_res=fail 1592 at_errexit=$at_errexit_p 1593 at_color=$at_red 1594 ;; 1595 yes:*) 1596 at_msg='expected failure ('`cat "$at_check_line_file"`')' 1597 at_res=xfail 1598 at_errexit=false 1599 at_color=$at_lgn 1600 ;; 1601 esac 1602 echo "$at_res" > "$at_job_dir/$at_res" 1603 # In parallel mode, output the summary line only afterwards. 1604 if test $at_jobs -ne 1 && test -n "$at_verbose"; then 1605 $as_echo "$at_desc_line $at_color$at_msg$at_std" 1606 else 1607 # Make sure there is a separator even with long titles. 1608 $as_echo " $at_color$at_msg$at_std" 1609 fi 1610 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" 1611 case $at_status in 1612 0|77) 1613 # $at_times_file is only available if the group succeeded. 1614 # We're not including the group log, so the success message 1615 # is written in the global log separately. But we also 1616 # write to the group log in case they're using -d. 1617 if test -f "$at_times_file"; then 1618 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' 1619 rm -f "$at_times_file" 1620 fi 1621 $as_echo "$at_log_msg" >> "$at_group_log" 1622 $as_echo "$at_log_msg" >&5 1623 1624 # Cleanup the group directory, unless the user wants the files 1625 # or the success was unexpected. 1626 if $at_debug_p || test $at_res = xpass; then 1627 at_fn_create_debugging_script 1628 if test $at_res = xpass && $at_errexit; then 1629 echo stop > "$at_stop_file" 1630 fi 1631 else 1632 if test -d "$at_group_dir"; then 1633 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; 1634 rm -fr "$at_group_dir" 1635 fi 1636 rm -f "$at_test_source" 1637 fi 1638 ;; 1639 *) 1640 # Upon failure, include the log into the testsuite's global 1641 # log. The failure message is written in the group log. It 1642 # is later included in the global log. 1643 $as_echo "$at_log_msg" >> "$at_group_log" 1644 1645 # Upon failure, keep the group directory for autopsy, and create 1646 # the debugging script. With -e, do not start any further tests. 1647 at_fn_create_debugging_script 1648 if $at_errexit; then 1649 echo stop > "$at_stop_file" 1650 fi 1651 ;; 1652 esac 1653} 1654 1655 1656## ------------ ## 1657## Driver loop. ## 1658## ------------ ## 1659 1660 1661if (set -m && set +m && set +b) >/dev/null 2>&1; then 1662 set +b 1663 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- 1664else 1665 at_job_control_on=: at_job_control_off=: at_job_group= 1666fi 1667 1668for at_signal in 1 2 15; do 1669 trap 'set +x; set +e 1670 $at_job_control_off 1671 at_signal='"$at_signal"' 1672 echo stop > "$at_stop_file" 1673 trap "" $at_signal 1674 at_pgids= 1675 for at_pgid in `jobs -p 2>/dev/null`; do 1676 at_pgids="$at_pgids $at_job_group$at_pgid" 1677 done 1678 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null 1679 wait 1680 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then 1681 echo >&2 1682 fi 1683 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` 1684 set x $at_signame 1685 test 1 -gt 2 && at_signame=$at_signal 1686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5 1687$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;} 1688 as_fn_arith 128 + $at_signal && exit_status=$as_val 1689 as_fn_exit $exit_status' $at_signal 1690done 1691 1692rm -f "$at_stop_file" 1693at_first=: 1694 1695if test $at_jobs -ne 1 && 1696 rm -f "$at_job_fifo" && 1697 test -n "$at_job_group" && 1698 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null 1699then 1700 # FIFO job dispatcher. 1701 1702 trap 'at_pids= 1703 for at_pid in `jobs -p`; do 1704 at_pids="$at_pids $at_job_group$at_pid" 1705 done 1706 if test -n "$at_pids"; then 1707 at_sig=TSTP 1708 test "${TMOUT+set}" = set && at_sig=STOP 1709 kill -$at_sig $at_pids 2>/dev/null 1710 fi 1711 kill -STOP $$ 1712 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP 1713 1714 echo 1715 # Turn jobs into a list of numbers, starting from 1. 1716 at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p` 1717 1718 set X $at_joblist 1719 shift 1720 for at_group in $at_groups; do 1721 $at_job_control_on 2>/dev/null 1722 ( 1723 # Start one test group. 1724 $at_job_control_off 1725 if $at_first; then 1726 exec 7>"$at_job_fifo" 1727 else 1728 exec 6<&- 1729 fi 1730 trap 'set +x; set +e 1731 trap "" PIPE 1732 echo stop > "$at_stop_file" 1733 echo >&7 1734 as_fn_exit 141' PIPE 1735 at_fn_group_prepare 1736 if cd "$at_group_dir" && 1737 at_fn_test $at_group && 1738 . "$at_test_source" 1739 then :; else 1740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 1741$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} 1742 at_failed=: 1743 fi 1744 at_fn_group_postprocess 1745 echo >&7 1746 ) & 1747 $at_job_control_off 1748 if $at_first; then 1749 at_first=false 1750 exec 6<"$at_job_fifo" 7>"$at_job_fifo" 1751 fi 1752 shift # Consume one token. 1753 if test $# -gt 0; then :; else 1754 read at_token <&6 || break 1755 set x $* 1756 fi 1757 test -f "$at_stop_file" && break 1758 done 1759 exec 7>&- 1760 # Read back the remaining ($at_jobs - 1) tokens. 1761 set X $at_joblist 1762 shift 1763 if test $# -gt 0; then 1764 shift 1765 for at_job 1766 do 1767 read at_token 1768 done <&6 1769 fi 1770 exec 6<&- 1771 wait 1772else 1773 # Run serially, avoid forks and other potential surprises. 1774 for at_group in $at_groups; do 1775 at_fn_group_prepare 1776 if cd "$at_group_dir" && 1777 at_fn_test $at_group && 1778 . "$at_test_source"; then :; else 1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 1780$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} 1781 at_failed=: 1782 fi 1783 at_fn_group_postprocess 1784 test -f "$at_stop_file" && break 1785 at_first=false 1786 done 1787fi 1788 1789# Wrap up the test suite with summary statistics. 1790cd "$at_helper_dir" 1791 1792# Use ?..???? when the list must remain sorted, the faster * otherwise. 1793at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` 1794at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` 1795at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` 1796at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do 1797 echo $f; done | sed '/?/d; s,/xpass,,'` 1798at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do 1799 echo $f; done | sed '/?/d; s,/fail,,'` 1800 1801set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list 1802shift; at_group_count=$# 1803set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$* 1804set X $at_xfail_list; shift; at_xfail_count=$# 1805set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* 1806set X $at_skip_list; shift; at_skip_count=$# 1807 1808as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val 1809as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val 1810as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val 1811 1812# Back to the top directory. 1813cd "$at_dir" 1814rm -rf "$at_helper_dir" 1815 1816# Compute the duration of the suite. 1817at_stop_date=`date` 1818at_stop_time=`date +%s 2>/dev/null` 1819$as_echo "$as_me: ending at: $at_stop_date" >&5 1820case $at_start_time,$at_stop_time in 1821 [0-9]*,[0-9]*) 1822 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val 1823 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val 1824 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val 1825 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val 1826 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val 1827 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" 1828 $as_echo "$as_me: test suite duration: $at_duration" >&5 1829 ;; 1830esac 1831 1832echo 1833$as_echo "## ------------- ## 1834## Test results. ## 1835## ------------- ##" 1836echo 1837{ 1838 echo 1839 $as_echo "## ------------- ## 1840## Test results. ## 1841## ------------- ##" 1842 echo 1843} >&5 1844 1845if test $at_run_count = 1; then 1846 at_result="1 test" 1847 at_were=was 1848else 1849 at_result="$at_run_count tests" 1850 at_were=were 1851fi 1852if $at_errexit_p && test $at_unexpected_count != 0; then 1853 if test $at_xpass_count = 1; then 1854 at_result="$at_result $at_were run, one passed" 1855 else 1856 at_result="$at_result $at_were run, one failed" 1857 fi 1858 at_result="$at_result unexpectedly and inhibited subsequent tests." 1859 at_color=$at_red 1860else 1861 # Don't you just love exponential explosion of the number of cases? 1862 at_color=$at_red 1863 case $at_xpass_count:$at_fail_count:$at_xfail_count in 1864 # So far, so good. 1865 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;; 1866 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;; 1867 1868 # Some unexpected failures 1869 0:*:0) at_result="$at_result $at_were run, 1870$at_fail_count failed unexpectedly." ;; 1871 1872 # Some failures, both expected and unexpected 1873 0:*:1) at_result="$at_result $at_were run, 1874$at_total_fail_count failed ($at_xfail_count expected failure)." ;; 1875 0:*:*) at_result="$at_result $at_were run, 1876$at_total_fail_count failed ($at_xfail_count expected failures)." ;; 1877 1878 # No unexpected failures, but some xpasses 1879 *:0:*) at_result="$at_result $at_were run, 1880$at_xpass_count passed unexpectedly." ;; 1881 1882 # No expected failures, but failures and xpasses 1883 *:1:0) at_result="$at_result $at_were run, 1884$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; 1885 *:*:0) at_result="$at_result $at_were run, 1886$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; 1887 1888 # All of them. 1889 *:*:1) at_result="$at_result $at_were run, 1890$at_xpass_count passed unexpectedly, 1891$at_total_fail_count failed ($at_xfail_count expected failure)." ;; 1892 *:*:*) at_result="$at_result $at_were run, 1893$at_xpass_count passed unexpectedly, 1894$at_total_fail_count failed ($at_xfail_count expected failures)." ;; 1895 esac 1896 1897 if test $at_skip_count = 0 && test $at_run_count -gt 1; then 1898 at_result="All $at_result" 1899 fi 1900fi 1901 1902# Now put skips in the mix. 1903case $at_skip_count in 1904 0) ;; 1905 1) at_result="$at_result 19061 test was skipped." ;; 1907 *) at_result="$at_result 1908$at_skip_count tests were skipped." ;; 1909esac 1910 1911if test $at_unexpected_count = 0; then 1912 echo "$at_color$at_result$at_std" 1913 echo "$at_result" >&5 1914else 1915 echo "${at_color}ERROR: $at_result$at_std" >&2 1916 echo "ERROR: $at_result" >&5 1917 { 1918 echo 1919 $as_echo "## ------------------------ ## 1920## Summary of the failures. ## 1921## ------------------------ ##" 1922 1923 # Summary of failed and skipped tests. 1924 if test $at_fail_count != 0; then 1925 echo "Failed tests:" 1926 $SHELL "$at_myself" $at_fail_list --list 1927 echo 1928 fi 1929 if test $at_skip_count != 0; then 1930 echo "Skipped tests:" 1931 $SHELL "$at_myself" $at_skip_list --list 1932 echo 1933 fi 1934 if test $at_xpass_count != 0; then 1935 echo "Unexpected passes:" 1936 $SHELL "$at_myself" $at_xpass_list --list 1937 echo 1938 fi 1939 if test $at_fail_count != 0; then 1940 $as_echo "## ---------------------- ## 1941## Detailed failed tests. ## 1942## ---------------------- ##" 1943 echo 1944 for at_group in $at_fail_list 1945 do 1946 at_group_normalized=$at_group 1947 1948 eval 'while :; do 1949 case $at_group_normalized in #( 1950 '"$at_format"'*) break;; 1951 esac 1952 at_group_normalized=0$at_group_normalized 1953 done' 1954 1955 cat "$at_suite_dir/$at_group_normalized/$as_me.log" 1956 echo 1957 done 1958 echo 1959 fi 1960 if test -n "$at_top_srcdir"; then 1961 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 1962## ${at_top_build_prefix}config.log ## 1963_ASBOX 1964 sed 's/^/| /' ${at_top_build_prefix}config.log 1965 echo 1966 fi 1967 } >&5 1968 1969 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 1970## $as_me.log was created. ## 1971_ASBOX 1972 1973 echo 1974 if $at_debug_p; then 1975 at_msg='per-test log files' 1976 else 1977 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'" 1978 fi 1979 $as_echo "Please send $at_msg and all information you think might help: 1980 1981 To: <mi-scholz@users.sourceforge.net> 1982 Subject: [FTH 1.4.1] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} 1983 1984You may investigate any problem if you feel able to do so, in which 1985case the test suite provides a good starting point. Its output may 1986be found below \`${at_testdir+${at_testdir}/}$as_me.dir'. 1987" 1988 exit 1 1989fi 1990 1991exit 0 1992 1993## ------------- ## 1994## Actual tests. ## 1995## ------------- ## 1996#AT_START_1 1997at_fn_group_banner 1 'testsuite.at:45' \ 1998 "array ..." " " 1999at_xfail=no 2000( 2001 $as_echo "1. $at_setup_line: testing $at_desc ..." 2002 $at_traceon 2003 2004 { set +x 2005$as_echo "$at_srcdir/testsuite.at:45: \${fth_prog} array-test.fs" 2006at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:45" 2007( $at_check_trace; ${fth_prog} array-test.fs 2008) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2009at_status=$? at_failed=false 2010$at_check_filter 2011echo stderr:; tee stderr <"$at_stderr" 2012echo stdout:; tee stdout <"$at_stdout" 2013at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:45" 2014$at_failed && at_fn_log_failure 2015$at_traceon; } 2016 2017 set +x 2018 $at_times_p && times >"$at_times_file" 2019) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2020read at_status <"$at_status_file" 2021#AT_STOP_1 2022#AT_START_2 2023at_fn_group_banner 2 'testsuite.at:46' \ 2024 "list ..." " " 2025at_xfail=no 2026( 2027 $as_echo "2. $at_setup_line: testing $at_desc ..." 2028 $at_traceon 2029 2030 { set +x 2031$as_echo "$at_srcdir/testsuite.at:46: \${fth_prog} list-test.fs" 2032at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:46" 2033( $at_check_trace; ${fth_prog} list-test.fs 2034) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2035at_status=$? at_failed=false 2036$at_check_filter 2037echo stderr:; tee stderr <"$at_stderr" 2038echo stdout:; tee stdout <"$at_stdout" 2039at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:46" 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 2046read at_status <"$at_status_file" 2047#AT_STOP_2 2048#AT_START_3 2049at_fn_group_banner 3 'testsuite.at:47' \ 2050 "hash ..." " " 2051at_xfail=no 2052( 2053 $as_echo "3. $at_setup_line: testing $at_desc ..." 2054 $at_traceon 2055 2056 { set +x 2057$as_echo "$at_srcdir/testsuite.at:47: \${fth_prog} hash-test.fs" 2058at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:47" 2059( $at_check_trace; ${fth_prog} hash-test.fs 2060) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2061at_status=$? at_failed=false 2062$at_check_filter 2063echo stderr:; tee stderr <"$at_stderr" 2064echo stdout:; tee stdout <"$at_stdout" 2065at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:47" 2066$at_failed && at_fn_log_failure 2067$at_traceon; } 2068 2069 set +x 2070 $at_times_p && times >"$at_times_file" 2071) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2072read at_status <"$at_status_file" 2073#AT_STOP_3 2074#AT_START_4 2075at_fn_group_banner 4 'testsuite.at:48' \ 2076 "IO ..." " " 2077at_xfail=no 2078( 2079 $as_echo "4. $at_setup_line: testing $at_desc ..." 2080 $at_traceon 2081 2082 { set +x 2083$as_echo "$at_srcdir/testsuite.at:48: if test -z \${FTH_TEST_IO}; then exit 77; else \${fth_prog} io-test.fs; fi" 2084at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:48" 2085( $at_check_trace; if test -z ${FTH_TEST_IO}; then exit 77; else ${fth_prog} io-test.fs; fi 2086) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2087at_status=$? at_failed=false 2088$at_check_filter 2089echo stderr:; tee stderr <"$at_stderr" 2090echo stdout:; tee stdout <"$at_stdout" 2091at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:48" 2092$at_failed && at_fn_log_failure 2093$at_traceon; } 2094 2095 set +x 2096 $at_times_p && times >"$at_times_file" 2097) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2098read at_status <"$at_status_file" 2099#AT_STOP_4 2100#AT_START_5 2101at_fn_group_banner 5 'testsuite.at:50' \ 2102 "file ..." " " 2103at_xfail=no 2104( 2105 $as_echo "5. $at_setup_line: testing $at_desc ..." 2106 $at_traceon 2107 2108 { set +x 2109$as_echo "$at_srcdir/testsuite.at:50: if test -z \${FTH_TEST_FILE}; then exit 77; else \${fth_prog} file-test.fs; fi" 2110at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:50" 2111( $at_check_trace; if test -z ${FTH_TEST_FILE}; then exit 77; else ${fth_prog} file-test.fs; fi 2112) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2113at_status=$? at_failed=false 2114$at_check_filter 2115echo stderr:; tee stderr <"$at_stderr" 2116echo stdout:; tee stdout <"$at_stdout" 2117at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:50" 2118$at_failed && at_fn_log_failure 2119$at_traceon; } 2120 2121 set +x 2122 $at_times_p && times >"$at_times_file" 2123) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2124read at_status <"$at_status_file" 2125#AT_STOP_5 2126#AT_START_6 2127at_fn_group_banner 6 'testsuite.at:52' \ 2128 "misc ..." " " 2129at_xfail=no 2130( 2131 $as_echo "6. $at_setup_line: testing $at_desc ..." 2132 $at_traceon 2133 2134 { set +x 2135$as_echo "$at_srcdir/testsuite.at:52: \${fth_prog} misc-test.fs" 2136at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:52" 2137( $at_check_trace; ${fth_prog} misc-test.fs 2138) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2139at_status=$? at_failed=false 2140$at_check_filter 2141echo stderr:; tee stderr <"$at_stderr" 2142echo stdout:; tee stdout <"$at_stdout" 2143at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:52" 2144$at_failed && at_fn_log_failure 2145$at_traceon; } 2146 2147 set +x 2148 $at_times_p && times >"$at_times_file" 2149) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2150read at_status <"$at_status_file" 2151#AT_STOP_6 2152#AT_START_7 2153at_fn_group_banner 7 'testsuite.at:53' \ 2154 "numbers ..." " " 2155at_xfail=no 2156( 2157 $as_echo "7. $at_setup_line: testing $at_desc ..." 2158 $at_traceon 2159 2160 { set +x 2161$as_echo "$at_srcdir/testsuite.at:53: \${fth_prog} numbers-test.fs" 2162at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:53" 2163( $at_check_trace; ${fth_prog} numbers-test.fs 2164) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2165at_status=$? at_failed=false 2166$at_check_filter 2167echo stderr:; tee stderr <"$at_stderr" 2168echo stdout:; tee stdout <"$at_stdout" 2169at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:53" 2170$at_failed && at_fn_log_failure 2171$at_traceon; } 2172 2173 set +x 2174 $at_times_p && times >"$at_times_file" 2175) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2176read at_status <"$at_status_file" 2177#AT_STOP_7 2178#AT_START_8 2179at_fn_group_banner 8 'testsuite.at:54' \ 2180 "proc ..." " " 2181at_xfail=no 2182( 2183 $as_echo "8. $at_setup_line: testing $at_desc ..." 2184 $at_traceon 2185 2186 { set +x 2187$as_echo "$at_srcdir/testsuite.at:54: \${fth_prog} proc-test.fs" 2188at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:54" 2189( $at_check_trace; ${fth_prog} proc-test.fs 2190) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2191at_status=$? at_failed=false 2192$at_check_filter 2193echo stderr:; tee stderr <"$at_stderr" 2194echo stdout:; tee stdout <"$at_stdout" 2195at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:54" 2196$at_failed && at_fn_log_failure 2197$at_traceon; } 2198 2199 set +x 2200 $at_times_p && times >"$at_times_file" 2201) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2202read at_status <"$at_status_file" 2203#AT_STOP_8 2204#AT_START_9 2205at_fn_group_banner 9 'testsuite.at:55' \ 2206 "hook ..." " " 2207at_xfail=no 2208( 2209 $as_echo "9. $at_setup_line: testing $at_desc ..." 2210 $at_traceon 2211 2212 { set +x 2213$as_echo "$at_srcdir/testsuite.at:55: \${fth_prog} hook-test.fs" 2214at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:55" 2215( $at_check_trace; ${fth_prog} hook-test.fs 2216) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2217at_status=$? at_failed=false 2218$at_check_filter 2219echo stderr:; tee stderr <"$at_stderr" 2220echo stdout:; tee stdout <"$at_stdout" 2221at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:55" 2222$at_failed && at_fn_log_failure 2223$at_traceon; } 2224 2225 set +x 2226 $at_times_p && times >"$at_times_file" 2227) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2228read at_status <"$at_status_file" 2229#AT_STOP_9 2230#AT_START_10 2231at_fn_group_banner 10 'testsuite.at:56' \ 2232 "string ..." " " 2233at_xfail=no 2234( 2235 $as_echo "10. $at_setup_line: testing $at_desc ..." 2236 $at_traceon 2237 2238 { set +x 2239$as_echo "$at_srcdir/testsuite.at:56: \${fth_prog} string-test.fs" 2240at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:56" 2241( $at_check_trace; ${fth_prog} string-test.fs 2242) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2243at_status=$? at_failed=false 2244$at_check_filter 2245echo stderr:; tee stderr <"$at_stderr" 2246echo stdout:; tee stdout <"$at_stdout" 2247at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:56" 2248$at_failed && at_fn_log_failure 2249$at_traceon; } 2250 2251 set +x 2252 $at_times_p && times >"$at_times_file" 2253) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2254read at_status <"$at_status_file" 2255#AT_STOP_10 2256#AT_START_11 2257at_fn_group_banner 11 'testsuite.at:57' \ 2258 "regexp ..." " " 2259at_xfail=no 2260( 2261 $as_echo "11. $at_setup_line: testing $at_desc ..." 2262 $at_traceon 2263 2264 { set +x 2265$as_echo "$at_srcdir/testsuite.at:57: \${fth_prog} regexp-test.fs" 2266at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:57" 2267( $at_check_trace; ${fth_prog} regexp-test.fs 2268) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2269at_status=$? at_failed=false 2270$at_check_filter 2271echo stderr:; tee stderr <"$at_stderr" 2272echo stdout:; tee stdout <"$at_stdout" 2273at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:57" 2274$at_failed && at_fn_log_failure 2275$at_traceon; } 2276 2277 set +x 2278 $at_times_p && times >"$at_times_file" 2279) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2280read at_status <"$at_status_file" 2281#AT_STOP_11 2282#AT_START_12 2283at_fn_group_banner 12 'testsuite.at:58' \ 2284 "symbol, keyword, exception ..." " " 2285at_xfail=no 2286( 2287 $as_echo "12. $at_setup_line: testing $at_desc ..." 2288 $at_traceon 2289 2290 { set +x 2291$as_echo "$at_srcdir/testsuite.at:58: \${fth_prog} symbol-test.fs" 2292at_fn_check_prepare_notrace 'a ${...} parameter expansion' "testsuite.at:58" 2293( $at_check_trace; ${fth_prog} symbol-test.fs 2294) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2295at_status=$? at_failed=false 2296$at_check_filter 2297echo stderr:; tee stderr <"$at_stderr" 2298echo stdout:; tee stdout <"$at_stdout" 2299at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:58" 2300$at_failed && at_fn_log_failure 2301$at_traceon; } 2302 2303 set +x 2304 $at_times_p && times >"$at_times_file" 2305) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2306read at_status <"$at_status_file" 2307#AT_STOP_12 2308