[pypy-svn] r37516 - pypy/dist/pypy/jit/codegen/demo

mwh at codespeak.net mwh at codespeak.net
Mon Jan 29 12:11:58 CET 2007


Author: mwh
Date: Mon Jan 29 12:11:55 2007
New Revision: 37516

Modified:
   pypy/dist/pypy/jit/codegen/demo/conftest.py
   pypy/dist/pypy/jit/codegen/demo/test_random.py
Log:
conftesterize nb_blocks and max_block_length


Modified: pypy/dist/pypy/jit/codegen/demo/conftest.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/demo/conftest.py	(original)
+++ pypy/dist/pypy/jit/codegen/demo/conftest.py	Mon Jan 29 12:11:55 2007
@@ -12,4 +12,12 @@
                choices=['llgraph', 'dump', 'ppc', 'i386', 'llvm'],
                dest="backend",
                help="select the backend to run the functions with"),
+        Option('--nb-blocks', action="store", type="int",
+               default=15,
+               dest="nb_blocks",
+               help="how many blocks to include in the random function"),
+        Option('--max-block-length', action="store", type="int",
+               default=20,
+               dest="max_block_length",
+               help="insert up to this many operations in each block"),
         )

Modified: pypy/dist/pypy/jit/codegen/demo/test_random.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/demo/test_random.py	(original)
+++ pypy/dist/pypy/jit/codegen/demo/test_random.py	Mon Jan 29 12:11:55 2007
@@ -4,7 +4,8 @@
 from pypy.jit.codegen.demo import conftest as demo_conftest
 
 
-def test_random_function(nb_blocks=15, max_block_length=20):
+def test_random_function(nb_blocks=demo_conftest.option.nb_blocks,
+                         max_block_length=demo_conftest.option.max_block_length):
     #py.test.skip("in-progress")
     blocklabels = range(nb_blocks)
     r = Random()



More information about the Pypy-commit mailing list