# HG changeset patch
# User Mike Hansen <mhansen@gmail.com>
# Date 1235754620 28800
# Node ID aafa70ce3e45ba88cbad86629d635d651c09e2c3
# Parent  f54a3b5d47f8fd403c28c22c1ce3fa7c0b22513a
[mq]: test-3.4.patch

diff -r f54a3b5d47f8 -r aafa70ce3e45 sage-ptest
--- a/sage-ptest	Fri Feb 27 07:15:24 2009 -0800
+++ b/sage-ptest	Fri Feb 27 09:10:20 2009 -0800
@@ -16,14 +16,11 @@
 except:
     numglobaliteration = 1
 
-try:
-    checktex = int(os.environ['SAGE_TEST_TEX'])
-except:
-    checktex = 0
+SAGE_ROOT = os.environ['SAGE_ROOT']
+BUILD_DIR = os.path.realpath(SAGE_ROOT + '/devel/sage/build')
 
 print 'Global iterations: ' + str(numglobaliteration)
 print 'File iterations: ' + str(numiteration)
-print 'TeX files: ' + str(checktex)
 
 abort = False
 
@@ -210,8 +207,14 @@
             else:
                 files.append(FF)
             continue
+
         curdir = os.getcwd()
         walkdir = os.path.join(CUR,FF)
+
+        #Ignore the .build directory
+        if os.path.realpath(walkdir).startswith(BUILD_DIR):
+            continue
+
         for root, dirs, lfiles in os.walk(walkdir):
             for F in lfiles:
                 base, ext = os.path.splitext(F)
@@ -228,10 +231,6 @@
             for D in dirs:
                 if '#' in D or '/notes' in D:
                     dirs.remove(D)
-    if checktex:
-        files.insert(0,SAGE_ROOT+"/devel/doc/tut/tut.tex")
-        files.insert(0,SAGE_ROOT+"/devel/doc/prog/prog.tex")
-        files.insert(0,SAGE_ROOT+"/devel/doc/const/const.tex")
     filemutex.release()
     return 0
 
