Lines Matching +full:configure +full:- +full:openssl +full:- +full:no +full:- +full:verbose
3 # Copyright (C) 2009-2016 Free Software Foundation, Inc.
31 # script is named tests/test-1, then you would use "path_prepend_ ../src",
43 # $ make check TESTS=test-foo.sh
45 # Running a single test, with verbose output:
46 # $ make check TESTS=test-foo.sh VERBOSE=yes
48 # Running a single test, with single-stepping:
49 # 1. Go into a sub-shell:
94 framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
109 test $? -eq $exp_exit && ret_=0 || ret_=1
111 if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
112 set -x
119 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
122 alias -g '${1+"$@"}'='"$@"'
125 case `(set -o) 2>/dev/null` in
126 *posix*) set -o posix ;;
133 # - hyphen-containing alias names
134 # - we prefer to use ${var#...} substitution, rather than having
138 # shells until we find one that passes. If one is found, re-exec it.
139 # If no acceptable shell is found, skip the current test.
141 # The "...set -x; P=1 true 2>err..." test is to disqualify any shell that
148 # 10 - passes all tests; ok to use
149 # 9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score
150 # ? - not ok
155 if test "$VERBOSE" = yes; then
156 test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9
158 test -z "$EXEEXT" && exit $score_
159 shopt -s expand_aliases
160 alias a-b="echo zoo"
164 && test $(a-b) = zoo \
168 if test "x$1" = "x--no-reexec"; then
179 for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \
187 test -z "$marginal_" && skip_ failed to find an adequate shell
193 # Otherwise, run it via $re_shell_ -c ...
200 "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
219 # Found a usable shell. Preserve -v and -x.
220 case $- in
221 *v*x* | *x*v*) opts_=-vx ;;
222 *v*) opts_=-v ;;
223 *x*) opts_=-x ;;
228 exec "$re_shell_" $opts_ "$0" --no-reexec "$@"
235 test -n "$BASH_VERSION" && unalias -a
238 # PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
239 # That is part of the shell-selection test above. Why use aliases rather
240 # than functions? Because support for hyphen-containing aliases is more
241 # widespread than that for hyphen-containing function names.
242 test -n "$EXEEXT" && shopt -s expand_aliases
244 # Enable glibc's malloc-perturbing option.
246 # malloc-related functions often return memory that is mostly zeroed.
252 # interrupt). Override it with a per-test function, e.g., to unmount
256 # Emit a header similar to that from diff -u; Print the simulated "diff"
260 printf '%s\n' "diff -u $*" \
261 "--- $1 1970-01-01" \
262 "+++ $2 1970-01-01"
267 # When there are not two arguments, or no argument is /dev/null, return 2.
276 test -s "$2" || return 0
282 test -s "$1" || return 0
283 emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
290 if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \
291 && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then
292 # diff accepts the -u option and does not (like AIX 7 'diff') produce an
294 if test -z "$diff_out_"; then
295 compare_ () { diff -u "$@"; }
299 if diff -u "$@" > diff.out; then
300 # No differences were found, but Solaris 'diff' produces output
301 # "No differences encountered". Hide this output.
302 rm -f diff.out
306 rm -f diff.out
312 for diff_opt_ in -U3 -c '' no; do
313 test "$diff_opt_" = no && break
316 test "$diff_opt_" != no
318 if test -z "$diff_out_"; then
324 # No differences were found, but AIX and HP-UX 'diff' produce output
325 # "No differences encountered" or "There are no differences between the
327 rm -f diff.out
331 rm -f diff.out
336 elif cmp -s /dev/null /dev/null 2>/dev/null; then
337 compare_ () { cmp -s "$@"; }
350 # fail in a "set -e" environment.
364 # Run the user-overridable cleanup_ function, remove the temporary
372 chmod -R u+rwx "$test_dir_"
374 rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
380 # a space-separated list of those names and return 0. Otherwise, don't
389 # If there was no *.exe file, or there existed a file named "*.exe" that
392 test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \
398 *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;;
414 # define no alias and return 1.
426 if test -n "$base_names_"; then
436 # specified, possibly-$initial_cwd_-relative, directory.
461 if test "$VERBOSE" = yes; then
462 # Test whether set -x may cause the selected shell to corrupt an
463 # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh
465 # If enabling verbose output this way would cause trouble, simply
468 warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
470 set -x
477 test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
481 # As autoconf-generated configure scripts do, ensure that IFS
495 # Create a temporary directory, much like mktemp -d does.
501 # Failing that, we'll roll our own mktemp-like function:
502 # - try to get random bytes from /dev/urandom
503 # - failing that, generate output from a combination of quickly-varying
504 # sources and gzip. Ignore non-varying gzip header, and extract
506 # - given those bits, map to file-name bytes using tr, and try to create
508 # - make only $MAX_TRIES_ attempts
510 # Helper function. Print $N pseudo-random bytes from a-zA-Z0-9.
515 # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
516 # But if they have openssl, they probably have mktemp, too.
520 if test -r "$dev_rand_"; then
521 # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
523 | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
528 cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
533 len_=`echo "$data_"|wc -c`
534 test $n_plus_50_ -le $len_ && break;
540 | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
556 # it would subvert the post-mktemp "case"-based destdir test.
570 d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
576 test -d "$d" &&
579 perms=`ls -dgo "$d" 2>/dev/null` &&
580 case $perms in drwx--[-S]---*) :;; *) false;; esac && {
591 template_length_=`echo "$template_" | wc -c`
592 nx_=`echo "$base_template_" | wc -c`
593 nx_=`expr $template_length_ - $nx_`
600 err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
602 test $MAX_TRIES_ -le $i_ && break;
610 test -f "$srcdir/init.cfg" \