ebo  committed bc0fdba

Added some documentation

  • Participants
  • Parent commits 26a4306

Comments (0)

Files changed (2)

+pyfuzz is a random program generator for python. It was developed to test the JIT compiler of Unladen Swallow.
+Website and repository:
+Execute to generate a new random program and output it to stdout.
+Execute to test a python binary. You must specify a base and a test binary using the -b and -t commandline options. 


 from pgen import *
+import sys
 import subprocess
 import time
 from optparse import OptionParser
 def _main():
+    default_binary = sys.executable
     parser = OptionParser()
-    parser.add_option("-b", "--base", type="string", dest="base", default="python", help="Base python binary. Default: python")
+    parser.add_option("-b", "--base", type="string", dest="base", default=default_binary, help="Base python binary. Default: "+default_binary)
     parser.add_option("-B", "--base-args", type="string", dest="baseargs", default="",
                         help="Additional arguments for base binary")
     parser.add_option("-t", "--test", type="string", dest="test", help="Python binary to test.")
     if not options.test:
         print "Please specifiy a test binary."
+        parser.print_help()
     rng = random.Random()