Skip Menu |
 

This queue is for tickets about the Test-Smoke CPAN distribution.

Report information
The Basics
Id: 54542
Status: new
Priority: 0/
Queue: Test-Smoke

People
Owner: Nobody in particular
Requestors: shay [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.42
Fixed in: (no value)



Subject: [PATCH] Fix ccversion detection for MSVC
Download (untitled) / with headers
text/plain 448b
Test-Smoke-1.42 fails to detect the ccversion for my MSVC++ installations, which all reside under "C:\Program Files\...". It tries to run a command like "$map{ $CC }->{ccbin}" --version 2>&1 but the 'ccbin' there comes from whereis() and is already double-quoted if it contains spaces, which causes an error like '""C:\Program' is not recognized as an internal or external command, operable program or batch file. The attached patch fixes this.
Subject: ccversion.patch
Download ccversion.patch
text/x-diff 1.5k
diff -ruN Test-Smoke-1.42.orig/configsmoke.pl Test-Smoke-1.42/configsmoke.pl --- Test-Smoke-1.42.orig/configsmoke.pl 2009-08-10 11:03:32.000000000 +0100 +++ Test-Smoke-1.42/configsmoke.pl 2010-02-12 10:41:52.233602100 +0000 @@ -2192,7 +2192,7 @@ my $CC = 'MSVC'; if ( $map{ $CC }->{ccbin} = whereis( $map{ $CC }->{ccname} ) ) { # No, cl doesn't support --version (One can but try) - my $output =`"$map{ $CC }->{ccbin}" --version 2>&1`; + my $output =`$map{ $CC }->{ccbin} --version 2>&1`; my $ccvers = $output =~ /^.*Version\s+([\d.]+)/ ? $1 : '?'; $map{ $CC }->{ccversarg} = "ccversion=$ccvers"; my $mainvers = $ccvers =~ /^(\d+)/ ? $1 : 1; @@ -2202,7 +2202,7 @@ $CC = 'BCC'; if ( $map{ $CC }->{ccbin} = whereis( $map{ $CC }->{ccname} ) ) { # No, bcc32 doesn't support --version (One can but try) - my $output = `"$map{ $CC }->{ccbin}" --version 2>&1`; + my $output = `$map{ $CC }->{ccbin} --version 2>&1`; my $ccvers = $output =~ /([\d.]+)/ ? $1 : '?'; $map{ $CC }->{ccversarg} = "ccversion=$ccvers"; $map{ $CC }->{CCTYPE} = 'BORLAND'; @@ -2213,7 +2213,7 @@ local *STDERR; open STDERR, ">&STDOUT"; #do we need an error? select( (select( STDERR ), $|++ )[0] ); - my $output = `"$map{ $CC }->{ccbin}" --version`; + my $output = `$map{ $CC }->{ccbin} --version`; my $ccvers = $output =~ /(\d+.*)/ ? $1 : '?'; $ccvers =~ s/\s+copyright.*//i; $map{ $CC }->{ccversarg} = "gccversion=$ccvers";


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.