[gs-cvs] rev 8684 - trunk/cluster/tti

giles at ghostscript.com giles at ghostscript.com
Wed Apr 30 18:12:20 PDT 2008


Author: giles
Date: 2008-04-30 18:12:15 -0700 (Wed, 30 Apr 2008)
New Revision: 8684

Modified:
   trunk/cluster/tti/reg_dispatch-pcl.py
   trunk/cluster/tti/reg_dispatch.py
   trunk/cluster/tti/regress.py
Log:
Commit the current live code for safe keeping.

* Resubmit jobs after a delay until submission succeeds.
* Clean up old ghostpcl build directories
* Update and include the newer test suites



Modified: trunk/cluster/tti/reg_dispatch-pcl.py
===================================================================
--- trunk/cluster/tti/reg_dispatch-pcl.py	2008-05-01 01:07:53 UTC (rev 8683)
+++ trunk/cluster/tti/reg_dispatch-pcl.py	2008-05-01 01:12:15 UTC (rev 8684)
@@ -157,11 +157,11 @@
 	stdout=None, stderr=None, mpi=True):
   if not resources:
     cluster, nodes = choosecluster()
-    while nodes < 1 or cluster == None:
+    while nodes < 2 or cluster == None:
 	log('clusters busy, waiting for an opening')
 	time.sleep(300)
 	cluster, nodes = choosecluster()
-    if nodes > 1 and cluster == 'red' or cluster == 'green':
+    if nodes > 3 and cluster == 'red' or cluster == 'green':
       # request two cpus per node
       nodes /= 2
       ppn = ':ppn=2'
@@ -197,7 +197,12 @@
   f.write(cmd)
   f.write('\n')
   f.close()
-  os.system('qsub ' + filename)
+  while True:
+    log('qsub ' + filename)
+    S = os.system('qsub ' + filename)
+    log('qsub returned status: ' + repr(S))
+    if S == 0: break
+    time.sleep(100)
 
 def build(workdir=None, clean=False):
   'compile an executable from the current source'
@@ -257,6 +262,8 @@
       report = "regression-r" + rev + ".log"
       runrev(workdir, rev, report)
       os.system("cp " + os.path.join(workdir, "reg_baseline.txt ") + " .")
+      # cleanup old directories to keep disk space reasonable (15 days old)
+      os.system("find . -maxdepth 1 -ctime +15 -name 'ghostpcl-r*' -exec rm -fr '{}' \\;")
     else:
       if doing:
         print "-- nothing to do --"

Modified: trunk/cluster/tti/reg_dispatch.py
===================================================================
--- trunk/cluster/tti/reg_dispatch.py	2008-05-01 01:07:53 UTC (rev 8683)
+++ trunk/cluster/tti/reg_dispatch.py	2008-05-01 01:12:15 UTC (rev 8684)
@@ -139,7 +139,12 @@
   f.write(cmd)
   f.write('\n')
   f.close()
-  os.system('qsub ' + jobname)
+  while True:
+    log('starting: qsub ' + jobname + '\n')
+    S = os.system('qsub ' + jobname)
+    log('qsub retuned status: ' + repr(S) + '\n')
+    if S == 0: break
+    time.sleep(100)
 
 
 # regression setup and reporting
@@ -152,6 +157,14 @@
     return False
   return True
 
+def update_tests():
+  'update the public test suite from svn'
+  svn = os.system("svn up $HOME/tests_public")
+  if svn:
+    log("SVN update of tests_public failed!")
+    return False
+  return True
+
 def build(clean=False):
   'compile an executable from the current source'
   if clean:
@@ -219,7 +232,7 @@
   print "testing gs svn rev <revision> against the default baseline"
 
 def log(msg):
-  print '[' + time.ctime() + '] ' + msg
+  sys.stderr.write('[' + time.ctime() + '] ' + msg)
 
 def runrev(rev=None, report=None):
   if not rev: rev = getrev()
@@ -228,6 +241,7 @@
   start = time.time()
   # remove the report if it exists since we use this to check completion
   if os.path.exists(report): os.unlink(report)
+  if not update_tests(): irclog("SVN public_tests update failed.")
   if not update(rev): irclog("SVN update failed!", rev)
   elif not build(clean=True): irclog("Build failed!", rev)
   else:

Modified: trunk/cluster/tti/regress.py
===================================================================
--- trunk/cluster/tti/regress.py	2008-05-01 01:07:53 UTC (rev 8683)
+++ trunk/cluster/tti/regress.py	2008-05-01 01:12:15 UTC (rev 8684)
@@ -19,10 +19,9 @@
     self.batch = False
     self.update = False
     self.verbose = False
-    self.testpath = os.path.join(os.environ['HOME'], 'tests')
+    self.testpath = os.environ['HOME']
     #self.exe = './language_switch/obj/pspcl6'
     self.exe = './bin/gs -q -I$HOME/fonts'
-    self.test = 'comparefiles'
     self.device = 'ppmraw'
     self.dpi = 600
 
@@ -73,15 +72,25 @@
       # guess appropriate defaults based on the executable
       basename = os.path.basename(self.exe.split()[0])
       if basename.find('pcl') >= 0:
-        self.tests += ['pcl/pcl5cfts/fts.*',
-	'pcl/pcl5efts/fts.*', 
-	'pcl/pcl5ccet/*.BIN']
-      if basename.find('ps') >= 0 or basename.find('gs') >= 0:
-	self.tests += ['ps/ps3cet/*.PS']
-        # run the normal comparefiles suite for now
-        self.tests = ['comparefiles/*.ps', 
-		 'comparefiles/*.pdf', 
-		 'comparfiles/*.ai']
+	# public test suite
+	self.tests += ['tests_public/pcl/*']
+	# Quality Logic suites
+        self.tests += ['tests_private/pcl/pcl5cfts/fts.*',
+	'tests_private/pcl/pcl5efts/fts.*', 
+	'tests_private/pcl/pcl5ccet/*.BIN']
+      if basename.find('pspcl') >= 0 or basename.find('gs') >= 0:
+	# public test suite
+	self.tests += ['tests_public/ps/*', 'tests_public/pdf/*']
+	# the normal comparefiles suite
+        self.tests += ['tests_private/comparefiles/*.ps', 
+		'tests_private/comparefiles/*.pdf', 
+		'tests_private/comparfiles/*.ai']
+	# Quality Logic CED suite
+	self.tests += ['tests_private/ps/ps3cet/*.PS']
+      if basename.find('xps') >= 0:
+	# Quality Logic suites
+	self.tests += ['tests_private/xps/xpsfts-a4/*.xps',
+		'tests_private/xps/atx/*.xps']
 
 # global configuration instance
 conf = Conf()



More information about the gs-cvs mailing list