[gs-commits] rev 10906 - trunk/gs/toolbin/localcluster

marcos at ghostscript.com marcos at ghostscript.com
Wed Mar 10 06:13:23 UTC 2010


Author: marcos
Date: 2010-03-10 06:13:23 +0000 (Wed, 10 Mar 2010)
New Revision: 10906

Modified:
   trunk/gs/toolbin/localcluster/build.pl
   trunk/gs/toolbin/localcluster/run.pl
Log:

Added local modes to build.pl and run.pl in preparation for use as part of the nightly regression.



Modified: trunk/gs/toolbin/localcluster/build.pl
===================================================================
--- trunk/gs/toolbin/localcluster/build.pl	2010-03-10 05:19:59 UTC (rev 10905)
+++ trunk/gs/toolbin/localcluster/build.pl	2010-03-10 06:13:23 UTC (rev 10906)
@@ -21,6 +21,7 @@
 my $highres=0;
 my %products;
 my $bmpcmp=0;
+my $local=0;
 my $filename="";
 
 my $t;
@@ -37,6 +38,8 @@
     $bmpcmp=1;
     $filename=shift;
     $filename.=".txt";
+  } elsif ($t eq "local") {
+    $local=1;
   } else {
     $products{$t}=1;
     die "usage: build.pl [gs] [pcl] [xps] [svg] [mupdf]" if (!exists $allowedProducts{$t});
@@ -87,8 +90,10 @@
 my $svnURLPrivate='file:///var/lib/svn-private/ghostpcl/trunk/';
 my $svnURLPublic ='http://svn.ghostscript.com/ghostscript/';
 
-#$svnURLPrivate='svn+ssh://svn.ghostscript.com/var/lib/svn-private/ghostpcl/trunk/';
-#$svnURLPublic='http://svn.ghostscript.com/ghostscript/';
+if ($local) {
+$svnURLPrivate='svn+ssh://svn.ghostscript.com/var/lib/svn-private/ghostpcl/trunk/';
+$svnURLPublic='http://svn.ghostscript.com/ghostscript/';
+}
 
 my $timeCommand="";
 my $niceCommand="";
@@ -102,6 +107,9 @@
 my $baselineRaster="./baselineraster";
 
 my $gsBin=$baseDirectory."gs/bin/gs";
+if ($local) {
+  $gsBin.=" -I./gs/lib";
+}
 my $pclBin=$baseDirectory."gs/bin/pcl6";
 my $xpsBin=$baseDirectory."gs/bin/gxps";
 my $svgBin=$baseDirectory."gs/bin/gsvg";
@@ -478,7 +486,7 @@
     if ($updateBaseline) {
       $cmd2b.=" -sOutputFile='|gzip -1 -n >$baselineFilename.gz'";
     } elsif ($md5sumOnly) {
-      $cmd2b.=" -sOutputFile='|md5sum  >>$md5Filename'";
+      $cmd2b.=" -sOutputFile='|md5sum >>$md5Filename'";
     } else {
       $cmd2b.=" -sOutputFile='|gzip -1 -n >$outputFilename.gz'";
       #$cmd2b.=" -sOutputFile='|gzip -1 -n | md5sum >>$md5Filename'";
@@ -565,11 +573,11 @@
     my $filename="";
     if (m/^(.+)\.(pdf\.p.mraw\.\d+\.[01]) (\S+) pdfwrite /) {
 #       print "$1 $2 $3 -- pdfwrite\n";
-      ($cmd,$outputFilenames,$filename)=build($3,$1,$2,1,1) if (!$done);
+      ($cmd,$outputFilenames,$filename)=build($3,$1,$2,!$local,1) if (!$done);
 print "$filename\t$cmd\n" if (!$done);
     } elsif (m/^(.+)\.(p.mraw\.\d+\.[01]) (\S+)/) {
 #      print "$1 $2 $3\n";
-      ($cmd,$outputFilenames,$filename)=build($3,$1,$2,1,1) if (!$done);
+      ($cmd,$outputFilenames,$filename)=build($3,$1,$2,!$local,1) if (!$done);
 print "$filename\t$cmd\n" if (!$done);
     } elsif (m/errors:$/ || m/previous clusterpush/i) {
       $done=1;
@@ -587,7 +595,7 @@
     my $cmd="";
     my $outputFilenames="";
     my $filename="";
-    ($cmd,$outputFilenames,$filename)=build($testfiles{$testfile},$testfile,$test,1,0);
+    ($cmd,$outputFilenames,$filename)=build($testfiles{$testfile},$testfile,$test,!$local,0);
     if (exists $quickFiles{$filename}) {
       push @commands,$cmd;
       push @outputFilenames,$outputFilenames;

Modified: trunk/gs/toolbin/localcluster/run.pl
===================================================================
--- trunk/gs/toolbin/localcluster/run.pl	2010-03-10 05:19:59 UTC (rev 10905)
+++ trunk/gs/toolbin/localcluster/run.pl	2010-03-10 06:13:23 UTC (rev 10906)
@@ -9,6 +9,7 @@
 use File::stat;
 
 my $updateTestFiles=1;
+my $dontBuild=1;
 
 my $debug=0;
 my $debug2=0;
@@ -314,8 +315,6 @@
       die "fork() failed";
     } elsif ($pid == 0) {
       exec($s);
-#     mylog "exec() failed";  # these produces a perl warning
-#     die "exec() failed";
       exit(0);
     } else {
       if ($timeout==0) {
@@ -365,7 +364,6 @@
   mylog($message);
 }
 
-
 if (!$local) {
 if (!$user) {
   updateStatus('Updating test files');
@@ -381,7 +379,6 @@
 
   }
 }
-}
 
 $abort=checkAbort;
 if (!$abort) {
@@ -431,6 +428,7 @@
   print "$cmd\n" if ($verbose);
   `$cmd`;
 }
+}
 
 #`cc -o bmpcmp ghostpdl/gs/toolbin/bmpcmp.c`;
 `cc -I$baseDirectory/ghostpdl/gs/libpng -o bmpcmp -DHAVE_LIBPNG $baseDirectory/ghostpdl/gs/toolbin/bmpcmp.c $baseDirectory/ghostpdl/gs/libpng/png.c $baseDirectory/ghostpdl/gs/libpng/pngerror.c $baseDirectory/ghostpdl/gs/libpng/pnggccrd.c $baseDirectory/ghostpdl/gs/libpng/pngget.c $baseDirectory/ghostpdl/gs/libpng/pngmem.c $baseDirectory/ghostpdl/gs/libpng/pngpread.c $baseDirectory/ghostpdl/gs/libpng/pngread.c $baseDirectory/ghostpdl/gs/libpng/pngrio.c $baseDirectory/ghostpdl/gs/libpng/pngrtran.c $baseDirectory/ghostpdl/gs/libpng/pngrutil.c $baseDirectory/ghostpdl/gs/libpng/pngset.c $baseDirectory/ghostpdl/gs/libpng/pngtrans.c $baseDirectory/ghostpdl/gs/libpng/pngvcrd.c $baseDirectory/ghostpdl/gs/libpng/pngwio.c $baseDirectory/ghostpdl/gs/libpng/pngwrite.c $baseDirectory/ghostpdl/gs/libpng/pngwtran.c $baseDirectory/ghostpdl/gs/libpng/pngwutil.c -lm -lz`;
@@ -467,10 +465,13 @@
   unlink "$gpdlSource/makexps.out";
   unlink "$gpdlSource/makesvg.out";
 
+if (!$dontBuild) {
   if (-e "./head/bin/gs") {
     `cp -p ./head/bin/* $gsBin/bin/.`;
   }
+}
 
+if (!$dontBuild) {
   if ($products{'gs'}) {
 
     updateStatus('Building Ghostscript');
@@ -495,9 +496,11 @@
       $compileFail.="gs ";
     }
   }
+}
 } 
 
 $abort=checkAbort;
