]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 416047 รข\80\93 Test 1 fails in compiling Bugzilla::Install::CPAN and install-module...
authorwurblzap%gmail.com <>
Tue, 18 Mar 2008 22:30:02 +0000 (22:30 +0000)
committerwurblzap%gmail.com <>
Tue, 18 Mar 2008 22:30:02 +0000 (22:30 +0000)
Patch by Marc Schumann <wurblzap@gmail.com>;
r=LpSolit; a=LpSolit

t/001compile.t

index fdbe875e374d1acaafbe436706af76d8efc3ea29..78fc6a6842a32d205a5c577385310dabad8c8e18 100644 (file)
@@ -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;
     }