mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
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:
parent
ffb7d000cc
commit
fcdf66ee32
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user