Beispiel #1
0
 def globalSetup(preserveFiles = False, useTimestamp = False,
                 gdbSub = False, lldbSub = False, verbose = 1, builddir = None, dirarg = None,
                 longtest = False, ignoreStdout = False):
     WiredTigerTestCase._preserveFiles = preserveFiles
     d = 'WT_TEST' if dirarg == None else dirarg
     if useTimestamp:
         d += '.' + time.strftime('%Y%m%d-%H%M%S', time.localtime())
     shutil.rmtree(d, ignore_errors=True)
     os.makedirs(d)
     wtscenario.set_long_run(longtest)
     WiredTigerTestCase._parentTestdir = d
     WiredTigerTestCase._builddir = builddir
     WiredTigerTestCase._origcwd = os.getcwd()
     WiredTigerTestCase._resultfile = open(os.path.join(d, 'results.txt'), "w", 1)  # line buffered
     WiredTigerTestCase._gdbSubprocess = gdbSub
     WiredTigerTestCase._lldbSubprocess = lldbSub
     WiredTigerTestCase._longtest = longtest
     WiredTigerTestCase._verbose = verbose
     WiredTigerTestCase._ignoreStdout = ignoreStdout
     WiredTigerTestCase._dupout = os.dup(sys.stdout.fileno())
     WiredTigerTestCase._stdout = sys.stdout
     WiredTigerTestCase._stderr = sys.stderr
     WiredTigerTestCase._concurrent = False
     WiredTigerTestCase._globalSetup = True
     WiredTigerTestCase._ttyDescriptor = None
Beispiel #2
0
 def globalSetup(preserveFiles = False, removeAtStart = True, useTimestamp = False,
                 gdbSub = False, lldbSub = False, verbose = 1, builddir = None, dirarg = None,
                 longtest = False, zstdtest = False, ignoreStdout = False, seedw = 0, seedz = 0, hookmgr = None):
     WiredTigerTestCase._preserveFiles = preserveFiles
     d = 'WT_TEST' if dirarg == None else dirarg
     if useTimestamp:
         d += '.' + time.strftime('%Y%m%d-%H%M%S', time.localtime())
     if removeAtStart:
         shutil.rmtree(d, ignore_errors=True)
     os.makedirs(d)
     wtscenario.set_long_run(longtest)
     WiredTigerTestCase._parentTestdir = d
     WiredTigerTestCase._builddir = builddir
     WiredTigerTestCase._origcwd = os.getcwd()
     WiredTigerTestCase._resultfile = open(os.path.join(d, 'results.txt'), "w", 1)  # line buffered
     WiredTigerTestCase._gdbSubprocess = gdbSub
     WiredTigerTestCase._lldbSubprocess = lldbSub
     WiredTigerTestCase._longtest = longtest
     WiredTigerTestCase._zstdtest = zstdtest
     WiredTigerTestCase._verbose = verbose
     WiredTigerTestCase._ignoreStdout = ignoreStdout
     WiredTigerTestCase._dupout = os.dup(sys.stdout.fileno())
     WiredTigerTestCase._stdout = sys.stdout
     WiredTigerTestCase._stderr = sys.stderr
     WiredTigerTestCase._concurrent = False
     WiredTigerTestCase._globalSetup = True
     WiredTigerTestCase._seeds = [521288629, 362436069]
     WiredTigerTestCase._randomseed = False
     if hookmgr == None:
         hookmgr = wthooks.WiredTigerHookManager()
     WiredTigerTestCase._hookmgr = hookmgr
     if seedw != 0 and seedz != 0:
         WiredTigerTestCase._randomseed = True
         WiredTigerTestCase._seeds = [seedw, seedz]
Beispiel #3
0
 def globalSetup(preserveFiles = False, useTimestamp = False,
                 gdbSub = False, verbose = 1, dirarg = None,
                 longtest = False):
     WiredTigerTestCase._preserveFiles = preserveFiles
     d = 'WT_TEST' if dirarg == None else dirarg
     if useTimestamp:
         d += '.' + time.strftime('%Y%m%d-%H%M%S', time.localtime())
     shutil.rmtree(d, ignore_errors=True)
     os.makedirs(d)
     wtscenario.set_long_run(longtest)
     WiredTigerTestCase._parentTestdir = d
     WiredTigerTestCase._origcwd = os.getcwd()
     WiredTigerTestCase._resultfile = open(os.path.join(d, 'results.txt'), "w", 0)  # unbuffered
     WiredTigerTestCase._gdbSubprocess = gdbSub
     WiredTigerTestCase._longtest = longtest
     WiredTigerTestCase._verbose = verbose
     WiredTigerTestCase._dupout = os.dup(sys.stdout.fileno())
     WiredTigerTestCase._stdout = sys.stdout
     WiredTigerTestCase._stderr = sys.stderr
     WiredTigerTestCase._concurrent = False
     WiredTigerTestCase._globalSetup = True