[pypy-svn] r40227 - pypy/dist/pypy/translator/benchmark
arigo at codespeak.net
arigo at codespeak.net
Sun Mar 11 16:13:41 CET 2007
Author: arigo
Date: Sun Mar 11 16:13:40 2007
New Revision: 40227
Removed:
pypy/dist/pypy/translator/benchmark/gadtest.py
Modified:
pypy/dist/pypy/translator/benchmark/ (props changed)
pypy/dist/pypy/translator/benchmark/benchmarks.py
Log:
Add gadfly as an "official" benchmark.
Modified: pypy/dist/pypy/translator/benchmark/benchmarks.py
==============================================================================
--- pypy/dist/pypy/translator/benchmark/benchmarks.py (original)
+++ pypy/dist/pypy/translator/benchmark/benchmarks.py Sun Mar 11 16:13:40 2007
@@ -131,6 +131,30 @@
'http://johnnydebris.net/templess/trunk',
100)
+def run_gadfly(executable='/usr/local/bin/python'):
+ """ run some tests in the gadfly pure Python database """
+ here = py.magic.autopath().dirpath()
+ gadfly = here.join('gadfly')
+ testscript = gadfly.join('test', 'testsubset.py')
+ command = 'PYTHONPATH="%s" "%s" "%s"' % (gadfly, executable, testscript)
+ txt = run_cmd(command)
+ lines = [line for line in txt.split('\n') if line.strip()]
+ if lines[-1].strip() != 'OK':
+ raise BenchmarkFailed
+ lastword = lines[-2].split()[-1]
+ if not lastword.endswith('s'):
+ raise BenchmarkFailed
+ try:
+ result = float(lastword[:-1])
+ except ValueError:
+ raise BenchmarkFailed
+ return result
+
+def check_gadfly():
+ return external_dependency('gadfly',
+ 'http://codespeak.net/svn/user/arigo/hack/pypy-hack/gadflyZip',
+ 40225)
+
def check_translate():
return False # XXX what should we do about the dependency on ctypes?
@@ -141,6 +165,8 @@
's', check_docutils),
Benchmark('templess', run_templess, RICHARDS_ASCENDING_GOOD,
's', check_templess),
+ Benchmark('gadfly', run_gadfly, RICHARDS_ASCENDING_GOOD,
+ 's', check_gadfly),
]
BENCHMARKS_BY_NAME = {}
More information about the Pypy-commit
mailing list