From: Martin Schwenke Date: Sun, 1 Aug 2010 01:53:28 +0000 (+1000) Subject: Testing: IP allocation simulation - add command line option for random seed. X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=8362029c7cfc1041e46ee2116aa5cade6edce435;p=metze%2Fctdb%2Fwip.git Testing: IP allocation simulation - add command line option for random seed. Signed-off-by: Martin Schwenke --- diff --git a/tests/takeover/ctdb_takeover.py b/tests/takeover/ctdb_takeover.py index ce9cc115..0457e852 100755 --- a/tests/takeover/ctdb_takeover.py +++ b/tests/takeover/ctdb_takeover.py @@ -58,6 +58,10 @@ def process_args(): action="store", type="int", dest="iterations", default=1000, help="number of iterations to run in test") + parser.add_option("-s", "--seed", + action="store", type="int", dest="seed", + default=None, + help="number of iterations to run in test") parser.add_option("-b", "--balance", action="store_true", dest="balance", default=False, help="show (im)balance information") @@ -493,3 +497,4 @@ prev = None options = process_args() +random.seed(options.seed)