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

regression at ghostscript.com regression at ghostscript.com
Mon Mar 15 06:34:34 UTC 2010


Author: regression
Date: 2010-03-15 06:34:34 +0000 (Mon, 15 Mar 2010)
New Revision: 10923

Modified:
   trunk/gs/toolbin/localcluster/build.pl
   trunk/gs/toolbin/localcluster/clustermaster.pl
   trunk/gs/toolbin/localcluster/readlog.pl
   trunk/gs/toolbin/localcluster/run.pl
Log:
Added support for mupdf testing in local regression suite.


Modified: trunk/gs/toolbin/localcluster/build.pl
===================================================================
--- trunk/gs/toolbin/localcluster/build.pl	2010-03-15 06:31:25 UTC (rev 10922)
+++ trunk/gs/toolbin/localcluster/build.pl	2010-03-15 06:34:34 UTC (rev 10923)
@@ -247,8 +247,8 @@
     ],
   'mupdf' => [
     "ppmraw.72.0",
-    "ppmraw.300.0"
-#   "ppmraw.300.1",
+    "ppmraw.300.0",
+    "ppmraw.300.1"
 #   "psdcmyk.72.0",
 ##"psdcmyk.300.0",
 ##"psdcmyk.300.1",
@@ -446,7 +446,7 @@
       $cmd2c =~ s|$temp|$baselineRaster|;
       $cmd.=" ; $timeCommand $cmd2a -sOutputFile='|gzip -1 -n >$baselineFilename.gz' $cmd2c >>$logFilename 2>&1";
       $cmd.=" ; bash -c \"./bmpcmp <(gunzip -c $outputFilename.gz) <(gunzip -c $baselineFilename.gz) $bmpcmpFilename\""; # ; gzip $bmpcmpFilename.* ";
-      $cmd.=" ; scp -q -o ConnectTimeout=30 -i ~/.ssh/cluster_key $bmpcmpFilename.* regression\@casper3.ghostscript.com:/home/regression/cluster/bmpcmp/.";
+      $cmd.=" ; bash -c \"for (( c=1; c<=5; c++ )); do scp -q -o ConnectTimeout=30 -i ~/.ssh/cluster_key $bmpcmpFilename.* regression\@casper3.ghostscript.com:/home/regression/cluster/bmpcmp/. ; t=$?; if (( \\\$t == 0 )); then break; fi; echo 'scp retry \\\$c' ; done \"";
 #     $cmd.=" ; scp -q -o ConnectTimeout=30 -i ~/.ssh/cluster_key $logFilename regression\@casper3.ghostscript.com:/home/regression/cluster/bmpcmp/.";
     } else {
       $cmd.=" ; echo \"$cmd2a $cmd2b $cmd2c\" >>$logFilename ";
@@ -487,6 +487,14 @@
     }
 
     if ($product eq 'mupdf') {
+      $cmd2b.=" -r$a[1]";
+      $cmd2b.=" -b20"    if ($a[2]==1);
+      $cmd2b.=" -o $outputFilename.%04d";
+      $cmd2b.=" $inputFilename  ";
+      $cmd.=" ; echo \"$cmd2a $cmd2b $cmd2c\" >>$logFilename ";
+      $cmd.=" ; $timeCommand $cmd2a $cmd2b $cmd2c >>$logFilename 2>&1";
+      $cmd.=" ; cat $outputFilename.???? >$outputFilename ";
+      $cmd.=" ; md5sum $outputFilename >>$md5Filename";
     } else {
     if ($updateBaseline) {
       $cmd2b.=" -sOutputFile='|gzip -1 -n >$baselineFilename.gz'";
@@ -521,7 +529,7 @@
       $cmd2a =~ s|/gs/|/head/|;
       $cmd.=" ; $timeCommand $cmd2a -sOutputFile='|gzip -1 -n >$baselineFilename.gz' $cmd2c >>$logFilename 2>&1";
       $cmd.=" ; bash -c \"./bmpcmp <(gunzip -c $outputFilename.gz) <(gunzip -c $baselineFilename.gz) $bmpcmpFilename\""; # ; gzip $bmpcmpFilename.* ";
-      $cmd.=" ; scp -q -o ConnectTimeout=30 -i ~/.ssh/cluster_key $bmpcmpFilename.* regression\@casper3.ghostscript.com:/home/regression/cluster/bmpcmp/.";
+      $cmd.=" ; bash -c \"for (( c=1; c<=5; c++ )); do scp -q -o ConnectTimeout=30 -i ~/.ssh/cluster_key $bmpcmpFilename.* regression\@casper3.ghostscript.com:/home/regression/cluster/bmpcmp/. ; t=$?; if (( \\\$t == 0 )); then break; fi; echo 'scp retry \\\$c' ; done \"";
 #     $cmd.=" ; scp -q -o ConnectTimeout=30 -i ~/.ssh/cluster_key $logFilename regression\@casper3.ghostscript.com:/home/regression/cluster/bmpcmp/.";
     } else {
       $cmd.=" ; echo \"$cmd2a $cmd2b $cmd2c\" >>$logFilename ";

Modified: trunk/gs/toolbin/localcluster/clustermaster.pl
===================================================================
--- trunk/gs/toolbin/localcluster/clustermaster.pl	2010-03-15 06:31:25 UTC (rev 10922)
+++ trunk/gs/toolbin/localcluster/clustermaster.pl	2010-03-15 06:34:34 UTC (rev 10923)
@@ -564,13 +564,13 @@
   $product="gs pcl xps";
   $footer.="icc_work regression: $rev\n\nProducts tested: $product\n\n";
 } elsif ($regression=~/mupdf/) {
-  mylog "found mupdf entry in queue.lst, not yet handled, removing.\n";
+  mylog "found mupdf entry in queue.lst\n";
   my $cmd="touch mupdf.tar.gz ; rm mupdf.tar.gz ; tar cvf mupdf.tar --exclude=_darcs mupdf ; gzip mupdf.tar";
   `$cmd`;
   $cmd="cd mupdf ; darcs changes --count";
   $rev=`$cmd`;
   chomp $rev;
-# $mupdfRegression=1;
+$mupdfRegression=1;
   $product="mupdf";
 } elsif ($regression=~/updatebaseline/) {
   mylog "found updatebaseline in regression: $regression\n";
@@ -719,7 +719,7 @@
       } elsif ($icc_workRegression) {
         print F "svn-icc_work\t$rev\t$product";
       } elsif ($mupdfRegression) {
-        print F "mupdf\t$rev\t$product";
+        print F "mupdf\t$rev";
       } elsif ($updateBaseline) {
         print F "svn\thead\t$product";
       } elsif ($bmpcmp) {
@@ -756,6 +756,11 @@
       }
     }
 
+    if ($userRegression ne "") {
+      my $cmd="diff -w -c -r ./ghostpdl ./users/$userName/ghostpdl | grep -v \"Only in\" > $userName.diff";
+      `$cmd`;
+    }
+
     use IO::Socket;
     use Net::hostent;
     my $PORT = 9000;
@@ -1008,6 +1013,7 @@
   checkPID();
   $userName="email" if ($normalRegression);
   $userName="email" if ($icc_workRegression);
+  $userName="email" if ($mupdfRegression);
 
   if (!$bmpcmp) {
     my @t=split '\n',$footer;
@@ -1082,6 +1088,26 @@
       `cp -p icc_work_previous.tab archive/icc_work-$rev/icc_work_previous.tab`;
       `cp -p icc_work_current.tab archive/icc_work-$rev.tab`;
     } elsif ($mupdfRegression) {
+      `mv mupdf_previous.tab mupdf_previous2.tab`;
+      `mv mupdf_current.tab mupdf_previous.tab`;
+      `cat $tabs | sort >mupdf_current.tab`;
+      `rm $tabs`;
+
+      checkPID();
+mylog "now running ./compare.pl mupdf_current.tab mupdf_previous.tab $elapsedTime $machineCount false \"$product\"\n";
+      `./compare.pl mupdf_current.tab mupdf_previous.tab $elapsedTime $machineCount false \"$product\" >>email.txt`;
+
+      checkPID();
+      `touch archive/mupdf-$rev`;
+      `rm -fr archive/mupdf-$rev`;
+      `mkdir archive/mupdf-$rev`;
+      `mv $logs archive/mupdf-$rev/.`;
+      `gzip archive/mupdf-$rev/*log`;
+      `cp -p email.txt archive/mupdf-$rev/.`;
+      `cp -p mupdf_current.tab archive/mupdf-$rev/mupdf_current.tab`;
+      `cp -p mupdf_previous.tab archive/mupdf-$rev/mupdf_previous.tab`;
+      `cp -p mupdf_current.tab archive/mupdf-$rev.tab`;
+
     } elsif ($updateBaseline) {
     } elsif ($bmpcmp) {
     } else {
@@ -1174,9 +1200,13 @@
   } elsif ($bmpcmp) {
     if (exists $emails{$userName}) {
       `mail $emails{$userName} -s \"bmpcmp finished\" <$userName.txt`;
-      `mail marcos.woehrmann\@artifex.com -s \"bmpcmp finished\" <$userName.txt`;
+      `mail marcos.woehrmann\@artifex.com -s \"bmpcmp finished\" <bmpcmpFinished.txt`;
     }
   } elsif ($userRegression) {
+    `echo >>$userName.txt`;
+    `echo "Source differences from trunk:" >>$userName.txt`;
+    `echo >>$userName.txt`;
+    `head -1000 $userName.diff >>$userName.txt`;
     if (exists $emails{$userName}) {
 #     `mail -a \"From: marcos.woehrmann\@artifex.com\" marcos.woehrmann\@artifex.com -s \"$userRegression regression\" <$userName.txt`;
 #     `mail -a \"From: marcos.woehrmann\@artifex.com\" $emails{$userName} -s \"$userRegression \`cat revision.gs\`\" <$userName.txt`;

Modified: trunk/gs/toolbin/localcluster/readlog.pl
===================================================================
--- trunk/gs/toolbin/localcluster/readlog.pl	2010-03-15 06:31:25 UTC (rev 10922)
+++ trunk/gs/toolbin/localcluster/readlog.pl	2010-03-15 06:34:34 UTC (rev 10923)
@@ -91,7 +91,7 @@
     }
 #   print "time=$t1 $t2 $t3\n";
   }
