The POSIX standard only requires false(1) to return a "non-zero" exit
code; almost all systems return 1 but some (Solaris!!!) return 255 or
possibly even other values. Use our helper "fail" instead.
* tests/thelp.pl: Have the "fail" command obey -q.
* tests/scripts/features/parallelism: Helper -q no longer prints fail.
* tests/scripts/targets/POSIX: Replace false with #HELPER# -q fail 1.
* tests/scripts/variables/MAKEFLAGS: Ditto.
* tests/scripts/variables/SHELL: Ditto.
Tests that try to kill the make process were not behaving as expected
on OpenBSD: the signal was sent from make to its children but the
sleep didn't die. Something odd about the way the shell treats TERM.
To reduce platform dependencies add "term" to the helper tool and run
that instead of kill / sleep.
* tests/thelp.pl: Add a new operation "term" that takes a PID.
* tests/scripts/features/output-sync: Use it.
* tests/scripts/features/temp_stdin: Ditto.
The GNU platform testers reported a number of test errors on
different systems; try to address them.
* tests/thelp.pl: A number of tests timed out with a 4-second
timeout. Increase the default timeout to 10 seconds.
* tests/run_make_tests.pl: Executing directories on cygwin behaves
differently in Perl than make so skip these tests there.
* tests/scripts/options/symlinks: Check for the symlink feature
in make, rather than whether the system supports them.
* tests/scripts/features/implicit_search: On some systems "false"
exits with a different exit code. Use the helper instead.
* tests/scripts/features/loadapi: Ditto.
* tests/scripts/features/output-sync: Sleep before make -f bar in
the first test as well as the second one.
* tests/scripts/features/exec: Skip on cygwin, which seems to
be "UNIX" but where scripts don't run normally.
* tests/scripts/misc/fopen-fail: Skip on cygwin, where make
eventually exits with exit code 0 and no error messages.
Keep a count of bytes read rather than comparing pointers since the
variable_buffer might get reallocated.
Bug and patch by Ken Tossell <ken@tossell.net>
Regression tests by Dmitry Goncharov <dgoncharov@users.sf.net>
Tweaked by Paul Smith <psmith@gnu.org>
* src/function.c (func_file): Use bytes read rather than a pointer.
* tests/scripts/functions/file: Provide various tests for reading
empty files, files with/without newlines, and large files.
* tests/thelp.pl: Rename from tests/jhelp.pl.
(op): Use names instead of options for the operations.
(op): Add new operations for sleep, mkdir, and rm.
(op): Enhance wait to time out
* tests/run_make_tests.pl: Add a new #HELPER# replacement
(subst_make_string): Use fully-qualified path to thelp.pl
* tests/scripts/features/parallelism: Update to use thelp.pl
and the new named operations. Use thelp.pl sleep instead of
system-specific sleep commands.
* tests/scripts/features/output-sync: Update to use thelp.pl
instead of complex shell scripts.
* Makefile.am: Distribute tests/thelp.pl instead of tests/jhelp.pl