Commit eaf42812 authored by Dave Wells's avatar Dave Wells Committed by Yoni Fogel

first working version of recovery stress test. Still incomplete. refs[t:1977]

git-svn-id: file:///svn/toku/tokudb@14976 c7de825b-a66e-492c-adef-691d508d4ae1
parent c0eac18e
...@@ -102,6 +102,7 @@ BDB_DONTRUN_TESTS = \ ...@@ -102,6 +102,7 @@ BDB_DONTRUN_TESTS = \
checkpoint_stress \ checkpoint_stress \
checkpoint_truncate_1 \ checkpoint_truncate_1 \
checkpoint_callback \ checkpoint_callback \
recovery_stress \
test_txn_nested1 \ test_txn_nested1 \
test_txn_nested2 \ test_txn_nested2 \
test_txn_nested3 \ test_txn_nested3 \
......
This diff is collapsed.
#!/usr/local/bin/python2.6
#
# Copyright (C) 2009 Tokutek, Inc.
#
import sys
import os
import optparse
# options
parser = optparse.OptionParser()
parser.add_option('--iterations', dest='iterations', type='int', default=1, help="Number of test iterations (default = 1)")
parser.add_option('--crash', dest='crash', action="store_true", default=False, help="Crash the DB every iteration (default = FALSE)")
parser.add_option('--verbose', dest='verbose', action="store_true", default=False, help="Verbose printing (default = FALSE)")
options, remainder = parser.parse_args()
def run_test():
cmd = 'recovery_stress.tdb'
if ( options.verbose ): cmd += ' -v'
if ( options.crash ): cmd += ' -C'
for i in range(options.iterations):
os.system(cmd + ' -i %d' % (i))
def main(argv):
run_test()
return 0
if __name__ == '__main__':
usage = sys.modules["__main__"].__doc__
parser.set_usage(usage)
unused_flags, new_argv = parser.parse_args(args=sys.argv[1:], values=options)
sys.exit(main([sys.argv[0]] + new_argv))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment