[pypy-svn] r70122 - pypy/trunk/pypy/translator/benchmark

arigo at codespeak.net arigo at codespeak.net
Tue Dec 15 10:44:53 CET 2009


Author: arigo
Date: Tue Dec 15 10:44:52 2009
New Revision: 70122

Modified:
   pypy/trunk/pypy/translator/benchmark/bench-custom.py
Log:
If running --no-cpython, don't crash if CPython is not recorded
in the pickle file.  Instead, don't create the pickle and don't
produce the summary at all.


Modified: pypy/trunk/pypy/translator/benchmark/bench-custom.py
==============================================================================
--- pypy/trunk/pypy/translator/benchmark/bench-custom.py	(original)
+++ pypy/trunk/pypy/translator/benchmark/bench-custom.py	Tue Dec 15 10:44:52 2009
@@ -54,6 +54,13 @@
                 for b in benchmarks:
                     benchmark_result.result(exe, allowcreate=True).run_benchmark(b, verbose=options.verbose)
 
+        if options.relto:
+            relto = options.relto
+        else:
+            relto = full_pythons[0]
+        if relto not in benchmark_result.benchmarks:
+            continue
+
         pickle.dump(benchmark_result, open(options.picklefile, 'wb'))
 
         exe_stats = ['stat:st_mtime', 'exe_name', 'pypy_rev']
@@ -63,10 +70,6 @@
             stats = ['exe']
         for b in benchmarks:
             stats.append('bench:'+b.name)
-        if options.relto:
-            relto = options.relto
-        else:
-            relto = full_pythons[0]
         kwds = {'relto': relto,
                 'filteron' :lambda r: r.exe_name in exes,
                 }



More information about the Pypy-commit mailing list