mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Run server-test and websocket-test first. Show stderr upon abnormal rippled exit
This commit is contained in:
@@ -91,7 +91,7 @@ Server.prototype._serverSpawnSync = function() {
|
||||
var options = {
|
||||
cwd: this.serverPath(),
|
||||
env: process.env,
|
||||
stdio: this.quiet ? 'ignore' : 'inherit'
|
||||
stdio: this.quiet ? 'pipe': 'inherit'
|
||||
};
|
||||
|
||||
// Spawn in standalone mode for now.
|
||||
@@ -103,6 +103,10 @@ Server.prototype._serverSpawnSync = function() {
|
||||
this.config.rippled_path,
|
||||
args.join(" "),
|
||||
this.configPath());
|
||||
|
||||
|
||||
var stderr = [];
|
||||
self.child.stderr.on('data', function(buf) { stderr.push(buf); });
|
||||
|
||||
// By default, just log exits.
|
||||
this.child.on('exit', function(code, signal) {
|
||||
@@ -110,6 +114,14 @@ Server.prototype._serverSpawnSync = function() {
|
||||
|
||||
self.emit('exited');
|
||||
|
||||
// Dump server logs on an abnormal exit
|
||||
if (self.quiet && (!self.stopping)) {
|
||||
process.stderr.write("rippled stderr:\n");
|
||||
for (var i = 0; i < stderr.length; i++) {
|
||||
process.stderr.write(stderr[i]);
|
||||
};
|
||||
};
|
||||
|
||||
// If could not exec: code=127, signal=null
|
||||
// If regular exit: code=0, signal=null
|
||||
// Fail the test if the server has not called "stop".
|
||||
|
||||
Reference in New Issue
Block a user