mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
Tweaks to smoke.py. SERVER-253
This commit is contained in:
parent
b7feb6af29
commit
f9bba9c120
@ -40,8 +40,7 @@ class mongod(object):
|
|||||||
except Exception, e:
|
except Exception, e:
|
||||||
print >> sys.stderr, "error shutting down mongod"
|
print >> sys.stderr, "error shutting down mongod"
|
||||||
print >> sys.stderr, e
|
print >> sys.stderr, e
|
||||||
return not isinstance(value, Exception)
|
return not isinstance(value, Exception)
|
||||||
|
|
||||||
|
|
||||||
def ensureTestDirs(self):
|
def ensureTestDirs(self):
|
||||||
utils.ensureDir( "/tmp/unittest/" )
|
utils.ensureDir( "/tmp/unittest/" )
|
||||||
@ -86,11 +85,13 @@ class mongod(object):
|
|||||||
# return startMongodWithArgs("--master", "--oplogSize", "10")
|
# return startMongodWithArgs("--master", "--oplogSize", "10")
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
print "FOO"
|
||||||
if not self.proc:
|
if not self.proc:
|
||||||
print >> sys.stderr, "probable bug: self.proc unset in stop()"
|
print >> sys.stderr, "probable bug: self.proc unset in stop()"
|
||||||
return
|
return
|
||||||
if self.proc.poll() is not None:
|
# ???
|
||||||
raise Exception( "Failed to start mongod" )
|
#if self.proc.poll() is not None:
|
||||||
|
# raise Exception( "Failed to start mongod" )
|
||||||
try:
|
try:
|
||||||
# This function not available in Python 2.5
|
# This function not available in Python 2.5
|
||||||
self.proc.terminate()
|
self.proc.terminate()
|
||||||
@ -135,8 +136,9 @@ def runTest(path):
|
|||||||
print " *******************************************"
|
print " *******************************************"
|
||||||
print " Test : " + os.path.basename(path) + " ..."
|
print " Test : " + os.path.basename(path) + " ..."
|
||||||
t1=time.time()
|
t1=time.time()
|
||||||
p = Popen(argv)
|
# FIXME: we don't handle the case where the subprocess
|
||||||
r = p.wait()
|
# hangs... that's bad.
|
||||||
|
r = call(argv)
|
||||||
t2=time.time()
|
t2=time.time()
|
||||||
print " " + str((t2-t1)*1000) + "ms"
|
print " " + str((t2-t1)*1000) + "ms"
|
||||||
if r != 0:
|
if r != 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user