From: <md...@us...> - 2008-02-19 21:32:51
|
Revision: 4982 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4982&view=rev Author: mdboom Date: 2008-02-19 13:32:48 -0800 (Tue, 19 Feb 2008) Log Message: ----------- Add valgrind memcheck support to backend_driver.py Modified Paths: -------------- trunk/matplotlib/examples/backend_driver.py Modified: trunk/matplotlib/examples/backend_driver.py =================================================================== --- trunk/matplotlib/examples/backend_driver.py 2008-02-19 19:41:53 UTC (rev 4981) +++ trunk/matplotlib/examples/backend_driver.py 2008-02-19 21:32:48 UTC (rev 4982) @@ -147,6 +147,7 @@ continue print ('\tdriving %-40s' % (fname)), + sys.stdout.flush() basename, ext = os.path.splitext(fname) outfile = os.path.join(path,basename) tmpfile_name = '_tmp_%s.py' % basename @@ -180,7 +181,8 @@ tmpfile.close() start_time = time.time() - run(python + [tmpfile_name, switchstring]) + program = [x % {'name': basename} for x in python] + run(program + [tmpfile_name, switchstring]) end_time = time.time() print (end_time - start_time) #os.system('%s %s %s' % (python, tmpfile_name, switchstring)) @@ -192,6 +194,10 @@ if '--coverage' in sys.argv: python = ['coverage.py', '-x'] sys.argv.remove('--coverage') + elif '--valgrind' in sys.argv: + python = ['valgrind', '--tool=memcheck', '--leak-check=yes', + '--log-file=%(name)s', 'python'] + sys.argv.remove('--valgrind') elif sys.platform == 'win32': python = [r'c:\Python24\python.exe'] else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |