Debian Codegraph @

tests/testsuite

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 # Generated from testsuite.at by GNU Autoconf 2.71.
3 #
4 # Copyright (C) 2009-2017, 2020-2021 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 as_nop=:
15 if testscip-shell system . . test. ${ZSH_VERSION+y} && (emulate sh) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
16 then :
17 emulate sh
18 NULLCMD=:
19 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
22 setopt NO_GLOB_SUBST
23 else $as_nop
24 case `(set -o) 2>/dev/nullscip-shell filesystem . . `/dev/null`.` in #(
25 *posix*) :
26 set -o posix ;; #(
27 *) :
28 ;;
29 esac
30 fi
31
32
33
34 # Reset variables that may have inherited troublesome values from
35 # the environment.
36
37 # IFS needs to be set, to space, tab, and newline, in precisely that order.
38 # (If _AS_PATH_WALK were called with IFS unset, it would have the
39 # side effect of setting IFS to empty, thus disabling word splitting.)
40 # Quoting is to prevent editors from complaining about space-tab.
41 as_nl='
42 '
43 export as_nl
44 IFS=" "" $as_nl"
45
46 PS1='$ '
47 PS2='> '
48 PS4='+ '
49
50 # Ensure predictable behavior from utilities with locale-dependent output.
51 LC_ALL=C
52 export LC_ALL
53 LANGUAGE=C
54 export LANGUAGE
55
56 # We cannot yet rely on "unset" to work, but we need these variables
57 # to be unset--not just set to an empty or harmless value--now, to
58 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
59 # also avoids known problems related to "unset" and subshell syntax
60 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
61 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
62 do eval test \${$as_var+y} \
63 && ( (unset $as_var) || exit 1) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 && unset $as_var || :
64 done
65
66 # Ensure that fds 0, 1, and 2 are open.
67 if (exec 3>&0) 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then :; else exec 0</dev/nullscip-shell filesystem . . `/dev/null`.; fi
68 if (exec 3>&1) 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then :; else exec 1>/dev/nullscip-shell filesystem . . `/dev/null`.; fi
69 if (exec 3>&2) ; then :; else exec 2>/dev/nullscip-shell filesystem . . `/dev/null`.; fi
70
71 # The user is always right.
72 if ${PATH_SEPARATOR+false} :; then
73 PATH_SEPARATOR=:
74 (PATH='/bin;/binscip-shell filesystem . . `/bin;/bin`.'; FPATH=$PATH; shscip-shell system . . sh. -c :) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 && {
75 (PATH='/bin:/binscip-shell filesystem . . `/bin:/bin`.'; FPATH=$PATH; shscip-shell system . . sh. -c :) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 ||
76 PATH_SEPARATOR=';'
77 }
78 fi
79
80
81 # Find who we are. Look in the path if we contain no directory separator.
82 as_myself=
83 case $0 in #((
84 *[\\/]* ) as_myself=$0 ;;
85 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
86 for as_dir in $PATH
87 do
88 IFS=$as_save_IFS
89 case $as_dir in #(((
90 '') as_dir=./ ;;
91 */) ;;
92 *) as_dir=$as_dir/ ;;
93 esac
94 testscip-shell system . . test. -r "$as_dir$0" && as_myself=$as_dir$0 && break
95 done
96 IFS=$as_save_IFS
97
98 ;;
99 esac
100 # We did not find ourselves, most probably we were run as `sh COMMAND'
101 # in which case we are not to be found in the path.
102 if testscip-shell system . . test. "x$as_myself" = x; then
103 as_myself=$0
104 fi
105 if testscip-shell system . . test. ! -f "$as_myself"; then
106 printfscip-shell system . . printf. "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
107 exit 1
108 fi
109
110
111 if testscip-shell system . . test. "x$CONFIG_SHELL" = x; then
112 as_bourne_compatible="as_nop=:
113 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
114 then :
115 emulate sh
116 NULLCMD=:
117 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
118 # is contrary to our usage. Disable this feature.
119 alias -g '\${1+\"\$@\"}'='\"\$@\"'
120 setopt NO_GLOB_SUBST
121 else \$as_nop
122 case \`(set -o) 2>/dev/null\` in #(
123 *posix*) :
124 set -o posix ;; #(
125 *) :
126 ;;
127 esac
128 fi
129 "
130 as_required="as_fn_return () { (exit \$1); }
131 as_fn_success () { as_fn_return 0; }
132 as_fn_failure () { as_fn_return 1; }
133 as_fn_ret_success () { return 0; }
134 as_fn_ret_failure () { return 1; }
135
136 exitcode=0
137 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
138 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
139 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
140 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
141 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
142 then :
143
144 else \$as_nop
145 exitcode=1; echo positional parameters were not saved.
146 fi
147 test x\$exitcode = x0 || exit 1
148 blah=\$(echo \$(echo blah))
149 test x\"\$blah\" = xblah || exit 1
150 test -x / || exit 1"
151 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
152 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
153 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
154 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
155 test \$(( 1 + 1 )) = 2 || exit 1"
156 if (eval "$as_required") 2>/dev/nullscip-shell filesystem . . `/dev/null`.
157 then :
158 as_have_required=yes
159 else $as_nop
160 as_have_required=no
161 fi
162 if testscip-shell system . . test. x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/nullscip-shell filesystem . . `/dev/null`.
163 then :
164
165 else $as_nop
166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
167 as_found=false
168 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
169 do
170 IFS=$as_save_IFS
171 case $as_dir in #(((
172 '') as_dir=./ ;;
173 */) ;;
174 *) as_dir=$as_dir/ ;;
175 esac
176 as_found=:
177 case $as_dir in #(
178 /*)
179 for as_base in sh bash ksh sh5; do
180 # Try only shells that exist, to save several forks.
181 as_shell=$as_dir$as_base
182 if { testscip-shell system . . test. -f "$as_shell" || testscip-shell system . . test. -f "$as_shell.exe"; } &&
183 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/nullscip-shell filesystem . . `/dev/null`.
184 then :
185 CONFIG_SHELL=$as_shell as_have_required=yes
186 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/nullscip-shell filesystem . . `/dev/null`.
187 then :
188 break 2
189 fi
190 fi
191 done;;
192 esac
193 as_found=false
194 done
195 IFS=$as_save_IFS
196 if $as_found
197 then :
198
199 else $as_nop
200 if { testscip-shell system . . test. -f "$SHELL" || testscip-shell system . . test. -f "$SHELL.exe"; } &&
201 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/nullscip-shell filesystem . . `/dev/null`.
202 then :
203 CONFIG_SHELL=$SHELL as_have_required=yes
204 fi
205 fi
206
207
208 if testscip-shell system . . test. "x$CONFIG_SHELL" != x
209 then :
210 export CONFIG_SHELL
211 # We cannot yet assume a decent shell, so we have to provide a
212 # neutralization value for shells without unset; and this also
213 # works around shells that cannot unset nonexistent variables.
214 # Preserve -v and -x to the replacement shell.
215 BASH_ENV=/dev/nullscip-shell filesystem . . `/dev/null`.
216 ENV=/dev/nullscip-shell filesystem . . `/dev/null`.
217 (unset BASH_ENV) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 && unset BASH_ENV ENV
218 case $- in # ((((
219 *v*x* | *x*v* ) as_opts=-vx ;;
220 *v* ) as_opts=-v ;;
221 *x* ) as_opts=-x ;;
222 * ) as_opts= ;;
223 esac
224 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
225 # Admittedly, this is quite paranoid, since all the known shells bail
226 # out after a failed `exec'.
227 printfscip-shell system . . printf. "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
228 exit 255
229 fi
230
231 if testscip-shell system . . test. x$as_have_required = xno
232 then :
233 printfscip-shell system . . printf. "%s\n" "$0: This script requires a shell more modern than all"
234 printfscip-shell system . . printf. "%s\n" "$0: the shells that I found on your system."
235 if testscip-shell system . . test. ${ZSH_VERSION+y} ; then
236 printfscip-shell system . . printf. "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
237 printfscip-shell system . . printf. "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
238 else
239 printfscip-shell system . . printf. "%s\n" "$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_unsetscip-shell shell shell-project 0.0.0 as_fn_unset(). ()
261 {
262 { eval $1=; unset $1;}
263 }
264 as_unset=as_fn_unset
265
266
267 # as_fn_set_status STATUS
268 # -----------------------
269 # Set $? to STATUS, without forking.
270 as_fn_set_statusscip-shell shell shell-project 0.0.0 as_fn_set_status(). ()
271 {
272 return $1
273 } # as_fn_set_status
274
275 # as_fn_exit STATUS
276 # -----------------
277 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
278 as_fn_exitscip-shell shell shell-project 0.0.0 as_fn_exit(). ()
279 {
280 set +e
281 as_fn_set_statusscip-shell shell shell-project 0.0.0 as_fn_set_status(). $1
282 exit $1
283 } # as_fn_exit
284 # as_fn_nop
285 # ---------
286 # Do nothing but, unlike ":", preserve the value of $?.
287 as_fn_nopscip-shell shell shell-project 0.0.0 as_fn_nop(). ()
288 {
289 return $?
290 }
291 as_nop=as_fn_nop
292
293 # as_fn_mkdir_p
294 # -------------
295 # Create "$as_dir" as a directory, including parents if necessary.
296 as_fn_mkdir_pscip-shell shell shell-project 0.0.0 as_fn_mkdir_p(). ()
297 {
298
299 case $as_dir in #(
300 -*) as_dir=./$as_dir;;
301 esac
302 testscip-shell system . . test. -d "$as_dir" || eval $as_mkdir_p || {
303 as_dirs=
304 while :; do
305 case $as_dir in #(
306 *\'*) as_qdir=`printfscip-shell system . . printf. "%s\n" "$as_dir" | sedscip-shell system . . sed. "s/'/'\\\\\\\\''/g"`;; #'(
307 *) as_qdir=$as_dir;;
308 esac
309 as_dirs="'$as_qdir' $as_dirs"
310 as_dir=`$as_dirname -- "$as_dir" ||
311 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
312 X"$as_dir" : 'X\(//\)[^/]' \| \
313 X"$as_dir" : 'X\(//\)$' \| \
314 X"$as_dir" : 'X\(/\)' \| . 2>/dev/nullscip-shell filesystem . . `/dev/null`. ||
315 printfscip-shell system . . printf. "%s\n" X"$as_dir" |
316 sedscip-shell system . . sed. '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
317 s//\1/
318 q
319 }
320 /^X\(\/\/\)[^/].*/{
321 s//\1/
322 q
323 }
324 /^X\(\/\/\)$/{
325 s//\1/
326 q
327 }
328 /^X\(\/\).*/{
329 s//\1/
330 q
331 }
332 s/.*/./; q'`
333 testscip-shell system . . test. -d "$as_dir" && break
334 done
335 testscip-shell system . . test. -z "$as_dirs" || eval "mkdir $as_dirs"
336 } || testscip-shell system . . test. -d "$as_dir" || as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "cannot create directory $as_dir"
337
338
339 } # as_fn_mkdir_p
340
341 # as_fn_executable_p FILE
342 # -----------------------
343 # Test if FILE is an executable regular file.
344 as_fn_executable_pscip-shell shell shell-project 0.0.0 as_fn_executable_p(). ()
345 {
346 testscip-shell system . . test. -f "$1" && testscip-shell system . . test. -x "$1"
347 } # as_fn_executable_p
348 # as_fn_append VAR VALUE
349 # ----------------------
350 # Append the text in VALUE to the end of the definition contained in VAR. Take
351 # advantage of any shell optimizations that allow amortized linear growth over
352 # repeated appends, instead of the typical quadratic growth present in naive
353 # implementations.
354 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/nullscip-shell filesystem . . `/dev/null`.
355 then :
356 eval 'as_fn_append ()
357 {
358 eval $1+=\$2
359 }'
360 else $as_nop
361 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). ()
362 {
363 eval $1=\$$1\$2
364 }
365 fi # as_fn_append
366
367 # as_fn_arith ARG...
368 # ------------------
369 # Perform arithmetic evaluation on the ARGs, and store the result in the
370 # global $as_val. Take advantage of shells that can avoid forks. The arguments
371 # must be portable across $(()) and expr.
372 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/nullscip-shell filesystem . . `/dev/null`.
373 then :
374 eval 'as_fn_arith ()
375 {
376 as_val=$(( $* ))
377 }'
378 else $as_nop
379 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). ()
380 {
381 as_val=`exprscip-shell system . . expr. "$@" || testscip-shell system . . test. $? -eq 1`
382 }
383 fi # as_fn_arith
384
385
386 # as_fn_error STATUS ERROR [LINENO LOG_FD]
387 # ----------------------------------------
388 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
389 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
390 # script with STATUS, using 1 if that was 0.
391 as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). ()
392 {
393 as_status=$1; testscip-shell system . . test. $as_status -eq 0 && as_status=1
394 if testscip-shell system . . test. "$4"; then
395 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
396 printfscip-shell system . . printf. "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
397 fi
398 printfscip-shell system . . printf. "%s\n" "$as_me: error: $2" >&2
399 as_fn_exitscip-shell shell shell-project 0.0.0 as_fn_exit(). $as_status
400 } # as_fn_error
401
402 if exprscip-shell system . . expr. a : '\(a\)' >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 &&
403 testscip-shell system . . test. "X`exprscip-shell system . . expr. 00001 : '.*\(...\)'`" = X001; then
404 as_expr=expr
405 else
406 as_expr=false
407 fi
408
409 if (basenamescip-shell system . . basename. -- /scip-shell filesystem . . `/`.) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 && testscip-shell system . . test. "X`basenamescip-shell system . . basename. -- /scip-shell filesystem . . `/`. 2>&1`" = "X/"; then
410 as_basename=basename
411 else
412 as_basename=false
413 fi
414
415 as_me=`$as_basename -- "$0" ||
416 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
417 X"$0" : 'X\(//\)$' \| \
418 X"$0" : 'X\(/\)' \| . 2>/dev/nullscip-shell filesystem . . `/dev/null`. ||
419 printfscip-shell system . . printf. "%s\n" X/"$0" |
420 sedscip-shell system . . sed. '/^.*\/\([^/][^/]*\)\/*$/{
421 s//\1/
422 q
423 }
424 /^X\/\(\/\/\)$/{
425 s//\1/
426 q
427 }
428 /^X\/\(\/\).*/{
429 s//\1/
430 q
431 }
432 s/.*/./; q'`
433
434 if (as_dir=`dirnamescip-shell system . . dirname. -- /scip-shell filesystem . . `/`.` && testscip-shell system . . test. "X$as_dir" = X/) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1; then
435 as_dirname=dirname
436 else
437 as_dirname=false
438 fi
439
440 # Avoid depending upon Character Ranges.
441 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
442 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
443 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
444 as_cr_digits='0123456789'
445 as_cr_alnum=$as_cr_Letters$as_cr_digits
446
447
448 as_lineno_1=$LINENO as_lineno_1a=$LINENO
449 as_lineno_2=$LINENO as_lineno_2a=$LINENO
450 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
451 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
452 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
453 sedscip-shell system . . sed. -n '
454 p
455 /[$]LINENO/=
456 ' <$as_myself |
457 sedscip-shell system . . sed. '
458 s/[$]LINENO.*/&-/
459 t lineno
460 b
461 :lineno
462 N
463 :loop
464 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
465 t loop
466 s/-\n.*//
467 ' >$as_me.lineno &&
468 chmodscip-shell system . . chmod. +x "$as_me.lineno" ||
469 { printfscip-shell system . . printf. "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exitscip-shell shell shell-project 0.0.0 as_fn_exit(). 1; }
470
471 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
472 # already done that, so ensure we don't try to do so again and fall
473 # in an infinite loop. This has already happened in practice.
474 _as_can_reexec=no; export _as_can_reexec
475 # Don't try to exec as it changes $[0], causing all sort of problems
476 # (the dirname of $[0] is not the place where we might find the
477 # original and so on. Autoconf is especially sensitive to this).
478 . "./$as_me.lineno"
479 # Exit status is that of the last command.
480 exit
481 }
482
483
484 # Determine whether it's possible to make 'echo' print without a newline.
485 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
486 # for compatibility with existing Makefiles.
487 ECHO_C= ECHO_N= ECHO_T=
488 case `echoscip-shell system . . echo. -n x` in #(((((
489 -n*)
490 case `echoscip-shell system . . echo. 'xy\c'` in
491 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
492 xy) ECHO_C='\c';;
493 *) echoscip-shell system . . echo. `echoscip-shell system . . echo. ksh88 bug on AIX 6.1` > /dev/nullscip-shell filesystem . . `/dev/null`.
494 ECHO_T=' ';;
495 esac;;
496 *)
497 ECHO_N='-n';;
498 esac
499
500 # For backward compatibility with old third-party macros, we provide
501 # the shell variables $as_echo and $as_echo_n. New code should use
502 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
503 as_echo='printf %s\n'
504 as_echo_n='printf %s'
505
506
507 rmscip-shell system . . rm. -f conf$$ conf$$.exe conf$$.file
508 if testscip-shell system . . test. -d conf$$.dir; then
509 rmscip-shell system . . rm. -f conf$$.dir/conf$$.file
510 else
511 rmscip-shell system . . rm. -f conf$$.dir
512 mkdirscip-shell system . . mkdir. conf$$.dir 2>/dev/nullscip-shell filesystem . . `/dev/null`.
513 fi
514 if (echoscip-shell system . . echo. >conf$$.file) 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then
515 if lnscip-shell system . . ln. -s conf$$.file conf$$ 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then
516 as_ln_s='ln -s'
517 # ... but there are two gotchas:
518 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
519 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
520 # In both cases, we have to default to `cp -pR'.
521 lnscip-shell system . . ln. -s conf$$.file conf$$.dir 2>/dev/nullscip-shell filesystem . . `/dev/null`. && testscip-shell system . . test. ! -f conf$$.exe ||
522 as_ln_s='cp -pR'
523 elif lnscip-shell system . . ln. conf$$.file conf$$ 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then
524 as_ln_s=ln
525 else
526 as_ln_s='cp -pR'
527 fi
528 else
529 as_ln_s='cp -pR'
530 fi
531 rmscip-shell system . . rm. -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
532 rmdirscip-shell system . . rmdir. conf$$.dir 2>/dev/nullscip-shell filesystem . . `/dev/null`.
533
534 if mkdirscip-shell system . . mkdir. -p . 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then
535 as_mkdir_p='mkdir -p "$as_dir"'
536 else
537 testscip-shell system . . test. -d ./-p && rmdirscip-shell system . . rmdir. ./-p
538 as_mkdir_p=false
539 fi
540
541 as_test_x='test -x'
542 as_executable_p=as_fn_executable_p
543
544 # Sed expression to map a string onto a valid CPP name.
545 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547 # Sed expression to map a string onto a valid variable name.
548 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552
553
554 SHELL=${CONFIG_SHELL-/bin/sh}
555
556 # How were we run?
557 at_cli_args="$@"
558
559
560 # Not all shells have the 'times' builtin; the subshell is needed to make
561 # sure we discard the 'times: not found' message from the shell.
562 at_times_p=false
563 (times) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 && at_times_p=:
564
565 # CLI Arguments to pass to the debugging scripts.
566 at_debug_args=
567 # -e sets to true
568 at_errexit_p=false
569 # Shall we be verbose? ':' means no, empty means yes.
570 at_verbose=:
571 at_quiet=
572 # Running several jobs in parallel, 0 means as many as test groups.
573 at_jobs=1
574 at_traceon=:
575 at_trace_echo=:
576 at_check_filter_trace=:
577
578 # Shall we keep the debug scripts? Must be `:' when the suite is
579 # run by a debug script, so that the script doesn't remove itself.
580 at_debug_p=false
581 # Display help message?
582 at_help_p=false
583 # Display the version message?
584 at_version_p=false
585 # List test groups?
586 at_list_p=false
587 # --clean
588 at_clean=false
589 # Test groups to run
590 at_groups=
591 # Whether to rerun failed tests.
592 at_recheck=
593 # Whether a write failure occurred
594 at_write_fail=0
595
596 # The directory we run the suite in. Default to . if no -C option.
597 at_dir=`pwdscip-shell system . . pwd.`
598 # An absolute reference to this testsuite script.
599 case $as_myself in
600 [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
601 * ) at_myself=$at_dir/$as_myself ;;
602 esac
603 # Whether -C is in effect.
604 at_change_dir=false
605
606 # Whether to enable colored test results.
607 at_color=no
608 # As many question marks as there are digits in the last test group number.
609 # Used to normalize the test group numbers so that `ls' lists them in
610 # numerical order.
611 at_format='?'
612 # Description of all the test groups.
613 at_help_all="1;testsuite.at:4;sbcap;sbcap;
614 "
615 # List of the all the test groups.
616 at_groups_all=`printfscip-shell system . . printf. "%s\n" "$at_help_all" | sedscip-shell system . . sed. 's/;.*//'`
617
618 # at_fn_validate_ranges NAME...
619 # -----------------------------
620 # Validate and normalize the test group number contained in each variable
621 # NAME. Leading zeroes are treated as decimal.
622 at_fn_validate_rangesscip-shell shell shell-project 0.0.0 at_fn_validate_ranges(). ()
623 {
624 for at_grp
625 do
626 eval at_value=\$$at_grp
627 if testscip-shell system . . test. $at_value -lt 1 || testscip-shell system . . test. $at_value -gt 1; then
628 printfscip-shell system . . printf. "%s\n" "invalid test group: $at_value" >&2
629 exit 1
630 fi
631 case $at_value in
632 0*) # We want to treat leading 0 as decimal, like expr and test, but
633 # AS_VAR_ARITH treats it as octal if it uses $(( )).
634 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
635 # expr fork, but it is not worth the effort to determine if the
636 # shell supports XSI when the user can just avoid leading 0.
637 eval $at_grp='`expr $at_value + 0`' ;;
638 esac
639 done
640 }
641
642 at_prev=
643 for at_option
644 do
645 # If the previous option needs an argument, assign it.
646 if testscip-shell system . . test. -n "$at_prev"; then
647 at_option=$at_prev=$at_option
648 at_prev=
649 fi
650
651 case $at_option in
652 *=?*) at_optarg=`exprscip-shell system . . expr. "X$at_option" : '[^=]*=\(.*\)'` ;;
653 *) at_optarg= ;;
654 esac
655
656 case $at_option in
657 --help | -h )
658 at_help_p=:
659 ;;
660
661 --list | -l )
662 at_list_p=:
663 ;;
664
665 --version | -V )
666 at_version_p=:
667 ;;
668
669 --clean | -c )
670 at_clean=:
671 ;;
672
673 --color )
674 at_color=always
675 ;;
676 --color=* )
677 case $at_optarg in
678 no | never | none) at_color=never ;;
679 auto | tty | if-tty) at_color=auto ;;
680 always | yes | force) at_color=always ;;
681 *) at_optname=`echoscip-shell system . . echo. " $at_option" | sedscip-shell system . . sed. 's/^ //; s/=.*//'`
682 as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "unrecognized argument to $at_optname: $at_optarg" ;;
683 esac
684 ;;
685
686 --debug | -d )
687 at_debug_p=:
688 ;;
689
690 --errexit | -e )
691 at_debug_p=:
692 at_errexit_p=:
693 ;;
694
695 --verbose | -v )
696 at_verbose=; at_quiet=:
697 ;;
698
699 --trace | -x )
700 at_traceon='set -x'
701 at_trace_echo=echo
702 at_check_filter_trace=at_fn_filter_trace
703 ;;
704
705 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
706 at_fn_validate_rangesscip-shell shell shell-project 0.0.0 at_fn_validate_ranges(). at_option
707 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_groups "$at_option$as_nl"
708 ;;
709
710 # Ranges
711 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
712 at_range_start=`echoscip-shell system . . echo. $at_option |trscip-shell system . . tr. -d X-`
713 at_fn_validate_rangesscip-shell shell shell-project 0.0.0 at_fn_validate_ranges(). at_range_start
714 at_range=`printfscip-shell system . . printf. "%s\n" "$at_groups_all" | \
715 sed -ne '/^'$at_range_start'$/,$p'`
716 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_groups "$at_range$as_nl"
717 ;;
718
719 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
720 at_range_end=`echoscip-shell system . . echo. $at_option |trscip-shell system . . tr. -d X-`
721 at_fn_validate_rangesscip-shell shell shell-project 0.0.0 at_fn_validate_ranges(). at_range_end
722 at_range=`printfscip-shell system . . printf. "%s\n" "$at_groups_all" | \
723 sed -ne '1,/^'$at_range_end'$/p'`
724 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_groups "$at_range$as_nl"
725 ;;
726
727 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
728 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
729 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
730 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
731 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
732 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
733 at_range_start=`exprscip-shell system . . expr. $at_option : '\(.*\)-'`
734 at_range_end=`exprscip-shell system . . expr. $at_option : '.*-\(.*\)'`
735 if testscip-shell system . . test. $at_range_start -gt $at_range_end; then
736 at_tmp=$at_range_end
737 at_range_end=$at_range_start
738 at_range_start=$at_tmp
739 fi
740 at_fn_validate_rangesscip-shell shell shell-project 0.0.0 at_fn_validate_ranges(). at_range_start at_range_end
741 at_range=`printfscip-shell system . . printf. "%s\n" "$at_groups_all" | \
742 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
743 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_groups "$at_range$as_nl"
744 ;;
745
746 # Directory selection.
747 --directory | -C )
748 at_prev=--directory
749 ;;
750 --directory=* )
751 at_change_dir=:
752 at_dir=$at_optarg
753 if testscip-shell system . . test. x- = "x$at_dir" ; then
754 at_dir=./-
755 fi
756 ;;
757
758 # Parallel execution.
759 --jobs | -j )
760 at_jobs=0
761 ;;
762 --jobs=* | -j[0-9]* )
763 if testscip-shell system . . test. -n "$at_optarg"; then
764 at_jobs=$at_optarg
765 else
766 at_jobs=`exprscip-shell system . . expr. X$at_option : 'X-j\(.*\)'`
767 fi
768 case $at_jobs in *[!0-9]*)
769 at_optname=`echoscip-shell system . . echo. " $at_option" | sedscip-shell system . . sed. 's/^ //; s/[0-9=].*//'`
770 as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "non-numeric argument to $at_optname: $at_jobs" ;;
771 esac
772 ;;
773
774 # Keywords.
775 --keywords | -k )
776 at_prev=--keywords
777 ;;
778 --keywords=* )
779 at_groups_selected=$at_help_all
780 at_save_IFS=$IFS
781 IFS=,
782 set X $at_optarg
783 shift
784 IFS=$at_save_IFS
785 for at_keyword
786 do
787 at_invert=
788 case $at_keyword in
789 '!'*)
790 at_invert="-v"
791 at_keyword=`exprscip-shell system . . expr. "X$at_keyword" : 'X!\(.*\)'`
792 ;;
793 esac
794 # It is on purpose that we match the test group titles too.
795 at_groups_selected=`printfscip-shell system . . printf. "%s\n" "$at_groups_selected" |
796 grepscip-shell system . . grep. -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
797 done
798 # Smash the keywords.
799 at_groups_selected=`printfscip-shell system . . printf. "%s\n" "$at_groups_selected" | sedscip-shell system . . sed. 's/;.*//'`
800 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_groups "$at_groups_selected$as_nl"
801 ;;
802 --recheck)
803 at_recheck=:
804 ;;
805
806 *=*)
807 at_envvar=`exprscip-shell system . . expr. "x$at_option" : 'x\([^=]*\)='`
808 # Reject names that are not valid shell variable names.
809 case $at_envvar in
810 '' | [0-9]* | *[!_$as_cr_alnum]* )
811 as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "invalid variable name: \`$at_envvar'" ;;
812 esac
813 at_value=`printfscip-shell system . . printf. "%s\n" "$at_optarg" | sedscip-shell system . . sed. "s/'/'\\\\\\\\''/g"`
814 # Export now, but save eval for later and for debug scripts.
815 export $at_envvar
816 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_debug_args " $at_envvar='$at_value'"
817 ;;
818
819 *) printfscip-shell system . . printf. "%s\n" "$as_me: invalid option: $at_option" >&2
820 printfscip-shell system . . printf. "%s\n" "Try \`$0 --help' for more information." >&2
821 exit 1
822 ;;
823 esac
824 done
825
826 # Verify our last option didn't require an argument
827 if testscip-shell system . . test. -n "$at_prev"
828 then :
829 as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "\`$at_prev' requires an argument"
830 fi
831
832 # The file containing the suite.
833 at_suite_log=$at_dir/$as_me.log
834
835 # Selected test groups.
836 if testscip-shell system . . test. -z "$at_groups$at_recheck"; then
837 at_groups=$at_groups_all
838 else
839 if testscip-shell system . . test. -n "$at_recheck" && testscip-shell system . . test. -r "$at_suite_log"; then
840 at_oldfails=`sedscip-shell system . . sed. -n '
841 /^Failed tests:$/,/^Skipped tests:$/{
842 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
843 }
844 /^Unexpected passes:$/,/^## Detailed failed tests/{
845 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
846 }
847 /^## Detailed failed tests/q
848 ' "$at_suite_log"`
849 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_groups "$at_oldfails$as_nl"
850 fi
851 # Sort the tests, removing duplicates.
852 at_groups=`printfscip-shell system . . printf. "%s\n" "$at_groups" | sortscip-shell system . . sort. -nu | sedscip-shell system . . sed. '/^$/dscip-shell filesystem . . `/^$/d`.'`
853 fi
854
855 if testscip-shell system . . test. x"$at_color" = xalways \
856 || { testscip-shell system . . test. x"$at_color" = xauto && testscip-shell system . . test. -t 1; }; then
857 at_red=`printfscip-shell system . . printf. '\033[0;31m'`
858 at_grn=`printfscip-shell system . . printf. '\033[0;32m'`
859 at_lgn=`printfscip-shell system . . printf. '\033[1;32m'`
860 at_blu=`printfscip-shell system . . printf. '\033[1;34m'`
861 at_std=`printfscip-shell system . . printf. '\033[m'`
862 else
863 at_red= at_grn= at_lgn= at_blu= at_std=
864 fi
865
866 # Help message.
867 if $at_help_p; then
868 catscip-shell system . . cat. <<_ATEOF || at_write_fail=1
869 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
870
871 Run all the tests, or the selected TESTS, given by numeric ranges, and
872 save a detailed log file. Upon failure, create debugging scripts.
873
874 Do not change environment variables directly. Instead, set them via
875 command line arguments. Set \`AUTOTEST_PATH' to select the executables
876 to exercise. Each relative directory is expanded as build and source
877 directories relative to the top level of this distribution.
878 E.g., from within the build directory /tmp/foo-1.0, invoking this:
879
880 $ $0 AUTOTEST_PATH=bin
881
882 is equivalent to the following, assuming the source directory is /src/foo-1.0:
883
884 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
885 _ATEOF
886 catscip-shell system . . cat. <<_ATEOF || at_write_fail=1
887
888 Operation modes:
889 -h, --help print the help message, then exit
890 -V, --version print version number, then exit
891 -c, --clean remove all the files this test suite might create and exit
892 -l, --list describes all the tests, or the selected TESTS
893 _ATEOF
894 catscip-shell system . . cat. <<_ATEOF || at_write_fail=1
895
896 Execution tuning:
897 -C, --directory=DIR
898 change to directory DIR before starting
899 --color[=never|auto|always]
900 enable colored test results on terminal, or always
901 -j, --jobs[=N]
902 Allow N jobs at once; infinite jobs with no arg (default 1)
903 -k, --keywords=KEYWORDS
904 select the tests matching all the comma-separated KEYWORDS
905 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
906 --recheck select all tests that failed or passed unexpectedly last time
907 -e, --errexit abort as soon as a test fails; implies --debug
908 -v, --verbose force more detailed output
909 default for debugging scripts
910 -d, --debug inhibit clean up and top-level logging
911 default for debugging scripts
912 -x, --trace enable tests shell tracing
913 _ATEOF
914 catscip-shell system . . cat. <<_ATEOF || at_write_fail=1
915
916 Report bugs to <[email protected]>.
917 _ATEOF
918 exit $at_write_fail
919 fi
920
921 # List of tests.
922 if $at_list_p; then
923 catscip-shell system . . cat. <<_ATEOF || at_write_fail=1
924 osmo-cbc 0.5.1 test suite test groups:
925
926 NUM: FILE-NAME:LINE TEST-GROUP-NAME
927 KEYWORDS
928
929 _ATEOF
930 # Pass an empty line as separator between selected groups and help.
931 printfscip-shell system . . printf. "%s\n" "$at_groups$as_nl$as_nl$at_help_all" |
932 awkscip-shell system . . awk. 'NF == 1 && FS != ";" {
933 selected[$ 1] = 1
934 next
935 }
936 /^$/ { FS = ";" }
937 NF > 0 {
938 if (selected[$ 1]) {
939 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
940 if ($ 4) {
941 lmax = 79
942 indent = " "
943 line = indent
944 len = length (line)
945 n = split ($ 4, a, " ")
946 for (i = 1; i <= n; i++) {
947 l = length (a[i]) + 1
948 if (i > 1 && len + l > lmax) {
949 print line
950 line = indent " " a[i]
951 len = length (line)
952 } else {
953 line = line " " a[i]
954 len += l
955 }
956 }
957 if (n)
958 print line
959 }
960 }
961 }' || at_write_fail=1
962 exit $at_write_fail
963 fi
964 if $at_version_p; then
965 printfscip-shell system . . printf. "%s\n" "$as_me (osmo-cbc 0.5.1)" &&
966 catscip-shell system . . cat. <<\_ATEOF || at_write_fail=1
967
968 Copyright (C) 2021 Free Software Foundation, Inc.
969 This test suite is free software; the Free Software Foundation gives
970 unlimited permission to copy, distribute and modify it.
971 _ATEOF
972 exit $at_write_fail
973 fi
974
975 # Should we print banners? Yes if more than one test is run.
976 case $at_groups in #(
977 *$as_nl* )
978 at_print_banners=: ;; #(
979 * ) at_print_banners=false ;;
980 esac
981 # Text for banner N, set to a single space once printed.
982 # Banner 1. testsuite.at:2
983 # Category starts at test group 1.
984 at_banner_text_1="Regression tests."
985
986 # Take any -C into account.
987 if $at_change_dir ; then
988 testscip-shell system . . test. x != "x$at_dir" && cd "$at_dir" \
989 || as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "unable to change directory"
990 at_dir=`pwdscip-shell system . . pwd.`
991 fi
992
993 # Load the config files for any default variable assignments.
994 for at_file in atconfig atlocal
995 do
996 testscip-shell system . . test. -r $at_file || continue
997 . ./$at_file || as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "invalid content: $at_file"
998 done
999
1000 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1001 : "${at_top_build_prefix=$at_top_builddir}"
1002
1003 # Perform any assignments requested during argument parsing.
1004 eval "$at_debug_args"
1005
1006 # atconfig delivers names relative to the directory the test suite is
1007 # in, but the groups themselves are run in testsuite-dir/group-dir.
1008 if testscip-shell system . . test. -n "$at_top_srcdir"; then
1009 builddir=../..
1010 for at_dir_var in srcdir top_srcdir top_build_prefix
1011 do
1012 eval at_val=\$at_$at_dir_var
1013 case $at_val in
1014 [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1015 *) at_prefix=../../ ;;
1016 esac
1017 eval "$at_dir_var=\$at_prefix\$at_val"
1018 done
1019 fi
1020
1021 ## -------------------- ##
1022 ## Directory structure. ##
1023 ## -------------------- ##
1024
1025 # This is the set of directories and files used by this script
1026 # (non-literals are capitalized):
1027 #
1028 # TESTSUITE - the testsuite
1029 # TESTSUITE.log - summarizes the complete testsuite run
1030 # TESTSUITE.dir/ - created during a run, remains after -d or failed test
1031 # + at-groups/ - during a run: status of all groups in run
1032 # | + NNN/ - during a run: meta-data about test group NNN
1033 # | | + check-line - location (source file and line) of current AT_CHECK
1034 # | | + status - exit status of current AT_CHECK
1035 # | | + stdout - stdout of current AT_CHECK
1036 # | | + stder1 - stderr, including trace
1037 # | | + stderr - stderr, with trace filtered out
1038 # | | + test-source - portion of testsuite that defines group
1039 # | | + times - timestamps for computing duration
1040 # | | + pass - created if group passed
1041 # | | + xpass - created if group xpassed
1042 # | | + fail - created if group failed
1043 # | | + xfail - created if group xfailed
1044 # | | + skip - created if group skipped
1045 # + at-stop - during a run: end the run if this file exists
1046 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1047 # + 0..NNN/ - created for each group NNN, remains after -d or failed test
1048 # | + TESTSUITE.log - summarizes the group results
1049 # | + ... - files created during the group
1050
1051 # The directory the whole suite works in.
1052 # Should be absolute to let the user `cd' at will.
1053 at_suite_dir=$at_dir/$as_me.dir
1054 # The file containing the suite ($at_dir might have changed since earlier).
1055 at_suite_log=$at_dir/$as_me.log
1056 # The directory containing helper files per test group.
1057 at_helper_dir=$at_suite_dir/at-groups
1058 # Stop file: if it exists, do not start new jobs.
1059 at_stop_file=$at_suite_dir/at-stop
1060 # The fifo used for the job dispatcher.
1061 at_job_fifo=$at_suite_dir/at-job-fifo
1062
1063 if $at_clean; then
1064 testscip-shell system . . test. -d "$at_suite_dir" &&
1065 findscip-shell system . . find. "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1066 rmscip-shell system . . rm. -f -r "$at_suite_dir" "$at_suite_log"
1067 exit $?
1068 fi
1069
1070 # Don't take risks: use only absolute directories in PATH.
1071 #
1072 # For stand-alone test suites (ie. atconfig was not found),
1073 # AUTOTEST_PATH is relative to `.'.
1074 #
1075 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1076 # of the package. Then expand it into build/src parts, since users
1077 # may create executables in both places.
1078 AUTOTEST_PATH=`printfscip-shell system . . printf. "%s\n" "$AUTOTEST_PATH" | sedscip-shell system . . sed. "s|:|$PATH_SEPARATOR|g"`
1079 at_path=
1080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1081 for as_dir in $AUTOTEST_PATH $PATH
1082 do
1083 IFS=$as_save_IFS
1084 case $as_dir in #(((
1085 '') as_dir=./ ;;
1086 */) ;;
1087 *) as_dir=$as_dir/ ;;
1088 esac
1089 testscip-shell system . . test. -n "$at_path" && as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_path $PATH_SEPARATOR
1090 case $as_dir in
1091 [\\/]* | ?:[\\/]* )
1092 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_path "$as_dir"
1093 ;;
1094 * )
1095 if testscip-shell system . . test. -z "$at_top_build_prefix"; then
1096 # Stand-alone test suite.
1097 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_path "$as_dir"
1098 else
1099 # Embedded test suite.
1100 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1101 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_path "$at_top_srcdir/$as_dir"
1102 fi
1103 ;;
1104 esac
1105 done
1106 IFS=$as_save_IFS
1107
1108
1109 # Now build and simplify PATH.
1110 #
1111 # There might be directories that don't exist, but don't redirect
1112 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1113 at_new_path=
1114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1115 for as_dir in $at_path
1116 do
1117 IFS=$as_save_IFS
1118 case $as_dir in #(((
1119 '') as_dir=./ ;;
1120 */) ;;
1121 *) as_dir=$as_dir/ ;;
1122 esac
1123 testscip-shell system . . test. -d "$as_dir" || continue
1124 case $as_dir in
1125 [\\/]* | ?:[\\/]* ) ;;
1126 * ) as_dir=`(cd "$as_dir" && pwdscip-shell system . . pwd.) 2>/dev/nullscip-shell filesystem . . `/dev/null`.` ;;
1127 esac
1128 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1129 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1130 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1131 *) as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_new_path "$PATH_SEPARATOR$as_dir" ;;
1132 esac
1133 done
1134 IFS=$as_save_IFS
1135
1136 PATH=$at_new_path
1137 export PATH
1138
1139 # Setting up the FDs.
1140
1141
1142
1143 # 5 is the log file. Not to be overwritten if `-d'.
1144 if $at_debug_p; then
1145 at_suite_log=/dev/nullscip-shell filesystem . . `/dev/null`.
1146 else
1147 : >"$at_suite_log"
1148 fi
1149 exec 5>>"$at_suite_log"
1150
1151 # Banners and logs.
1152 printfscip-shell system . . printf. "%s\n" "## -------------------------- ##
1153 ## osmo-cbc 0.5.1 test suite. ##
1154 ## -------------------------- ##"
1155 {
1156 printfscip-shell system . . printf. "%s\n" "## -------------------------- ##
1157 ## osmo-cbc 0.5.1 test suite. ##
1158 ## -------------------------- ##"
1159 echoscip-shell system . . echo.
1160
1161 printfscip-shell system . . printf. "%s\n" "$as_me: command line was:"
1162 printfscip-shell system . . printf. "%s\n" " \$ $0 $at_cli_args"
1163 echoscip-shell system . . echo.
1164
1165 # If ChangeLog exists, list a few lines in case it might help determining
1166 # the exact version.
1167 if testscip-shell system . . test. -n "$at_top_srcdir" && testscip-shell system . . test. -f "$at_top_srcdir/ChangeLog"; then
1168 printfscip-shell system . . printf. "%s\n" "## ---------- ##
1169 ## ChangeLog. ##
1170 ## ---------- ##"
1171 echoscip-shell system . . echo.
1172 sedscip-shell system . . sed. 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1173 echoscip-shell system . . echo.
1174 fi
1175
1176 {
1177 catscip-shell system . . cat. <<_ASUNAME
1178 ## --------- ##
1179 ## Platform. ##
1180 ## --------- ##
1181
1182 hostname = `(hostnamescip-shell system . . hostname. || unamescip-shell system . . uname. -n) 2>/dev/nullscip-shell filesystem . . `/dev/null`. | sedscip-shell system . . sed. 1q`
1183 uname -m = `(unamescip-shell system . . uname. -m) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1184 uname -r = `(unamescip-shell system . . uname. -r) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1185 uname -s = `(unamescip-shell system . . uname. -s) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1186 uname -v = `(unamescip-shell system . . uname. -v) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1187
1188 /usr/bin/uname -p = `(/usr/bin/unamescip-shell filesystem . . `/usr/bin/uname`. -p) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1189 /bin/uname -X = `(/bin/unamescip-shell filesystem . . `/bin/uname`. -X) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1190
1191 /bin/arch = `(/bin/archscip-shell filesystem . . `/bin/arch`.) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1192 /usr/bin/arch -k = `(/usr/bin/archscip-shell filesystem . . `/usr/bin/arch`. -k) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1193 /usr/convex/getsysinfo = `(/usr/convex/getsysinfoscip-shell filesystem . . `/usr/convex/getsysinfo`.) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1194 /usr/bin/hostinfo = `(/usr/bin/hostinfoscip-shell filesystem . . `/usr/bin/hostinfo`.) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1195 /bin/machine = `(/bin/machinescip-shell filesystem . . `/bin/machine`.) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1196 /usr/bin/oslevel = `(/usr/bin/oslevelscip-shell filesystem . . `/usr/bin/oslevel`.) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1197 /bin/universe = `(/bin/universescip-shell filesystem . . `/bin/universe`.) 2>/dev/nullscip-shell filesystem . . `/dev/null`. || echoscip-shell system . . echo. unknown`
1198
1199 _ASUNAME
1200
1201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1202 for as_dir in $PATH
1203 do
1204 IFS=$as_save_IFS
1205 case $as_dir in #(((
1206 '') as_dir=./ ;;
1207 */) ;;
1208 *) as_dir=$as_dir/ ;;
1209 esac
1210 printfscip-shell system . . printf. "%s\n" "PATH: $as_dir"
1211 done
1212 IFS=$as_save_IFS
1213
1214 }
1215 echoscip-shell system . . echo.
1216
1217 # Contents of the config files.
1218 for at_file in atconfig atlocal
1219 do
1220 testscip-shell system . . test. -r $at_file || continue
1221 printfscip-shell system . . printf. "%s\n" "$as_me: $at_file:"
1222 sedscip-shell system . . sed. 's/^/| /' $at_file
1223 echoscip-shell system . . echo.
1224 done
1225 } >&5
1226
1227
1228 ## ------------------------- ##
1229 ## Autotest shell functions. ##
1230 ## ------------------------- ##
1231
1232 # at_fn_banner NUMBER
1233 # -------------------
1234 # Output banner NUMBER, provided the testsuite is running multiple groups and
1235 # this particular banner has not yet been printed.
1236 at_fn_bannerscip-shell shell shell-project 0.0.0 at_fn_banner(). ()
1237 {
1238 $at_print_banners || return 0
1239 eval at_banner_text=\$at_banner_text_$1
1240 testscip-shell system . . test. "x$at_banner_text" = "x " && return 0
1241 eval "at_banner_text_$1=\" \""
1242 if testscip-shell system . . test. -z "$at_banner_text"; then
1243 $at_first || echoscip-shell system . . echo.
1244 else
1245 printfscip-shell system . . printf. "%s\n" "$as_nl$at_banner_text$as_nl"
1246 fi
1247 } # at_fn_banner
1248
1249 # at_fn_check_prepare_notrace REASON LINE
1250 # ---------------------------------------
1251 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1252 # command; REASON is the reason for disabling tracing.
1253 at_fn_check_prepare_notracescip-shell shell shell-project 0.0.0 at_fn_check_prepare_notrace(). ()
1254 {
1255 $at_trace_echo "Not enabling shell tracing (command contains $1)"
1256 printfscip-shell system . . printf. "%s\n" "$2" >"$at_check_line_file"
1257 at_check_trace=: at_check_filter=:
1258 : >"$at_stdout"; : >"$at_stderr"
1259 }
1260
1261 # at_fn_check_prepare_trace LINE
1262 # ------------------------------
1263 # Perform AT_CHECK preparations for the command at LINE for a traceable
1264 # command.
1265 at_fn_check_prepare_tracescip-shell shell shell-project 0.0.0 at_fn_check_prepare_trace(). ()
1266 {
1267 printfscip-shell system . . printf. "%s\n" "$1" >"$at_check_line_file"
1268 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1269 : >"$at_stdout"; : >"$at_stderr"
1270 }
1271
1272 # at_fn_check_prepare_dynamic COMMAND LINE
1273 # ----------------------------------------
1274 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1275 # preparation function.
1276 at_fn_check_prepare_dynamicscip-shell shell shell-project 0.0.0 at_fn_check_prepare_dynamic(). ()
1277 {
1278 case $1 in
1279 *$as_nl*)
1280 at_fn_check_prepare_notracescip-shell shell shell-project 0.0.0 at_fn_check_prepare_notrace(). 'an embedded newline' "$2" ;;
1281 *)
1282 at_fn_check_prepare_tracescip-shell shell shell-project 0.0.0 at_fn_check_prepare_trace(). "$2" ;;
1283 esac
1284 }
1285
1286 # at_fn_filter_trace
1287 # ------------------
1288 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1289 # them to stderr.
1290 at_fn_filter_tracescip-shell shell shell-project 0.0.0 at_fn_filter_trace(). ()
1291 {
1292 mvscip-shell system . . mv. "$at_stderr" "$at_stder1"
1293 grepscip-shell system . . grep. '^ *+' "$at_stder1" >&2
1294 grepscip-shell system . . grep. -v '^ *+' "$at_stder1" >"$at_stderr"
1295 }
1296
1297 # at_fn_log_failure FILE-LIST
1298 # ---------------------------
1299 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1300 # with a failure exit code.
1301 at_fn_log_failurescip-shell shell shell-project 0.0.0 at_fn_log_failure(). ()
1302 {
1303 for file
1304 do printfscip-shell system . . printf. "%s\n" "$file:"; sedscip-shell system . . sed. 's/^/> /' "$file"; done
1305 echoscip-shell system . . echo. 1 > "$at_status_file"
1306 exit 1
1307 }
1308
1309 # at_fn_check_skip EXIT-CODE LINE
1310 # -------------------------------
1311 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1312 # the test group subshell with that same exit code. Use LINE in any report
1313 # about test failure.
1314 at_fn_check_skipscip-shell shell shell-project 0.0.0 at_fn_check_skip(). ()
1315 {
1316 case $1 in
1317 99) echoscip-shell system . . echo. 99 > "$at_status_file"; at_failed=:
1318 printfscip-shell system . . printf. "%s\n" "$2: hard failure"; exit 99;;
1319 77) echoscip-shell system . . echo. 77 > "$at_status_file"; exit 77;;
1320 esac
1321 }
1322
1323 # at_fn_check_status EXPECTED EXIT-CODE LINE
1324 # ------------------------------------------
1325 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1326 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1327 # exit code; if it is anything else print an error message referring to LINE,
1328 # and fail the test.
1329 at_fn_check_statusscip-shell shell shell-project 0.0.0 at_fn_check_status(). ()
1330 {
1331 case $2 in
1332 $1 ) ;;
1333 77) echoscip-shell system . . echo. 77 > "$at_status_file"; exit 77;;
1334 99) echoscip-shell system . . echo. 99 > "$at_status_file"; at_failed=:
1335 printfscip-shell system . . printf. "%s\n" "$3: hard failure"; exit 99;;
1336 *) printfscip-shell system . . printf. "%s\n" "$3: exit code was $2, expected $1"
1337 at_failed=:;;
1338 esac
1339 }
1340
1341 # at_fn_diff_devnull FILE
1342 # -----------------------
1343 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1344 # invocations.
1345 at_fn_diff_devnullscip-shell shell shell-project 0.0.0 at_fn_diff_devnull(). ()
1346 {
1347 testscip-shell system . . test. -s "$1" || return 0
1348 $at_diff "$at_devnull" "$1"
1349 }
1350
1351 # at_fn_test NUMBER
1352 # -----------------
1353 # Parse out test NUMBER from the tail of this file.
1354 at_fn_testscip-shell shell shell-project 0.0.0 at_fn_test(). ()
1355 {
1356 eval at_sed=\$at_sed$1
1357 sedscip-shell system . . sed. "$at_sed" "$at_myself" > "$at_test_source"
1358 }
1359
1360 # at_fn_create_debugging_script
1361 # -----------------------------
1362 # Create the debugging script $at_group_dir/run which will reproduce the
1363 # current test group.
1364 at_fn_create_debugging_scriptscip-shell shell shell-project 0.0.0 at_fn_create_debugging_script(). ()
1365 {
1366 {
1367 echoscip-shell system . . echo. "#! /bin/sh" &&
1368 echoscip-shell system . . echo. 'test ${ZSH_VERSION+y} && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1369 printfscip-shell system . . printf. "%s\n" "cd '$at_dir'" &&
1370 printfscip-shell system . . printf. "%s\n" "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1371 echoscip-shell system . . echo. 'exit 1'
1372 } >"$at_group_dir/run" &&
1373 chmodscip-shell system . . chmod. +x "$at_group_dir/run"
1374 }
1375
1376 ## -------------------------------- ##
1377 ## End of autotest shell functions. ##
1378 ## -------------------------------- ##
1379 {
1380 printfscip-shell system . . printf. "%s\n" "## ------------------ ##
1381 ## Running the tests. ##
1382 ## ------------------ ##"
1383 } >&5
1384
1385 at_start_date=`datescip-shell system . . date.`
1386 at_start_time=`datescip-shell system . . date. +%s 2>/dev/nullscip-shell filesystem . . `/dev/null`.`
1387 printfscip-shell system . . printf. "%s\n" "$as_me: starting at: $at_start_date" >&5
1388
1389 # Create the master directory if it doesn't already exist.
1390 as_dir="$at_suite_dir"; as_fn_mkdir_pscip-shell shell shell-project 0.0.0 as_fn_mkdir_p(). ||
1391 as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1392
1393 # Can we diff with `/dev/null'? DU 5.0 refuses.
1394 if diffscip-shell system . . diff. /dev/nullscip-shell filesystem . . `/dev/null`. /dev/nullscip-shell filesystem . . `/dev/null`. >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1; then
1395 at_devnull=/dev/nullscip-shell filesystem . . `/dev/null`.
1396 else
1397 at_devnull=$at_suite_dir/devnull
1398 >"$at_devnull"
1399 fi
1400
1401 # Use `diff -u' when possible.
1402 if at_diff=`diffscip-shell system . . diff. -u "$at_devnull" "$at_devnull" 2>&1` && testscip-shell system . . test. -z "$at_diff"
1403 then
1404 at_diff='diff -u'
1405 else
1406 at_diff=diff
1407 fi
1408
1409 # Get the last needed group.
1410 for at_group in : $at_groups; do :; done
1411
1412 # Extract the start and end lines of each test group at the tail
1413 # of this file
1414 awkscip-shell system . . awk. '
1415 BEGIN { FS="" }
1416 /^#AT_START_/ {
1417 start = NR
1418 }
1419 /^#AT_STOP_/ {
1420 test = substr ($ 0, 10)
1421 print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1422 if (test == "'"$at_group"'") exit
1423 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1424 . "$at_suite_dir/at-source-lines" ||
1425 as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "cannot create test line number cache" "$LINENO" 5
1426 rmscip-shell system . . rm. -f "$at_suite_dir/at-source-lines"
1427
1428 # Set number of jobs for `-j'; avoid more jobs than test groups.
1429 set X $at_groups; shift; at_max_jobs=$#
1430 if testscip-shell system . . test. $at_max_jobs -eq 0; then
1431 at_jobs=1
1432 fi
1433 if testscip-shell system . . test. $at_jobs -ne 1 &&
1434 { testscip-shell system . . test. $at_jobs -eq 0 || testscip-shell system . . test. $at_jobs -gt $at_max_jobs; }; then
1435 at_jobs=$at_max_jobs
1436 fi
1437
1438 # If parallel mode, don't output banners, don't split summary lines.
1439 if testscip-shell system . . test. $at_jobs -ne 1; then
1440 at_print_banners=false
1441 at_quiet=:
1442 fi
1443
1444 # Set up helper dirs.
1445 rmscip-shell system . . rm. -rf "$at_helper_dir" &&
1446 mkdirscip-shell system . . mkdir. "$at_helper_dir" &&
1447 cd "$at_helper_dir" &&
1448 { testscip-shell system . . test. -z "$at_groups" || mkdirscip-shell system . . mkdir. $at_groups; } ||
1449 as_fn_errorscip-shell shell shell-project 0.0.0 as_fn_error(). $? "testsuite directory setup failed" "$LINENO" 5
1450
1451 # Functions for running a test group. We leave the actual
1452 # test group execution outside of a shell function in order
1453 # to avoid hitting zsh 4.x exit status bugs.
1454
1455 # at_fn_group_prepare
1456 # -------------------
1457 # Prepare for running a test group.
1458 at_fn_group_preparescip-shell shell shell-project 0.0.0 at_fn_group_prepare(). ()
1459 {
1460 # The directory for additional per-group helper files.
1461 at_job_dir=$at_helper_dir/$at_group
1462 # The file containing the location of the last AT_CHECK.
1463 at_check_line_file=$at_job_dir/check-line
1464 # The file containing the exit status of the last command.
1465 at_status_file=$at_job_dir/status
1466 # The files containing the output of the tested commands.
1467 at_stdout=$at_job_dir/stdout
1468 at_stder1=$at_job_dir/stder1
1469 at_stderr=$at_job_dir/stderr
1470 # The file containing the code for a test group.
1471 at_test_source=$at_job_dir/test-source
1472 # The file containing dates.
1473 at_times_file=$at_job_dir/times
1474
1475 # Be sure to come back to the top test directory.
1476 cd "$at_suite_dir"
1477
1478 # Clearly separate the test groups when verbose.
1479 $at_first || $at_verbose echo
1480
1481 at_group_normalized=$at_group
1482
1483 eval 'while :; do
1484 case $at_group_normalized in #(
1485 '"$at_format"'*) break;;
1486 esac
1487 at_group_normalized=0$at_group_normalized
1488 done'
1489
1490
1491 # Create a fresh directory for the next test group, and enter.
1492 # If one already exists, the user may have invoked ./run from
1493 # within that directory; we remove the contents, but not the
1494 # directory itself, so that we aren't pulling the rug out from
1495 # under the shell's notion of the current directory.
1496 at_group_dir=$at_suite_dir/$at_group_normalized
1497 at_group_log=$at_group_dir/$as_me.log
1498 if testscip-shell system . . test. -d "$at_group_dir"
1499 then
1500 findscip-shell system . . find. "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1501 rmscip-shell system . . rm. -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1502 fi ||
1503 { printfscip-shell system . . printf. "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1504 printfscip-shell system . . printf. "%s\n" "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1505 # Be tolerant if the above `rm' was not able to remove the directory.
1506 as_dir="$at_group_dir"; as_fn_mkdir_pscip-shell shell shell-project 0.0.0 as_fn_mkdir_p().
1507
1508 echoscip-shell system . . echo. 0 > "$at_status_file"
1509
1510 # In verbose mode, append to the log file *and* show on
1511 # the standard output; in quiet mode only write to the log.
1512 if testscip-shell system . . test. -z "$at_verbose"; then
1513 at_tee_pipe='tee -a "$at_group_log"'
1514 else
1515 at_tee_pipe='cat >> "$at_group_log"'
1516 fi
1517 }
1518
1519 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1520 # -------------------------------------------------
1521 # Declare the test group ORDINAL, located at LINE with group description DESC,
1522 # and residing under BANNER. Use PAD to align the status column.
1523 at_fn_group_bannerscip-shell shell shell-project 0.0.0 at_fn_group_banner(). ()
1524 {
1525 at_setup_line="$2"
1526 testscip-shell system . . test. -n "$5" && at_fn_bannerscip-shell shell shell-project 0.0.0 at_fn_banner(). $5
1527 at_desc="$3"
1528 case $1 in
1529 [0-9]) at_desc_line=" $1: ";;
1530 [0-9][0-9]) at_desc_line=" $1: " ;;
1531 *) at_desc_line="$1: " ;;
1532 esac
1533 as_fn_appendscip-shell shell shell-project 0.0.0 as_fn_append(). at_desc_line "$3$4"
1534 $at_quiet printf %s "$at_desc_line"
1535 echoscip-shell system . . echo. "# -*- compilation -*-" >> "$at_group_log"
1536 }
1537
1538 # at_fn_group_postprocess
1539 # -----------------------
1540 # Perform cleanup after running a test group.
1541 at_fn_group_postprocessscip-shell shell shell-project 0.0.0 at_fn_group_postprocess(). ()
1542 {
1543 # Be sure to come back to the suite directory, in particular
1544 # since below we might `rm' the group directory we are in currently.
1545 cd "$at_suite_dir"
1546
1547 if testscip-shell system . . test. ! -f "$at_check_line_file"; then
1548 sedscip-shell system . . sed. "s/^ */$as_me: WARNING: /" <<_ATEOF
1549 A failure happened in a test group before any test could be
1550 run. This means that test suite is improperly designed. Please
1551 report this failure to <[email protected]>.
1552 _ATEOF
1553 printfscip-shell system . . printf. "%s\n" "$at_setup_line" >"$at_check_line_file"
1554 at_status=99
1555 fi
1556 $at_verbose printf %s "$at_group. $at_setup_line: "
1557 printfscip-shell system . . printf. %s "$at_group. $at_setup_line: " >> "$at_group_log"
1558 case $at_xfail:$at_status in
1559 yes:0)
1560 at_msg="UNEXPECTED PASS"
1561 at_res=xpass
1562 at_errexit=$at_errexit_p
1563 at_color=$at_red
1564 ;;
1565 no:0)
1566 at_msg="ok"
1567 at_res=pass
1568 at_errexit=false
1569 at_color=$at_grn
1570 ;;
1571 *:77)
1572 at_msg='skipped ('`catscip-shell system . . cat. "$at_check_line_file"`')'
1573 at_res=skip
1574 at_errexit=false
1575 at_color=$at_blu
1576 ;;
1577 no:* | *:99)
1578 at_msg='FAILED ('`catscip-shell system . . cat. "$at_check_line_file"`')'
1579 at_res=fail
1580 at_errexit=$at_errexit_p
1581 at_color=$at_red
1582 ;;
1583 yes:*)
1584 at_msg='expected failure ('`catscip-shell system . . cat. "$at_check_line_file"`')'
1585 at_res=xfail
1586 at_errexit=false
1587 at_color=$at_lgn
1588 ;;
1589 esac
1590 echoscip-shell system . . echo. "$at_res" > "$at_job_dir/$at_res"
1591 # In parallel mode, output the summary line only afterwards.
1592 if testscip-shell system . . test. $at_jobs -ne 1 && testscip-shell system . . test. -n "$at_verbose"; then
1593 printfscip-shell system . . printf. "%s\n" "$at_desc_line $at_color$at_msg$at_std"
1594 else
1595 # Make sure there is a separator even with long titles.
1596 printfscip-shell system . . printf. "%s\n" " $at_color$at_msg$at_std"
1597 fi
1598 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1599 case $at_status in
1600 0|77)
1601 # $at_times_file is only available if the group succeeded.
1602 # We're not including the group log, so the success message
1603 # is written in the global log separately. But we also
1604 # write to the group log in case they're using -d.
1605 if testscip-shell system . . test. -f "$at_times_file"; then
1606 at_log_msg="$at_log_msg ("`sedscip-shell system . . sed. 1d "$at_times_file"`')'
1607 rmscip-shell system . . rm. -f "$at_times_file"
1608 fi
1609 printfscip-shell system . . printf. "%s\n" "$at_log_msg" >> "$at_group_log"
1610 printfscip-shell system . . printf. "%s\n" "$at_log_msg" >&5
1611
1612 # Cleanup the group directory, unless the user wants the files
1613 # or the success was unexpected.
1614 if $at_debug_p || testscip-shell system . . test. $at_res = xpass; then
1615 at_fn_create_debugging_scriptscip-shell shell shell-project 0.0.0 at_fn_create_debugging_script().
1616 if testscip-shell system . . test. $at_res = xpass && $at_errexit; then
1617 echoscip-shell system . . echo. stop > "$at_stop_file"
1618 fi
1619 else
1620 if testscip-shell system . . test. -d "$at_group_dir"; then
1621 findscip-shell system . . find. "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1622 rmscip-shell system . . rm. -fr "$at_group_dir"
1623 fi
1624 rmscip-shell system . . rm. -f "$at_test_source"
1625 fi
1626 ;;
1627 *)
1628 # Upon failure, include the log into the testsuite's global
1629 # log. The failure message is written in the group log. It
1630 # is later included in the global log.
1631 printfscip-shell system . . printf. "%s\n" "$at_log_msg" >> "$at_group_log"
1632
1633 # Upon failure, keep the group directory for autopsy, and create
1634 # the debugging script. With -e, do not start any further tests.
1635 at_fn_create_debugging_scriptscip-shell shell shell-project 0.0.0 at_fn_create_debugging_script().
1636 if $at_errexit; then
1637 echoscip-shell system . . echo. stop > "$at_stop_file"
1638 fi
1639 ;;
1640 esac
1641 }
1642
1643
1644 ## ------------ ##
1645 ## Driver loop. ##
1646 ## ------------ ##
1647
1648
1649 if (set -m && set +m && set +b) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1; then
1650 set +b
1651 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1652 else
1653 at_job_control_on=: at_job_control_off=: at_job_group=
1654 fi
1655
1656 for at_signal in 1 2 15; do
1657 trap 'set +x; set +e
1658 $at_job_control_off
1659 at_signal='"$at_signal"'
1660 echo stop > "$at_stop_file"
1661 trap "" $at_signal
1662 at_pgids=
1663 for at_pgid in `jobs -p 2>/dev/null`; do
1664 at_pgids="$at_pgids $at_job_group$at_pgid"
1665 done
1666 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1667 wait
1668 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1669 echo >&2
1670 fi
1671 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1672 set x $at_signame
1673 test 0 -gt 2 && at_signame=$at_signal
1674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1675 printf "%s\n" "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1676 as_fn_arith 128 + $at_signal && exit_status=$as_val
1677 as_fn_exit $exit_status' $at_signal
1678 done
1679
1680 rmscip-shell system . . rm. -f "$at_stop_file"
1681 at_first=:
1682
1683 if testscip-shell system . . test. $at_jobs -ne 1 &&
1684 rmscip-shell system . . rm. -f "$at_job_fifo" &&
1685 testscip-shell system . . test. -n "$at_job_group" &&
1686 ( mkfifoscip-shell system . . mkfifo. "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/nullscip-shell filesystem . . `/dev/null`.
1687 then
1688 # FIFO job dispatcher.
1689
1690 trap 'at_pids=
1691 for at_pid in `jobs -p`; do
1692 at_pids="$at_pids $at_job_group$at_pid"
1693 done
1694 if test -n "$at_pids"; then
1695 at_sig=TSTP
1696 test ${TMOUT+y} && at_sig=STOP
1697 kill -$at_sig $at_pids 2>/dev/null
1698 fi
1699 kill -STOP $$
1700 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1701
1702 echoscip-shell system . . echo.
1703 # Turn jobs into a list of numbers, starting from 1.
1704 at_joblist=`printfscip-shell system . . printf. "%s\n" "$at_groups" | sedscip-shell system . . sed. -n 1,${at_jobs}p`
1705
1706 set X $at_joblist
1707 shift
1708 for at_group in $at_groups; do
1709 $at_job_control_on 2>/dev/nullscip-shell filesystem . . `/dev/null`.
1710 (
1711 # Start one test group.
1712 $at_job_control_off
1713 if $at_first; then
1714 exec 7>"$at_job_fifo"
1715 else
1716 exec 6<&-
1717 fi
1718 trap 'set +x; set +e
1719 trap "" PIPE
1720 echo stop > "$at_stop_file"
1721 echo >&7
1722 as_fn_exit 141' PIPE
1723 at_fn_group_preparescip-shell shell shell-project 0.0.0 at_fn_group_prepare().
1724 if cd "$at_group_dir" &&
1725 at_fn_testscip-shell shell shell-project 0.0.0 at_fn_test(). $at_group &&
1726 . "$at_test_source"
1727 then :; else
1728 { printfscip-shell system . . printf. "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1729 printfscip-shell system . . printf. "%s\n" "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1730 at_failed=:
1731 fi
1732 at_fn_group_postprocessscip-shell shell shell-project 0.0.0 at_fn_group_postprocess().
1733 echoscip-shell system . . echo. >&7
1734 ) &
1735 $at_job_control_off
1736 if $at_first; then
1737 at_first=false
1738 exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1739 fi
1740 shift # Consume one token.
1741 if testscip-shell system . . test. $# -gt 0; then :; else
1742 read at_token <&6 || break
1743 set x $*
1744 fi
1745 testscip-shell system . . test. -f "$at_stop_file" && break
1746 done
1747 exec 7>&-
1748 # Read back the remaining ($at_jobs - 1) tokens.
1749 set X $at_joblist
1750 shift
1751 if testscip-shell system . . test. $# -gt 0; then
1752 shift
1753 for at_job
1754 do
1755 read at_token
1756 done <&6
1757 fi
1758 exec 6<&-
1759 wait
1760 else
1761 # Run serially, avoid forks and other potential surprises.
1762 for at_group in $at_groups; do
1763 at_fn_group_preparescip-shell shell shell-project 0.0.0 at_fn_group_prepare().
1764 if cd "$at_group_dir" &&
1765 at_fn_testscip-shell shell shell-project 0.0.0 at_fn_test(). $at_group &&
1766 . "$at_test_source"; then :; else
1767 { printfscip-shell system . . printf. "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1768 printfscip-shell system . . printf. "%s\n" "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1769 at_failed=:
1770 fi
1771 at_fn_group_postprocessscip-shell shell shell-project 0.0.0 at_fn_group_postprocess().
1772 testscip-shell system . . test. -f "$at_stop_file" && break
1773 at_first=false
1774 done
1775 fi
1776
1777 # Wrap up the test suite with summary statistics.
1778 cd "$at_helper_dir"
1779
1780 # Use ?..???? when the list must remain sorted, the faster * otherwise.
1781 at_pass_list=`for f in */pass; do echoscip-shell system . . echo. $f; done | sedscip-shell system . . sed. '/\*/d; s,/pass,,scip-shell filesystem . . `/\*/d; s,/pass,,`.'`
1782 at_skip_list=`for f in */skip; do echoscip-shell system . . echo. $f; done | sedscip-shell system . . sed. '/\*/d; s,/skip,,scip-shell filesystem . . `/\*/d; s,/skip,,`.'`
1783 at_xfail_list=`for f in */xfail; do echoscip-shell system . . echo. $f; done | sedscip-shell system . . sed. '/\*/d; s,/xfail,,scip-shell filesystem . . `/\*/d; s,/xfail,,`.'`
1784 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
1785 echoscip-shell system . . echo. $f; done | sedscip-shell system . . sed. '/?/d; s,/xpass,,scip-shell filesystem . . `/?/d; s,/xpass,,`.'`
1786 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
1787 echoscip-shell system . . echo. $f; done | sedscip-shell system . . sed. '/?/d; s,/fail,,scip-shell filesystem . . `/?/d; s,/fail,,`.'`
1788
1789 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
1790 shift; at_group_count=$#
1791 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
1792 set X $at_xfail_list; shift; at_xfail_count=$#
1793 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
1794 set X $at_skip_list; shift; at_skip_count=$#
1795
1796 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). $at_group_count - $at_skip_count && at_run_count=$as_val
1797 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
1798 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
1799
1800 # Back to the top directory.
1801 cd "$at_dir"
1802 rmscip-shell system . . rm. -rf "$at_helper_dir"
1803
1804 # Compute the duration of the suite.
1805 at_stop_date=`datescip-shell system . . date.`
1806 at_stop_time=`datescip-shell system . . date. +%s 2>/dev/nullscip-shell filesystem . . `/dev/null`.`
1807 printfscip-shell system . . printf. "%s\n" "$as_me: ending at: $at_stop_date" >&5
1808 case $at_start_time,$at_stop_time in
1809 [0-9]*,[0-9]*)
1810 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). $at_stop_time - $at_start_time && at_duration_s=$as_val
1811 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). $at_duration_s /scip-shell filesystem . . `/`. 60 && at_duration_m=$as_val
1812 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). $at_duration_m /scip-shell filesystem . . `/`. 60 && at_duration_h=$as_val
1813 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). $at_duration_s % 60 && at_duration_s=$as_val
1814 as_fn_arithscip-shell shell shell-project 0.0.0 as_fn_arith(). $at_duration_m % 60 && at_duration_m=$as_val
1815 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
1816 printfscip-shell system . . printf. "%s\n" "$as_me: test suite duration: $at_duration" >&5
1817 ;;
1818 esac
1819
1820 echoscip-shell system . . echo.
1821 printfscip-shell system . . printf. "%s\n" "## ------------- ##
1822 ## Test results. ##
1823 ## ------------- ##"
1824 echoscip-shell system . . echo.
1825 {
1826 echoscip-shell system . . echo.
1827 printfscip-shell system . . printf. "%s\n" "## ------------- ##
1828 ## Test results. ##
1829 ## ------------- ##"
1830 echoscip-shell system . . echo.
1831 } >&5
1832
1833 if testscip-shell system . . test. $at_run_count = 1; then
1834 at_result="1 test"
1835 at_were=was
1836 else
1837 at_result="$at_run_count tests"
1838 at_were=were
1839 fi
1840 if $at_errexit_p && testscip-shell system . . test. $at_unexpected_count != 0; then
1841 if testscip-shell system . . test. $at_xpass_count = 1; then
1842 at_result="$at_result $at_were run, one passed"
1843 else
1844 at_result="$at_result $at_were run, one failed"
1845 fi
1846 at_result="$at_result unexpectedly and inhibited subsequent tests."
1847 at_color=$at_red
1848 else
1849 # Don't you just love exponential explosion of the number of cases?
1850 at_color=$at_red
1851 case $at_xpass_count:$at_fail_count:$at_xfail_count in
1852 # So far, so good.
1853 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
1854 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
1855
1856 # Some unexpected failures
1857 0:*:0) at_result="$at_result $at_were run,
1858 $at_fail_count failed unexpectedly." ;;
1859
1860 # Some failures, both expected and unexpected
1861 0:*:1) at_result="$at_result $at_were run,
1862 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1863 0:*:*) at_result="$at_result $at_were run,
1864 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1865
1866 # No unexpected failures, but some xpasses
1867 *:0:*) at_result="$at_result $at_were run,
1868 $at_xpass_count passed unexpectedly." ;;
1869
1870 # No expected failures, but failures and xpasses
1871 *:1:0) at_result="$at_result $at_were run,
1872 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
1873 *:*:0) at_result="$at_result $at_were run,
1874 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
1875
1876 # All of them.
1877 *:*:1) at_result="$at_result $at_were run,
1878 $at_xpass_count passed unexpectedly,
1879 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1880 *:*:*) at_result="$at_result $at_were run,
1881 $at_xpass_count passed unexpectedly,
1882 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1883 esac
1884
1885 if testscip-shell system . . test. $at_skip_count = 0 && testscip-shell system . . test. $at_run_count -gt 1; then
1886 at_result="All $at_result"
1887 fi
1888 fi
1889
1890 # Now put skips in the mix.
1891 case $at_skip_count in
1892 0) ;;
1893 1) at_result="$at_result
1894 1 test was skipped." ;;
1895 *) at_result="$at_result
1896 $at_skip_count tests were skipped." ;;
1897 esac
1898
1899 if testscip-shell system . . test. $at_unexpected_count = 0; then
1900 echoscip-shell system . . echo. "$at_color$at_result$at_std"
1901 echoscip-shell system . . echo. "$at_result" >&5
1902 else
1903 echoscip-shell system . . echo. "${at_color}ERROR: $at_result$at_std" >&2
1904 echoscip-shell system . . echo. "ERROR: $at_result" >&5
1905 {
1906 echoscip-shell system . . echo.
1907 printfscip-shell system . . printf. "%s\n" "## ------------------------ ##
1908 ## Summary of the failures. ##
1909 ## ------------------------ ##"
1910
1911 # Summary of failed and skipped tests.
1912 if testscip-shell system . . test. $at_fail_count != 0; then
1913 echoscip-shell system . . echo. "Failed tests:"
1914 $SHELL "$at_myself" $at_fail_list --list
1915 echoscip-shell system . . echo.
1916 fi
1917 if testscip-shell system . . test. $at_skip_count != 0; then
1918 echoscip-shell system . . echo. "Skipped tests:"
1919 $SHELL "$at_myself" $at_skip_list --list
1920 echoscip-shell system . . echo.
1921 fi
1922 if testscip-shell system . . test. $at_xpass_count != 0; then
1923 echoscip-shell system . . echo. "Unexpected passes:"
1924 $SHELL "$at_myself" $at_xpass_list --list
1925 echoscip-shell system . . echo.
1926 fi
1927 if testscip-shell system . . test. $at_fail_count != 0; then
1928 printfscip-shell system . . printf. "%s\n" "## ---------------------- ##
1929 ## Detailed failed tests. ##
1930 ## ---------------------- ##"
1931 echoscip-shell system . . echo.
1932 for at_group in $at_fail_list
1933 do
1934 at_group_normalized=$at_group
1935
1936 eval 'while :; do
1937 case $at_group_normalized in #(
1938 '"$at_format"'*) break;;
1939 esac
1940 at_group_normalized=0$at_group_normalized
1941 done'
1942
1943 catscip-shell system . . cat. "$at_suite_dir/$at_group_normalized/$as_me.log"
1944 echoscip-shell system . . echo.
1945 done
1946 echoscip-shell system . . echo.
1947 fi
1948 if testscip-shell system . . test. -n "$at_top_srcdir"; then
1949 sedscip-shell system . . sed. 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1950 ## ${at_top_build_prefix}config.log ##
1951 _ASBOX
1952 sedscip-shell system . . sed. 's/^/| /' ${at_top_build_prefix}config.log
1953 echoscip-shell system . . echo.
1954 fi
1955 } >&5
1956
1957 sedscip-shell system . . sed. 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1958 ## $as_me.log was created. ##
1959 _ASBOX
1960
1961 echoscip-shell system . . echo.
1962 if $at_debug_p; then
1963 at_msg='per-test log files'
1964 else
1965 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
1966 fi
1967 at_msg1a=${at_xpass_list:+', '}
1968 at_msg1=$at_fail_list${at_fail_list:+" failed$at_msg1a"}
1969 at_msg2=$at_xpass_list${at_xpass_list:+" passed unexpectedly"}
1970
1971 printfscip-shell system . . printf. "%s\n" "Please send $at_msg and all information you think might help:
1972
1973 To: <[email protected]>
1974 Subject: [osmo-cbc 0.5.1] $as_me: $at_msg1$at_msg2
1975
1976 You may investigate any problem if you feel able to do so, in which
1977 case the test suite provides a good starting point. Its output may
1978 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
1979 "
1980 exit 1
1981 fi
1982
1983 exit 0
1984
1985 ## ------------- ##
1986 ## Actual tests. ##
1987 ## ------------- ##
1988 #AT_START_1
1989 at_fn_group_bannerscip-shell shell shell-project 0.0.0 at_fn_group_banner(). 1 'testsuite.at:4' \
1990 "sbcap" " " 1
1991 at_xfail=no
1992 (
1993 printfscip-shell system . . printf. "%s\n" "1. $at_setup_line: testing $at_desc ..."
1994 $at_traceon
1995
1996
1997 catscip-shell system . . cat. $abs_srcdir/sbcap/sbcap_test.ok > expout
1998 { set +x
1999 printfscip-shell system . . printf. "%s\n" "$at_srcdir/testsuite.at:7: \$abs_top_builddir/tests/sbcap/sbcap_test"
2000 at_fn_check_prepare_dynamicscip-shell shell shell-project 0.0.0 at_fn_check_prepare_dynamic(). "$abs_top_builddir/tests/sbcap/sbcap_test" "testsuite.at:7"
2001 ( $at_check_trace; $abs_top_builddir/tests/sbcap/sbcap_test
2002 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2003 at_status=$? at_failed=false
2004 $at_check_filter
2005 echoscip-shell system . . echo. stderr:; catscip-shell system . . cat. "$at_stderr"
2006 $at_diff expout "$at_stdout" || at_failed=:
2007 at_fn_check_statusscip-shell shell shell-project 0.0.0 at_fn_check_status(). 0 $at_status "$at_srcdir/testsuite.at:7"
2008 $at_failed && at_fn_log_failurescip-shell shell shell-project 0.0.0 at_fn_log_failure().
2009 $at_traceon; }
2010
2011 set +x
2012 $at_times_p && times >"$at_times_file"
2013 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2014 read at_status <"$at_status_file"
2015 #AT_STOP_1