1
Index: firefox-trunk-19.0~a1~hg20121114r113217/testing/mochitest/runtests.py
2
===================================================================
3
--- firefox-trunk-19.0~a1~hg20121114r113217.orig/testing/mochitest/runtests.py 2012-11-14 21:08:29.000000000 +0000
4
+++ firefox-trunk-19.0~a1~hg20121114r113217/testing/mochitest/runtests.py 2012-11-15 18:45:40.212997000 +0000
6
help = "file to which logging occurs")
7
defaults["logFile"] = ""
9
+ self.add_option("--websock-log-file",
10
+ action = "store", type = "string",
11
+ dest = "websockLogFile", metavar = "FILE",
12
+ help = "file to which pywebsocket logs to")
13
+ defaults["websockLogFile"] = ""
15
self.add_option("--autorun",
16
action = "store_true", dest = "autorun",
17
help = "start running tests when the application starts")
19
class WebSocketServer(object):
20
"Class which encapsulates the mod_pywebsocket server"
22
- def __init__(self, automation, options, scriptdir, debuggerInfo=None):
23
+ def __init__(self, automation, options, scriptdir, logfile, debuggerInfo=None):
24
self.port = options.webSocketPort
25
self._automation = automation
26
self._scriptdir = scriptdir
27
+ self._logfile = logfile
28
self.debuggerInfo = debuggerInfo
32
cmd = [sys.executable, script]
33
if self.debuggerInfo and self.debuggerInfo['interactive']:
34
cmd += ['--interactive']
35
- cmd += ['-p', str(self.port), '-w', self._scriptdir, '-l', \
36
- os.path.join(self._scriptdir, "websock.log"), \
37
- '--log-level=debug', '--allow-handlers-outside-root-dir']
38
+ cmd += ['-p', str(self.port), '-w', self._scriptdir, \
39
+ '--log-level=debug', '--allow-handlers-outside-root-dir']
41
+ cmd += ['-l', self._logfile]
43
self._process = self._automation.Process(cmd)
44
pid = self._process.pid