From: wurblzap%gmail.com <> Date: Tue, 18 Mar 2008 22:30:02 +0000 (+0000) Subject: Bug 416047 – Test 1 fails in compiling Bugzilla::Install::CPAN and install-module... X-Git-Tag: bugzilla-3.1.3~275 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=849b1c1357ca06a56ff9cd82adf67fd67c8878cb;p=thirdparty%2Fbugzilla.git Bug 416047 – Test 1 fails in compiling Bugzilla::Install::CPAN and install-module.pl when Cygwin is installed. Patch by Marc Schumann ; r=LpSolit; a=LpSolit --- diff --git a/t/001compile.t b/t/001compile.t index fdbe875e37..78fc6a6842 100644 --- a/t/001compile.t +++ b/t/001compile.t @@ -91,13 +91,23 @@ foreach my $file (@testitems) { my $loginfo=`$command`; #print '@@'.$loginfo.'##'; if ($loginfo =~ /syntax ok$/im) { + # Special hack due to CPAN.pm on Windows with Cygwin installed throwing + # strings of the form "Set up gcc environment - 3.4.4 (cygming special, + # gdc 0.12, using dmd 0.125)". See bug 416047 for details. + if ($^O =~ /MSWin32/i + && grep($_ eq $file, 'install-module.pl', 'Bugzilla/Install/CPAN.pm')) + { + $loginfo =~ s/^Set up gcc environment.*?\n//; + } if ($loginfo ne "$file syntax OK\n") { ok(0,$file." --WARNING"); print $fh $loginfo; - } else { + } + else { ok(1,$file); } - } else { + } + else { ok(0,$file." --ERROR"); print $fh $loginfo; }