OSDN Git Service

[shuffle] Make the seed an optional component and add support for
authorChandler Carruth <chandlerc@gmail.com>
Wed, 13 Aug 2014 10:00:46 +0000 (10:00 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 13 Aug 2014 10:00:46 +0000 (10:00 +0000)
letting the python very directly compute a UUID.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215533 91177308-0d34-0410-b5e6-96231b3b80d8

utils/shuffle_fuzz.py

index 1f1a047..b70530a 100755 (executable)
@@ -17,13 +17,14 @@ import argparse
 import itertools
 import random
 import sys
+import uuid
 
 def main():
   parser = argparse.ArgumentParser(description=__doc__)
-  parser.add_argument('seed',
-                      help='A string used to seed the RNG')
   parser.add_argument('-v', '--verbose', action='store_true',
                       help='Show verbose output')
+  parser.add_argument('--seed', default=str(uuid.uuid4()),
+                      help='A string used to seed the RNG')
   parser.add_argument('--max-shuffle-height', type=int, default=16,
                       help='Specify a fixed height of shuffle tree to test')
   parser.add_argument('--no-blends', dest='blends', action='store_false',