diff options
author | Paul Smith <psmith@gnu.org> | 2010-07-12 05:23:19 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2010-07-12 05:23:19 +0000 |
commit | 7ba7dbca47e20159d046fab847ebb0ef6673b24a (patch) | |
tree | 77cef333f84b6adaab888e6d79e56c4973f1dca0 /tests | |
parent | b85b7e0a55d0a82cf4d108a022d2768483ddc4b6 (diff) | |
download | gunmake-7ba7dbca47e20159d046fab847ebb0ef6673b24a.tar.gz |
Add the beginning of the .ONESHELL special feature.
Original patch by David Boyce. Modified by Paul Smith.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 10 | ||||
-rwxr-xr-x | tests/run_make_tests.pl | 2 | ||||
-rw-r--r-- | tests/test_driver.pl | 9 |
3 files changed, 18 insertions, 3 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index a611422..66682ac 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,13 @@ +2010-07-12 Paul Smith <psmith@gnu.org> + + * test_driver.pl: Add a new $perl_name containing the path to Perl. + * run_make_tests.pl (run_make_test): Replace the special string + #PERL# in a makefile etc. with the path the Perl executable so + makefiles can use it. + + * scripts/targets/ONESHELL: Add a new set of regression tests for + the .ONESHELL feature. + 2010-07-06 Paul Smith <psmith@gnu.org> * scripts/variables/SHELL: Test the new .SHELLFLAGS variable. diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl index dabeae9..b5ee023 100755 --- a/tests/run_make_tests.pl +++ b/tests/run_make_tests.pl @@ -122,6 +122,7 @@ sub run_make_test $makestring =~ s/#MAKEFILE#/$makefile/g; $makestring =~ s/#MAKEPATH#/$mkpath/g; $makestring =~ s/#MAKE#/$make_name/g; + $makestring =~ s/#PERL#/$perl_name/g; $makestring =~ s/#PWD#/$pwd/g; # Populate the makefile! @@ -136,6 +137,7 @@ sub run_make_test $answer =~ s/#MAKEFILE#/$makefile/g; $answer =~ s/#MAKEPATH#/$mkpath/g; $answer =~ s/#MAKE#/$make_name/g; + $answer =~ s/#PERL#/$perl_name/g; $answer =~ s/#PWD#/$pwd/g; run_make_with_options($makefile, $options, &get_logfile(0), diff --git a/tests/test_driver.pl b/tests/test_driver.pl index e96c84c..8319d40 100644 --- a/tests/test_driver.pl +++ b/tests/test_driver.pl @@ -54,6 +54,8 @@ $test_passed = 1; # Timeout in seconds. If the test takes longer than this we'll fail it. $test_timeout = 5; +# Path to Perl +$perl_name = $^X; # %makeENV is the cleaned-out environment. %makeENV = (); @@ -236,9 +238,10 @@ sub toplevel sub get_osname { # Set up an initial value. In perl5 we can do it the easy way. - # $osname = defined($^O) ? $^O : ''; + # Find a path to Perl + # See if the filesystem supports long file names with multiple # dots. DOS doesn't. $short_filenames = 0; @@ -273,14 +276,14 @@ sub get_osname eval "chop (\$osname = `sh -c 'uname -nmsr 2>&1'`)"; if ($osname =~ /not found/i) { - $osname = "(something unixy with no uname)"; + $osname = "(something posixy with no uname)"; } elsif ($@ ne "" || $?) { eval "chop (\$osname = `sh -c 'uname -a 2>&1'`)"; if ($@ ne "" || $?) { - $osname = "(something unixy)"; + $osname = "(something posixy)"; } } $vos = 0; |