bug 493791: Periodically run tests under valgrind - Add debugger support to pgoserver.py. r=ted, a2.0=gavin.

--HG--
extra : rebase_source : 6a5b2229df2a8a67e230cedd3f0be27863794120
This commit is contained in:
Chris AtLee 2010-12-06 10:37:29 -05:00
Родитель ffb7d000cc
Коммит fcdf66ee32
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -47,6 +47,7 @@ import sys
import shutil
from datetime import datetime
from automation import Automation
from automationutils import getDebuggerInfo, addCommonOptions
PORT = 8888
SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0])))
@ -58,7 +59,17 @@ class EasyServer(SocketServer.TCPServer):
allow_reuse_address = True
if __name__ == '__main__':
from optparse import OptionParser
automation = Automation()
parser = OptionParser()
addCommonOptions(parser)
options, args = parser.parse_args()
debuggerInfo = getDebuggerInfo(".", options.debugger, options.debuggerArgs,
options.debuggerInteractive)
httpd = EasyServer(("", PORT), SimpleHTTPServer.SimpleHTTPRequestHandler)
t = threading.Thread(target=httpd.serve_forever)
t.setDaemon(True) # don't hang on exit
@ -73,6 +84,7 @@ if __name__ == '__main__':
url = "http://localhost:%d/index.html" % PORT
appPath = os.path.join(SCRIPT_DIR, automation.DEFAULT_APP)
status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {},
debuggerInfo=debuggerInfo,
# the profiling HTML doesn't output anything,
# so let's just run this without a timeout
timeout = None)