utils/cvs_check.py
author rgbecker
Wed, 25 Oct 2000 08:57:46 +0000
changeset 494 54257447cfe9
parent 225 1f58b00cf30e
permissions -rw-r--r--
Changed to indirect copyright
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
     1
#!/bin/env python
494
54257447cfe9 Changed to indirect copyright
rgbecker
parents: 225
diff changeset
     2
#copyright ReportLab Inc. 2000
54257447cfe9 Changed to indirect copyright
rgbecker
parents: 225
diff changeset
     3
#see license.txt for license details
54257447cfe9 Changed to indirect copyright
rgbecker
parents: 225
diff changeset
     4
#history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/utils/cvs_check.py?cvsroot=reportlab
54257447cfe9 Changed to indirect copyright
rgbecker
parents: 225
diff changeset
     5
#$Header: /tmp/reportlab/utils/cvs_check.py,v 1.7 2000/10/25 08:57:46 rgbecker Exp $
54257447cfe9 Changed to indirect copyright
rgbecker
parents: 225
diff changeset
     6
__version__=''' $Id: cvs_check.py,v 1.7 2000/10/25 08:57:46 rgbecker Exp $ '''
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
     7
'''
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
     8
script for testing ReportLab anonymous cvs download and test
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
     9
'''
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    10
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    11
_globals=globals().copy()			#make a copy of out globals
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    12
_globals['__name__'] = "__main__"	#for passing to execfile
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    13
14
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
    14
import os, sys, string, traceback, re
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    15
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    16
#this is what we need to write to .cvspass for anonymous access
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    17
_cvspass=':pserver:anonymous@cvs.reportlab.sourceforge.net:/cvsroot/reportlab A'
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    18
_tmp=os.path.normcase(os.path.normpath('/tmp'))
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    19
_testdir=os.path.normcase(os.path.normpath('/tmp/reportlab_test'))
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    20
_ecount = 0
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    21
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    22
def get_path():
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    23
	for i in os.environ.keys():
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    24
		if string.upper(i)=='PATH':
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    25
			return string.split(os.environ[i],os.pathsep)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    26
	return []
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    27
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    28
def find_exe(exe):
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    29
	if sys.platform=='win32':
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    30
		exe='%s.exe'%exe
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    31
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    32
	for p in get_path():
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    33
		f = os.path.join(p,exe)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    34
		if os.path.isfile(f): return f
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    35
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    36
	return None
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    37
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    38
def recursive_rmdir(d):
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    39
	'destroy directory d'
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    40
	if os.path.isdir(d):
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    41
		for p in os.listdir(d):
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    42
			fn = os.path.join(d,p)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    43
			if os.path.isfile(fn):
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    44
				os.remove(fn)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    45
			else:
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    46
				recursive_rmdir(fn)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    47
		os.rmdir(d)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    48
11
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    49
def safe_remove(p):
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    50
	if os.path.isfile(p): os.remove(p)
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    51
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    52
def do_exec(cmd, cmdname):
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    53
	i=os.popen(cmd,'r')
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    54
	print i.read()
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    55
	i = i.close()
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    56
	if i is not None:
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    57
		print 'there was an error executing '+cmdname
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    58
		sys.exit(1)
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    59
9
df516dfce7a7 Fix call of cvs_checkout
rgbecker
parents: 8
diff changeset
    60
def cvs_checkout(d):
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
    61
	recursive_rmdir(d)
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    62
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    63
	cvs = find_exe('cvs')
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    64
	if cvs is None:
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    65
		print "Can't find cvs anywhere on the path"
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    66
		os.exit(1)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    67
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    68
	have_tmp = os.path.isdir(_tmp)
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
    69
	os.makedirs(d)
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
    70
	os.environ['HOME']=d
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    71
	os.environ['CVSROOT']=':pserver:anonymous@cvs.reportlab.sourceforge.net:/cvsroot/reportlab'
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
    72
	os.chdir(d)
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
    73
	f = open(os.path.join(d,'.cvspass'),'w')
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    74
	f.write(_cvspass+'\n')
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
    75
	f.close()