-  if (m/^([0-9a-f]{32})$/ || m/^([0-9a-f]{32})  -/) {
+  if (m/^([0-9a-f]{32})$/ || m/^([0-9a-f]{32})  -/ || m/^([0-9a-f]{32})  \.\/temp/ || m/^MD5 .+ = ([0-9a-f]{32})$/) {
     $md5sum=$1;
 #   print "md5sum=$md5sum\n";
     $results{$file}{"error"}=$error;

Modified: trunk/gs/toolbin/localcluster/run.pl
===================================================================
--- trunk/gs/toolbin/localcluster/run.pl	2010-03-15 06:31:25 UTC (rev 10922)
+++ trunk/gs/toolbin/localcluster/run.pl	2010-03-15 06:34:34 UTC (rev 10923)
@@ -57,6 +57,7 @@
 my $user;
 my $revs;
 my $icc_work;
+my $mupdf;
 #my $product;
 my @commands;
 
@@ -134,6 +135,12 @@
     if ($a[0] eq "svn") {
       $revs=$a[1];
       $products=$a[2];
+    } elsif ($a[0] eq "mupdf") {
+      $mupdf=1;
+      $products="mupdf";
+$maxCount=8;
+$maxTimeoutPercentage=5.0;
+$timeOut=600;
     } elsif ($a[0] eq "svn-icc_work") {
       $icc_work=$a[1];
       $products=$a[2];
@@ -158,8 +165,9 @@
 mylog "user products=$products user=$user\n" if ($user);
 mylog "svn products=$products rev=$revs\n" if ($revs);
 mylog "icc_work products=$products rev=$icc_work\n" if ($icc_work);
+mylog "mupdf\n" if ($mupdf);
 
-my $host="casper3.ghostscript.com";
+my $host="casper.ghostscript.com";
 
 my $desiredRev;
 
@@ -399,6 +407,18 @@
 
     $gpdlSource=$baseDirectory."/users/$user/ghostpdl";
     $gsSource=$gpdlSource."/gs";
+  } elsif ($mupdf) {
+    updateStatus('Fetching mupdf.tar.gz');
+    `touch mupdf ; rm -fr mupdf; touch mupdf.tar.gz ; rm mupdf.tar.gz`;
+    for (my $retry=0;  $retry<5;  $retry++) {
+      my $a=`scp -q -o ConnectTimeout=30 -i ~/.ssh/cluster_key regression\@casper3.ghostscript.com:/home/regression/cluster/mupdf.tar.gz .`;
+      last if ($?==0);
+      my $b=$?;
+      chomp $a;
+      mylog "mupdf_retry=$retry;  a=$a;  \$?=$b";
+      sleep 10;
+    }
+ 
   } elsif ($icc_work) {
 
     if (!-e $icc_workGsSource) {
@@ -475,6 +495,28 @@
 }
 
 if (!$dontBuild) {
+  if ($mupdf) {
+    updateStatus('Building mupdf');
+    $cmd="touch mupdf.tar ; rm mupdf.tar ; gunzip mupdf.tar.gz ; tar xf mupdf.tar";
+    print "$cmd\n" if ($verbose);
+    `$cmd`;
+    if (-e "./Jamrules") {
+      $cmd="cp -p Jamrules mupdf/.";
+      print "$cmd\n" if ($verbose);
+      `$cmd`;
+    }
+    $cmd="cd mupdf ; jam >makemupdf.out";
+    print "$cmd\n" if ($verbose);
+    `$cmd`;
+      
+
+    $cmd="touch gs/bin/mupdf ; rm gs/bin/mupdf ; cp -p mupdf/build/*/pdfdraw gs/bin/.";
+    print "$cmd\n" if ($verbose);
+    `$cmd`;
+  }
+}
+
+if (!$dontBuild) {
   if ($products{'gs'}) {
 
     updateStatus('Building Ghostscript');



More information about the gs-commits mailing list