зеркало из https://github.com/mozilla/pjs.git
Bug 688762 - add try/except blocks around all harnesses so we always return an error code. r=bear
This commit is contained in:
Родитель
e0cdbc7dcb
Коммит
23f6fb12f0
|
@ -706,7 +706,11 @@ class DeviceManagerSUT(DeviceManager):
|
|||
if localFile == '':
|
||||
localFile = os.path.join(self.tempRoot, "temp.txt")
|
||||
|
||||
retVal = self.pullFile(remoteFile)
|
||||
try:
|
||||
retVal = self.pullFile(remoteFile)
|
||||
except:
|
||||
return None
|
||||
|
||||
if (retVal is None):
|
||||
return None
|
||||
|
||||
|
|
|
@ -440,7 +440,13 @@ def main():
|
|||
|
||||
#an example manifest name to use on the cli
|
||||
# manifest = "http://" + options.remoteWebServer + "/reftests/layout/reftests/reftest-sanity/reftest.list"
|
||||
reftest.runTests(manifest, options)
|
||||
try:
|
||||
reftest.runTests(manifest, options)
|
||||
except:
|
||||
print "TEST-UNEXPECTED-FAIL | | exception while running reftests"
|
||||
reftest.stopWebServer(options)
|
||||
sys.exit(1)
|
||||
|
||||
reftest.stopWebServer(options)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -345,8 +345,16 @@ def main():
|
|||
if (dm.processExist(procName)):
|
||||
dm.killProcess(procName)
|
||||
|
||||
sys.exit(mochitest.runTests(options))
|
||||
|
||||
try:
|
||||
retVal = mochitest.runTests(options)
|
||||
except:
|
||||
print "TEST-UNEXPECTED-ERROR | | Exception caught while running tests."
|
||||
mochitest.stopWebServer(options)
|
||||
mochitest.stopWebSocketServer(options)
|
||||
sys.exit(1)
|
||||
|
||||
sys.exit(retVal)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче