| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
* tests/init.sh (compare_): Document the preferred order of arguments.
(emit_diff_u_header_): New function.
(compare_dev_null_): Emit a simulated diff, rather than just the
contents of the unexpected file. Suggestion from Bruno Haible.
|
|
|
|
|
|
|
| |
* tests/init.sh: Make our compare function slightly more portable.
Reported by Bruno Haible in
http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020
Much improved by Eric Blake.
|
|
|
|
|
| |
* tests/init.sh (compare): Remove "No differences encountered" or
synonymous output from the 'diff' program.
|
|
|
|
|
|
| |
* tests/init.sh (warn_): Use printf, not echo. The latter would
misbehave when given strings containing a backslash or starting
with e.g., -n. James Youngman suggested setting IFS.
|
|
|
|
|
|
| |
* tests/init.sh (compare): If "diff -c" is supported but "diff -u" is
not, use "diff -c". Useful on AIX 6.1, HP-UX 11.31, OSF/1 5.1,
Solaris 8.
|
|
|
|
|
|
|
| |
* tests/init.sh: Relax check for diff -u support.
Rather than checking for GNU diff via --version, simply check
for support for -u itself. Useful at least on OpenBSD 4.9,
AIX 7.1, IRIX 6.5 and Solaris 10.
|
|
|
|
|
|
|
| |
* tests/init.sh (stderr_fileno_): Update the advice in comments.
See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488
for lots of discussion. Stefano Lattarini suggested the solution
of putting "9>&2" after the command. Reported by Bruno Haible.
|
|
|
|
|
|
| |
* tests/init.sh (mktempd_): In the usage message, use literal
'mktempd_', not '$ME' (which is even undefined), as the name of
the subroutine.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, the only way offered by tests/init.sh to
properly signal a hard error was the `framework_failure_'
function. But the error message issued by that function,
as its name would suggest, refers to a set-up failure in the
testsuite, while hard errors can obviously also be due to
other reasons. The best way to fix this inconsistency is to
introduce a new function with a more general error message.
* tests/init.sh (fatal_): New function.
|
|
|
|
|
|
|
|
|
|
|
| |
If the shell test loop first finds a marginal then a good shell, the
variable $gl_set_x_corrupts_stderr is still set to true and needlessly
drops $VERBOSE logging.
* tests/init.sh: (gl_set_x_corrupts_stderr_): Clear for successful
shell.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
| |
* tests/test-malloca.c (main): Unset the environment variable
to greatly speed up the test.
* tests/init.sh: Don't say that MALLOC_PERTURB_ is cheap.
* modules/malloca-tests: Depend on unsetenv.
|
|
|
|
|
|
| |
* tests/init.sh: Make it a little easier to see that a function's
name is "warn_", and not "warn" when looking at the first part of
its definition: "warn_ ()". Suggested by Ralf Wildenhues.
|
|
|
|
| |
Run the new "make update-copyright" rule.
|
|
|
|
|
|
|
| |
* tests/init.sh (find_exe_basenames_): Exempt [.exe.
(create_exe_shims_): Return 0 when skipping.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
| |
* tests/init.sh: Sync from coreutils housekeeping patch
<http://lists.gnu.org/archive/html/coreutils/2010-12/msg00116.html>
to keep lines within 80 columns.
|
|
|
|
|
|
|
| |
* tests/init.sh (setup_): Move fail=0 initialization here ...
(mktempd_): ... from here, so that tests can rely on fail being
set to 0 initially. This fixes a problem in coreutils; see:
http://lists.gnu.org/archive/html/coreutils/2010-12/msg00083.html
|
|
|
|
|
|
|
|
| |
* tests/init.sh (setup_): Ensure that IFS is defined,
so that saving and restoring it works as expected. This
appears to be useful at least for an old version of dash
from a long time ago (RH 6). See here for details:
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/436/focus=455
|
|
|
|
| |
* tests/init.sh (create_exe_shims_): s/function/alias/
|
|
|
|
|
|
|
|
|
|
|
| |
Not that it's likely to happen, but if I were to remove from a PATH
directory a file named "*.exe" (yes, starting with an asterisk),
at just the right moment, it would have made init.sh ignore all
remaining .exe-suffixed names in that directory.
* tests/init.sh (find_exe_basenames_): Don't give up on a directory if
a file named "*.exe" is removed between the glob expansion and the
processing of that oddly named file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cygwin was failing test-vc-list-files-{cvs,git}.sh, because of
spurious output on stderr.
../../tests/test-vc-list-files-cvs.sh (exe_shim): skipping directory: /home/eblake/m4-branch/build-aux
All because build-aux was a directory containing just scripts, and
no .exe extensions. This fixes it.
* tests/init.sh: Accomodate directory containing only scripts.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/init.sh: Too many shells corrupt application stderr when
you set -x, so we can't afford to disqualify them, since at least
on Irix-6.5, that would disqualify all bourne shells.
Instead, use a more discerning approach.
When iterating through candidate shells, give each a score
of 10 for perfect, 9 if corrupts stderr upon set -x but passes
all other tests, and some other value if it is unacceptable.
Use the first shell that gets a score of 10.
If no shell scores 10, use the first that scored 9.
Finally, when VERBOSE=yes is requested and set -x might cause trouble, simply
issue a warning and refrain from enabling debug output.
|
|
|
|
|
|
|
|
| |
* tests/init.sh: Add a test to disqualify /bin/sh from SunOS 5.11
and OpenBSD 4.7. They make it so with "set -x", environment settings
appear in stderr output. For example, this command:
/bin/sh -c 'set -x; P=1 true 2> err' 2>/dev/null; cat err
prints "P=1" on those two systems:
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tom's IRIX setup had a broken bash, and proceeded to run zsh
outside of POSIX mode. But trying to trace that setup proved
difficult, since the re-exec lost tracing.
* tests/init.sh: Borrow autoconf POSIX-mode sanitization. Pass
-vx through shell re-exec.
Reported by Tom G. Christensen.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
| |
This limitation is already documented in the Autoconf manual.
* tests/init.sh (setup_): Move exit trap outside of shell function.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
| |
* tests/init.sh (framework_failure_): Exit 99, not 1. This informs
automake's parallel-tests rule that this is an unexpected failure,
even if the test is listed in XFAIL_TESTS.
|
|
|
|
|
|
|
| |
* tests/init.sh: Hoist definitions of $ME_ and skip_ to precede
their first uses. Also hoist their companions: warn_, fail_,
framework_failure_, $stderr_fileno. Prompted by a patch from
Stefano Lattarini.
|
|
|
|
| |
* tests/init.sh: Fix redirection of stderr.
|
|
|
|
|
|
|
| |
* tests/init.sh: Compare exit code in loop against 9, not 2.
Patch by Bruno Haible.
Make the two tests more similar by adding an empty "then" clause.
Add comments.
|
|
|
|
|
|
|
|
|
|
| |
* tests/init.sh: Improve the re-exec-required check to first test the
current shell. If it passes the test, do not search for a shell that
does pass, and do not re-exec. This test is particularly contorted to
avoid triggering misbehavior in Solaris 10's /bin/sh whereby any use
of $(...) evokes a syntax error and causes immediate shell exit with
status 2. Bruno Haible reported that the re-exec made it impossible
to single-step through any init.sh-using script.
|
|
|
|
| |
* tests/init.sh: Correct typo in MALLOC_PERTURB_ initialization.
|
|
|
|
| |
* tests/init.sh: Enable glibc's malloc-perturbing option.
|
|
|
|
|
|
|
| |
* tests/init.sh: Recommend the one-line init.sh-sourcing idiom:
. "${srcdir=.}/init.sh"; path_prepend_ .
Add a note about path_prepend_ and the alternative of using
TESTS_ENVIRONMENT.
|
|
|
|
|
|
| |
* tests/init.sh (setup_): Don't rely on $? in signal handler.
Inspired by patches from Dmitry V. Levin.
Also trap on signal 3 (SIGQUIT).
|
|
|
|
|
|
|
|
| |
* tests/init.sh (rand_bytes_): Run tr in the "C" locale so it does
not try to interpret its random input bytes. Jarno Rajahalme reported
that ./test-xalloc-die.sh would fail with "tr: Illegal byte sequence"
on Darwin 10.3.0 with LC_CTYPE=UTF-8.
(mktempd_): Likewise, just in case.
|
|
|
|
|
|
|
|
|
| |
* tests/init.sh (mktempd_): Using env -i is rather harsh, and
although it probably works fine on all Unix-based systems, some
systems (Cygwin?) cannot tolerate a totally cleared environment.
Suggestion from Eric Blake.
2010-04-06 Jim Meyering <meyering@redhat.com>
|
|
|
|
|
| |
* tests/init.sh (mktempd_): Use env -i and set PATH explicitly rather
than unportable env -u. Solaris 5.11's env lacks support for -u.
|
|
|
|
| |
* tests/init.sh: Restore omitted ":" before stderr_fileno_ initialization.
|
|
|
|
|
|
|
| |
when using automake's parallel-tests mode.
* tests/init.sh (stderr_fileno_): Define overridable variable.
(warn_): New function, to use it.
(fail_, skip_, framework_failure_): Use warn_.
|
|
|
|
|
|
|
|
|
| |
* tests/init.sh: Re-exec a better shell, when needed.
If the current shell lacks support for posix $(...), an init.sh-using
test will now try to find a shell that supports that. If EXEEXT is
nonempty, we also require support for hyphen-in-alias-name and shell
substitutions like ${var#glob}. Failure to find such a shell results
in a skipped test.
|
|
|
|
|
| |
* tests/init.sh (create_exe_shim_functions_): Use `...`, not $(...),
to accommodate e.g., Solaris' /bin/sh.
|
|
|
|
|
|
|
|
|
| |
* tests/init.sh (find_exe_basenames_): Remove unnecessary use of
"dummy" in a for loop.
Use '!', not '^' to select the complement of a character set used
in a "case" statement.
Use shell variable manipulation, a la ${...%.exe}, rather than sed.
Suggestions from Eric Blake.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automatically arrange for an invocation of "prog" to execute the
program named "prog$EXEEXT" (usually prog.exe). Thus, all invocations
may use the simpler "prog", yet still work when built on a system
that requires specifying the added suffix.
Do this by constructing a function named "prog" that invokes
"prog.exe" for each .exe file in selected directories.
* tests/init.sh (find_exe_basenames_): New function.
(create_exe_shim_functions_): New function.
(path_prepend_): Use it.
|
|
|
|
|
| |
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Solaris 10's /bin/sh does not pass '.' arguments 2..N to the
sourced script:
$ printf 'echo "$@"\n' > f; /bin/sh -c '. ./f bar'
$ printf 'echo "$@"\n' > f; bash -c '. ./f bar'
bar
tests/init.sh relied on that, accepting a --set-path=DIR argument,
and two tests used that idiom.
* tests/init.sh: Update suggested usage comments.
(path_prepend_): New function, to be used in place of
the --src-path=DIR option.
Disallow empty strings and strings containing ":".
(setup_): Move PATH-prepending code into path_prepend_.
* tests/test-pread.sh: Adapt to new usage.
* tests/test-xalloc-die.sh: Likewise.
|
|
|
|
| |
* tests/init.sh: Add a sentence.
|
|
|
|
| |
* tests/init.sh: Add some developer and user documentation.
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/init.sh: Normally, srcdir is guaranteed by automake and
configure-time tests to be sanitized, so that there is no need to
use "$srcdir" in Makefile rules and shell scripts. Using $srcdir
(with no double quotes) suffices. However, since tests may be
invoked manually, and since you may explicitly set srcdir to the
name of a directory containing spaces, do quote its uses here.
* tests/test-pread.sh: Likewise.
Suggested by Bruno Haible.
|
|
* tests/init.sh: New file.
|