+if (!$dontBuild) {
 if ($products{'pcl'} && !$abort) {
   updateStatus('Building GhostPCL');
   $cmd="cd $gpdlSource ; nice make pcl-clean ; touch makepcl.out ; rm -f makepcl.out ; nice make pcl \"CC=gcc -m$wordSize\" \"CCLD=gcc -m$wordSize\" >makepcl.out 2>&1 -j 12; echo >>makepcl.out ;  nice make pcl \"CC=gcc -m$wordSize\" \"CCLD=gcc -m$wordSize\" >>makepcl.out 2>&1";
@@ -514,8 +517,10 @@
     $compileFail.="pcl6 ";
   }
 }
+}
 
 $abort=checkAbort;
+if (!$dontBuild) {
 if ($products{'xps'} && !$abort) {
   updateStatus('Building GhostXPS');
   $cmd="cd $gpdlSource ; nice make xps-clean ; touch makexps.out ; rm -f makexps.out ; nice make xps \"CC=gcc -m$wordSize\" \"CCLD=gcc -m$wordSize\" >makexps.out 2>&1 -j 12; echo >>makexps.out ; nice make xps \"CC=gcc -m$wordSize\" \"CCLD=gcc -m$wordSize\" >>makexps.out 2>&1";
@@ -532,8 +537,10 @@
     $compileFail.="gxps ";
   }
 }
+}
 
 $abort=checkAbort;
+if (!$dontBuild) {
 if ($products{'svg'} && !$abort) {
   updateStatus('Building GhostSVG');
   $cmd="cd $gpdlSource ; nice make svg-clean ; touch makesvg.out ; rm -f makesvg.out ; nice make svg \"CC=gcc -m$wordSize\" \"CCLD=gcc -m$wordSize\" >makesvg.out 2>&1 -j 12; echo >>makesvg.out ; nice make svg \"CC=gcc -m$wordSize\" \"CCLD=gcc -m$wordSize\" >>makesvg.out 2>&1";
@@ -550,6 +557,7 @@
     $compileFail.="gsvg ";
   }
 }
+}
 
 unlink "link.icc","wts_plane_0","wts_plane_1","wts_plane_2","wts_plane_3";
 $cmd="cp -p $gpdlSource/link.icc $gpdlSource/wts_plane_0 $gpdlSource/wts_plane_1 $gpdlSource/wts_plane_2 $gpdlSource/wts_plane_3 .";
@@ -981,7 +989,7 @@
       sleep 10;
     }
     mylog "done with uploading $machine.log.gz";
-
+ 
     for (my $retry=0;  $retry<5;  $retry++) {
       mylog "about to upload $machine.out.gz";
       my $a=`scp -q -o ConnectTimeout=30 -i ~/.ssh/cluster_key $machine.out.gz regression\@casper3.ghostscript.com:/home/regression/cluster/$machine.out.gz 2>&1`;



More information about the gs-commits mailing list