Changeset 8
- Timestamp:
- Sat Sep 3 13:04:36 2005
- Files:
-
- trunk/buildtests/runtests.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/buildtests/runtests.py
r2 r8 1 1 import os, sys, glob, string 2 import shutil 2 3 try: 3 4 here=os.path.dirname(__file__) … … 7 8 if sys.platform[:3] == 'win': 8 9 if string.find(PYTHON, ' ') > -1: 9 PYTHON= "%s"% PYTHON10 PYTHON='"%s"' % PYTHON 9 10 10 def empty(dir):11 for fnm in os.listdir(dir):12 path = os.path.join(dir, fnm)13 if os.path.isdir(path):14 empty(path)15 try:16 os.rmdir(path)17 except:18 pass19 else:20 try:21 os.remove(path)22 except:23 pass24 25 11 def clean(): 26 12 distdirs = glob.glob(os.path.join(here, 'disttest*')) 27 13 for dir in distdirs: 28 14 try: 29 empty(dir) 30 os.rmdir(dir) 15 shutil.rmtree(dir) 31 16 except OSError, e: 32 17 print e … … 35 20 for dir in builddirs: 36 21 try: 37 empty(dir) 38 os.rmdir(dir) 22 shutil.rmtree(dir) 39 23 except OSError, e: 40 24 print e … … 45 29 except OSError, e: 46 30 print e 31 47 32 def runtests(): 48 33 specs = glob.glob(os.path.join(here, 'test*.spec'))
