Commit b15c4b36 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4797] fix print statements, save commands better


git-svn-id: file:///svn/toku/tokudb@42672 c7de825b-a66e-492c-adef-691d508d4ae1
parent 8b63333a
...@@ -85,7 +85,8 @@ class TestRunnerBase(object): ...@@ -85,7 +85,8 @@ class TestRunnerBase(object):
self.oldversionstr = 'noupgrade' self.oldversionstr = 'noupgrade'
def __str__(self): def __str__(self):
return 'TestRunner<%s, %d, %d>' % (self.execf, self.tsize, self.csize) return (self.__class__.__name__ +
'<%(execf)s, %(tsize)d, %(csize)d, %(oldversionstr)s>') % self
def __getitem__(self, k): def __getitem__(self, k):
return self.__getattribute__(k) return self.__getattribute__(k)
...@@ -94,8 +95,8 @@ class TestRunnerBase(object): ...@@ -94,8 +95,8 @@ class TestRunnerBase(object):
return '\t'.join(['%(execf)s', return '\t'.join(['%(execf)s',
'%(rev)s', '%(rev)s',
'%(tsize)d', '%(tsize)d',
'%(oldversionstr)s',
'%(csize)d', '%(csize)d',
'%(oldversionstr)s',
'%(num_ptquery)d', '%(num_ptquery)d',
'%(num_update)d', '%(num_update)d',
'%(time)d']) % self '%(time)d']) % self
...@@ -189,11 +190,6 @@ class TestRunnerBase(object): ...@@ -189,11 +190,6 @@ class TestRunnerBase(object):
for lib in glob(os.path.join(self.tokudb, 'lib', '*.so')): for lib in glob(os.path.join(self.tokudb, 'lib', '*.so')):
copy(lib, targetfor(lib)) copy(lib, targetfor(lib))
commandsf = open(targetfor("commands.txt"), "w")
print >>commandsf, ' '.join([self.execf] + self.prepareargs)
print >>commandsf, ' '.join([self.execf] + self.testargs)
commandsf.close()
return savedir return savedir
def waitfor(self, proc): def waitfor(self, proc):
...@@ -205,6 +201,9 @@ class TestRunnerBase(object): ...@@ -205,6 +201,9 @@ class TestRunnerBase(object):
def spawn_child(self, args): def spawn_child(self, args):
logging.debug('%s spawning %s', self, ' '.join([self.execf] + args)) logging.debug('%s spawning %s', self, ' '.join([self.execf] + args))
commandsf = open(os.path.join(self.rundir, 'commands.txt'), 'a')
print >>commandsf, ' '.join([self.execf] + args)
commandsf.close()
proc = Popen([self.execf] + args, proc = Popen([self.execf] + args,
executable=os.path.join('..', self.execf), executable=os.path.join('..', self.execf),
env=self.env, env=self.env,
......
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