11
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    76
	do_exec(cvs+' -z7 -d:pserver:anonymous@cvs.reportlab.sourceforge.net:/cvsroot/reportlab co reportlab',
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    77
		'the download phase')
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    78
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    79
def do_zip(d):
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    80
	'create .tgz and .zip file archives of d/reportlab'
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    81
	def find_src_files(L,d,N):
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    82
		if os.path.basename(d)=='CVS': return	#ignore all CVS
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    83
		for n in N:
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    84
			fn = os.path.normcase(os.path.normpath(os.path.join(d,n)))
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    85
			if os.path.isfile(fn): L.append(fn)
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    86
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    87
	os.chdir(d)
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    88
	src_files = []
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    89
	fn = os.path.normcase(os.path.normpath('reportlab'))
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    90
	os.path.walk(fn,find_src_files,src_files)
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    91
	tarfile = 'replab'
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    92
	safe_remove(tarfile)
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    93
	safe_remove('replab.tgz')
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    94
	zipfile = 'replab.zip'
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    95
	safe_remove(zipfile)
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    96
	if src_files==[]: return
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    97
	src_files = string.replace(string.join(src_files),'\\','/')
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    98
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
    99
	tar = find_exe('tar')
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   100
	do_exec('%s cvf %s %s' % (tar, tarfile, src_files), 'tar creation')
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   101
	do_exec('%s -S .tgz %s' % (find_exe('gzip'), tarfile), 'gzip')
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   102
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   103
	zip = find_exe('zip')
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   104
	do_exec('%s -u %s %s' % (zip, zipfile, src_files), 'zip creation' )
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   105
14
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   106
def find_py_files(d):
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   107
	def _py_files(L,d,N):
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   108
 		for n in filter(lambda x: x[-3:]=='.py', N):
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   109
			fn = os.path.normcase(os.path.normpath(os.path.join(d,n)))
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   110
			if os.path.isfile(fn): L.append(fn)
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   111
	L=[]
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   112
	os.path.walk(d,_py_files,L)
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   113
	return L
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   114
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   115
def find_executable_py_files(d):
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   116
	prog=re.compile('^( |\t)*if( |\t)+__name__( |\t)*==( |\t)*(\'|\")__main__(\'|\")( |\t)*:')
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   117
	L=[]
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   118
	for n in find_py_files(d):
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   119
		for l in open(n,'r').readlines():
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   120
			if prog.match(l) is not None:
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   121
				L.append(n)
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   122
				break
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   123
	return L
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   124
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   125
def do_tests(d):
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   126
	global _ecount
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   127
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   128
	def find_test_files(L,d,N):
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   129
		n = os.path.basename(d)
14
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   130
		if n!='test' : return
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   131
		for n in filter(lambda n: n[-3:]=='.py',N):
11
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   132
			fn = os.path.normcase(os.path.normpath(os.path.join(d,n)))
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   133
			if os.path.isfile(fn): L.append(fn)
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   134
14
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   135
	fn = os.path.normcase(os.path.normpath(os.path.join(d,'reportlab')))		
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   136
	d = os.path.normcase(os.path.normpath(d))
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   137
	if d not in sys.path: sys.path.insert(0,d)
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   138
	test_files = []
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   139
	os.path.walk(fn,find_test_files,test_files)
14
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   140
	for t in find_executable_py_files(fn):
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   141
		if t not in test_files:
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   142
			test_files.append(t)
37121e29cbd5 Changes to test search
rgbecker
parents: 11
diff changeset
   143
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   144
	for t in test_files:
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   145
		fn =os.path.normcase(os.path.normpath(os.path.join(d,t)))
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   146
		bn = os.path.basename(fn)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   147
		print '##### Test %s starting' % bn
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   148
		try:
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   149
			os.chdir(os.path.dirname(fn))
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   150
			execfile(fn,_globals.copy())
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   151
			print '##### Test %s finished ok' % bn
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   152
		except:
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   153
			traceback.print_exc(None,sys.stdout)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   154
			_ecount = _ecount + 1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   155
225
1f58b00cf30e Changes related to removal of SimpleFlowDocument
rgbecker
parents: 14
diff changeset
   156
if __name__=='__main__': #NORUNTESTS
11
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   157
	legal_options = ['-dir', '-help','-nocvs','-notest','-clean', '-fclean', '-zip' ]
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   158
	def usage(code=0, msg=''):
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   159
		f = code and sys.stderr or sys.stdout
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   160
		if msg is not None: f.write(msg+'\n')
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   161
		f.write(\
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   162
'''
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   163
Usage
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   164
	python reportlab_cvs_check.py [options]
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   165
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   166
	option
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   167
	-help		print this message and exit
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   168
	-dir path	specify directory to test implies -nocvs
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   169
	-nocvs		don't do cvs checkout
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   170
	-notest 	don't carry out tests
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   171
	-clean		cleanup if no errors
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   172
	-fclean		cleanup even if some errors occur
11
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   173
	-zip		create tgz and zip files after cvs stage
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   174
''')
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   175
		sys.exit(code)
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   176
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   177
	dir=_testdir
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   178
	dflag = 0
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   179
	options = sys.argv[1:]
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   180
	sys.argv[1:]=[]
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   181
	for k in options:
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   182
		if k not in legal_options:
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   183
			if dflag:
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   184
				dir = k
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   185
				dflag = 0
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   186
			else:
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   187
				usage(code=1,msg="unknown option '%s'" % k)
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   188
		else:
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   189
			dflag = k=='-dir'
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   190
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   191
	if '-help' in options: usage()
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   192
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   193
	if '-nocvs' not in options and dir is _testdir:
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   194
		cvs_checkout(dir)
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   195
11
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   196
	if '-zip' in options:
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   197
		do_zip(dir)
7d3d8475b000 Fixes for package reportlab
rgbecker
parents: 9
diff changeset
   198
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   199
	if '-notest' not in options:
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   200
		do_tests(dir)
1
50b2f7b61cd3 Initial revision
rgbecker
parents:
diff changeset
   201
8
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   202
	if dir is _testdir and ((_ecount==0 and '-clean' in options) or '-fclean' in options):
9d5b24d2a4ce License files added
rgbecker
parents: 1
diff changeset
   203
		recursive_rmdir(dir)