mirror of
https://github.com/mirror/make.git
synced 2026-09-05 14:15:00 +08:00
Refresh the test suite framework implementation.
Go through both run_make_tests.pl and test_driver.pl and slightly modernize the Perl and clean up indentation etc. Fix a number of warnings in the test scripts detected by running with -w. * tests/test_driver.pl: Move make error string detection out of the base test driver. (run_all_tests): Ensure that we always look for tests in the cwd. * tests/run_make_tests.pl: Use File::Spec for path manipulations. Correctly use setlocale() when detecting error strings. Get configuration from the config-flags.pm file not config.status. * tests/scripts/features/archives: Use new $cwddir variable. * tests/scripts/features/reinvoke: Add missing semicolon. * tests/scripts/features/vpath2: Avoid non-existent variable. * tests/scripts/functions/foreach: Escape variables. * tests/scripts/misc/bs-nl: Remove non-existing \v escape sequence. * tests/scripts/misc/general4: Use handy create_file(). * tests/scripts/options/dash-C: Use Cwd/$cwddir. * tests/scripts/options/dash-I: Use subst_make_string() and #PWD#. * tests/scripts/options/symlinks: Use File::Spec. * tests/scripts/targets/DEFAULT: Use create_file and run_make_test. * tests/scripts/variables/CURDIR: Use run_make_test. * tests/scripts/variables/automatic: Remove extraneous "\". * tests/scripts/vms/library: Remove extra "my" and extraneous "\".
This commit is contained in:
@@ -139,7 +139,6 @@ sub xlate
|
||||
s/\\r/\r/g;
|
||||
s/\\t/\t/g;
|
||||
s/\\f/\f/g;
|
||||
s/\\v/\v/g;
|
||||
s/\\n/\n/g;
|
||||
return $_;
|
||||
}
|
||||
|
||||
@@ -81,9 +81,7 @@ all: ; \@echo hi
|
||||
|
||||
# SV-56834 Ensure setting PATH in the makefile works properly
|
||||
mkdir('sd', 0775);
|
||||
open(my $fh, '>', 'sd/foobar');
|
||||
print $fh "exit 0\n";
|
||||
close($fh);
|
||||
create_file('sd/foobar', "exit 0\n");
|
||||
chmod 0755, 'sd/foobar';
|
||||
|
||||
run_make_test(q!
|
||||
@@ -107,9 +105,7 @@ rmdir('sd');
|
||||
|
||||
# Ensure that local programs are not found if "." is not on the PATH
|
||||
|
||||
open(my $fh, '>', 'foobar');
|
||||
print $fh "exit 0\n";
|
||||
close($fh);
|
||||
create_file('foobar', "exit 0\n");
|
||||
chmod 0755, 'foobar';
|
||||
|
||||
run_make_test(q!
|
||||
|
||||
Reference in New Issue
Block a user