mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1296280 (part 0b) - Make debugging node h2 server work better r=mcmanus
MozReview-Commit-ID: 6QoGiUKGTzA --HG-- extra : rebase_source : e5987c94e97ef398d871f2c5ac5a19ef97c578ea
This commit is contained in:
parent
3ce8296e41
commit
d95119a726
@ -749,13 +749,16 @@ function handleRequest(req, res) {
|
||||
|
||||
// Set up the SSL certs for our server - this server has a cert for foo.example.com
|
||||
// signed by netwerk/tests/unit/CA.cert.der
|
||||
//var log_module = node_http2_root + "/test/util";
|
||||
var options = {
|
||||
key: fs.readFileSync(__dirname + '/http2-key.pem'),
|
||||
cert: fs.readFileSync(__dirname + '/http2-cert.pem'),
|
||||
//, log: require(log_module).createLogger('server')
|
||||
};
|
||||
|
||||
if (process.env.HTTP2_LOG !== undefined) {
|
||||
var log_module = node_http2_root + "/test/util";
|
||||
options.log = require(log_module).createLogger('server')
|
||||
}
|
||||
|
||||
var server = http2.createServer(options, handleRequest);
|
||||
|
||||
server.on('connection', function(socket) {
|
||||
|
@ -1007,7 +1007,10 @@ class XPCShellTests(object):
|
||||
except (subprocess.CalledProcessError, OSError), e:
|
||||
self.log.error('Could not retrieve node version: %s' % str(e))
|
||||
|
||||
if nodeBin:
|
||||
if os.getenv('MOZ_ASSUME_NODE_RUNNING', None):
|
||||
self.log.info('Assuming required node servers are already running')
|
||||
nodeMozInfo['hasNode'] = True
|
||||
elif nodeBin:
|
||||
self.log.info('Found node at %s' % (nodeBin,))
|
||||
|
||||
def startServer(name, serverJs):
|
||||
@ -1035,9 +1038,6 @@ class XPCShellTests(object):
|
||||
|
||||
myDir = os.path.split(os.path.abspath(__file__))[0]
|
||||
startServer('moz-http2', os.path.join(myDir, 'moz-http2', 'moz-http2.js'))
|
||||
elif os.getenv('MOZ_ASSUME_NODE_RUNNING', None):
|
||||
self.log.info('Assuming required node servers are already running')
|
||||
nodeMozInfo['hasNode'] = True
|
||||
|
||||
mozinfo.update(nodeMozInfo)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user