Skip to content

Commit

Permalink
Added '-shuffle' parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoffee committed Mar 7, 2019
1 parent 5b48510 commit 3e9519f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import sys
import util
import struct
import random
import argparse
import itertools as it
import collections as cl
Expand Down Expand Up @@ -55,6 +56,7 @@ def iter_tests (defaults, tests, order):

argparser = argparse.ArgumentParser(prog=os.path.basename(__file__))
argparser.add_argument("-clear", action="store_true")
argparser.add_argument("-shuffle", action="store_true")
argparser.add_argument("-release-tasks", action="store_true")
argparser.add_argument("-no-warnings", action="store_false", dest="warnings")

Expand Down Expand Up @@ -113,6 +115,9 @@ def main (argv):
if tuple(sorted(ts)) not in exists
]

if args.shuffle:
random.shuffle(tests, (lambda: 0.42))

created = alist.write_locked(queue, *tests)

tlate.seek(0, os.SEEK_END)
Expand Down

0 comments on commit 3e9519f

Please sign in to comment.