* tests/run_make_tests.pl (subst_make_string): Force use of /

On Windows the path to the helper tool will contain '\': this will
fail if recipes are run with a POSIX shell.  Convert '\' to '/'
on Windows.  While here, escape any spaces in the path as well.
This commit is contained in:
Paul Smith 2019-12-16 16:18:58 -05:00
parent 3822f77c1d
commit acbef3f612

View file

@ -220,7 +220,11 @@ sub valid_option
# [2] (string): Answer we should get back.
# [3] (integer): Exit code we expect. A missing code means 0 (success)
$makefile = undef;
$old_makefile = undef;
$mkpath = undef;
$make_name = undef;
$helptool = undef;
sub subst_make_string
{
@ -230,9 +234,8 @@ sub subst_make_string
s/#MAKE#/$make_name/g;
s/#PERL#/$perl_name/g;
s/#PWD#/$cwdpath/g;
my $help = File::Spec->catfile($fqsrcdir, 'tests', 'thelp.pl');
# If we're using a shell
s/#HELPER#/$perl_name $help/g;
s/#HELPER#/$perl_name $helptool/g;
return $_;
}
@ -615,6 +618,14 @@ sub set_more_defaults
$fqsrcdir = File::Spec->rel2abs($srcdir);
$fqblddir = File::Spec->rel2abs($blddir);
# Find the helper tool
$helptool = File::Spec->catfile($fqsrcdir, 'tests', 'thelp.pl');
# It's difficult to quote this properly in all the places it's used so
# ensure it doesn't need to be quoted.
$helptool =~ s,\\,/,g if $port_type = 'W32';
$helptool =~ s, ,\\ ,g;
# Get Purify log info--if any.
if (exists $ENV{PURIFYOPTIONS}