make/tests/scripts/misc
Paul Smith 971b02d58e tests: Run each file in a separate directory
Avoid cross-contamination between test files by creating a new
working directory for each file, and setting it as the current
directory before starting the tests in that file.

Rename the test output as tNNN.{base,log,diff,mk} where NNN is
a test number starting with 001 for the first test.  It is
slightly more annoying to find diff files since you can't use
autocomplete directly but it is simpler to match things.

Detect the source directory as the location of the test_driver.pl
script, so remove the separate -srcdir option.

* Makefile.am: Remove hacks to create symlinks when building
out-of-tree, and remove -srcdir option from run_make_tests.
* tests/test_driver.pl: Locate $srcpath based on __FILE__, then
compute $toppath as its parent.  Set $scriptpath under $srcpath
and $workpath under the current directory.  Toss $*_filename
and modify get_logfile() etc. to use the suffix directly.  Add
a chdir() around the invocation of the test.
* tests/run_make_tests.pl: Throw out the -srcdir option and use
$srcpath set in test_driver.pl.  The #WORK# helper is no longer
useful so remove it.  Set #PWD# to the current working dir. Always
search the local directory and $srcpath for config-flags.pm.
Use $srcpath for finding the thelp.pl script.
* tests/scripts/features/vpath: Don't put things in work/ as it
is no longer a subdirectory.
* tests/scripts/features/vpathgpath: Ditto.
* tests/scripts/features/vpathplus: Ditto.
* tests/scripts/misc/general1: Ditto.
* tests/scripts/misc/general2: Ditto.
* tests/scripts/options/dash-k: Ditto.
* tests/scripts/options/symlinks: Use $testpath as the working
directory.
* tests/scripts/variables/GNUMAKEFLAGS: Use the test helper to
display env var values (grepping for GNUMAKEFLAGS finds extra things
now that it is our current working directory).
2023-04-02 17:32:09 -04:00
..
bs-nl [SV 35711] Check for special targets earlier 2020-11-29 17:55:02 -05:00
close_stdout tests [WINDOWS32]: Support Strawberry Perl on Windows 2022-12-20 02:14:18 -05:00
failure Add specific hints for errors due to invalid conditionals 2022-11-15 10:50:34 -05:00
fopen-fail Enhance tests to work on different systems 2022-10-22 22:37:49 -04:00
general1 tests: Run each file in a separate directory 2023-04-02 17:32:09 -04:00
general2 tests: Run each file in a separate directory 2023-04-02 17:32:09 -04:00
general3 * job.c (child_error): Modify error message string. 2019-09-22 17:02:57 -04:00
general4 * tests/scripts/misc/general4: Only test empty PATH on UNIX 2023-02-20 11:11:59 -05:00
utf8 * makeint.h (STOP_SET): [SV 40371] Cast to unsigned char. 2013-10-27 17:43:21 -04:00