make/tests/scripts/features
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
..
archives * tests/scripts/features/archives: Set CC properly 2023-02-19 14:49:56 -05:00
comments * Added the test suite to the main distribution. 1999-09-14 02:03:19 +00:00
conditionals Convert references from "GNU make" to "GNU Make" 2023-01-01 17:05:12 -05:00
default_names Add preprocessor macros for different platforms 2022-10-18 14:20:44 -04:00
dircache [SV 41273] Allow the directory cache to be invalidated 2020-11-29 17:59:16 -05:00
double_colon Adjust output strings to be aligned 2023-04-02 10:02:18 -04:00
echoing Portability changes for the test suite. 2016-12-26 09:01:59 -05:00
errors tests [WINDOWS32]: Support Strawberry Perl on Windows 2022-12-20 02:14:18 -05:00
escape Add test suite support to Windows 2017-06-04 18:37:20 -04:00
exec Clean up memory leak warnings from ASAN and Valgrind 2023-04-01 11:13:12 -04:00
export Convert references from "GNU make" to "GNU Make" 2023-01-01 17:05:12 -05:00
grouped_targets [SV 12078, SV 62809] Rebuild grouped targets if any is missing 2022-09-20 03:55:39 -04:00
implicit_search Adjust output strings to be aligned 2023-04-02 10:02:18 -04:00
include Adjust output strings to be aligned 2023-04-02 10:02:18 -04:00
jobserver [SV 63981] Don't warn on explicit -j1 2023-04-02 10:29:37 -04:00
load [SV 63044] load: Update .LOADED if the setup function returns -1 2022-09-10 22:42:28 -04:00
loadapi Enhance tests to work on different systems 2022-10-22 22:37:49 -04:00
mult_rules Adjust output strings to be aligned 2023-04-02 10:02:18 -04:00
mult_targets * Added the test suite to the main distribution. 1999-09-14 02:03:19 +00:00
order_only Make second expansion optional (partial implementation). 2005-10-24 13:01:39 +00:00
output-sync Clean up memory leak warnings from ASAN and Valgrind 2023-04-01 11:13:12 -04:00
override - Modify access of config and gnulib Savannah modules to use GIT 2009-06-04 06:30:27 +00:00
parallelism Avoid using false(1) in regression tests 2022-12-31 10:51:24 -05:00
patspecific_vars [SV 39709] Fix some typos. 2013-10-09 01:53:55 -04:00
patternrules Adjust output strings to be aligned 2023-04-02 10:02:18 -04:00
quoting Add test suite support to Windows 2017-06-04 18:37:20 -04:00
recursion [SV 46013] Allow recursive variable overrides from Makefiles 2019-05-19 19:25:50 -04:00
reinvoke * tests/scripts/features/reinvoke: Warn about closing STDIN. 2023-01-11 20:35:11 -05:00
rule_glob [Bug #39310] Parse simple pattern prereqs for globbing. 2013-07-22 02:23:02 -04:00
se_explicit Adjust output strings to be aligned 2023-04-02 10:02:18 -04:00
se_implicit Fix tests for MacOS and Windows 2022-08-30 21:05:34 -04:00
se_statpat Fix tests for MacOS and Windows 2022-08-30 21:05:34 -04:00
shell_assignment [SV 62654] Support GNU Make on z/OS 2023-01-08 10:45:38 -05:00
statipattrules Apply spelling fixes discovered by Codespell 2022-12-31 13:21:09 -05:00
suffixrules [SV 63821] Don't set up default suffix rules if makefile sets -r 2023-02-20 15:17:24 -05:00
targetvars Special-case Windows error results 2021-11-28 14:27:10 -05:00
temp_stdin Clean up memory leak warnings from ASAN and Valgrind 2023-04-01 11:13:12 -04:00
utf8 Ignore UTF-8 BOMs. See Savannah bug #36529. 2012-09-09 21:11:00 +00:00
varnesting Fix issues found by ASAN and Coverity 2022-10-31 02:23:04 -04:00
vpath tests: Run each file in a separate directory 2023-04-02 17:32:09 -04:00
vpathgpath tests: Run each file in a separate directory 2023-04-02 17:32:09 -04:00
vpathplus tests: Run each file in a separate directory 2023-04-02 17:32:09 -04:00