Support a "--noserver" command line option in tests:

* Run npm/integration tests without launching rippled, using a
  running instance of rippled (possibly in a debugger) instead.
* Works for "npm test" and "mocha"
This commit is contained in:
Edward Hennis
2015-01-26 18:44:51 -05:00
committed by Nik Bougalis
parent 5d6ea3d75f
commit a691632995
3 changed files with 53 additions and 22 deletions

View File

@@ -88,19 +88,6 @@ Server.prototype._serverSpawnSync = function() {
var self = this;
var rippledpath = this.config.rippled_path;
// Override the config with command line if provided
if (process.env["npm_config_rippled"]) {
rippledpath = path.resolve(process.cwd(),
process.env["npm_config_rippled"]);
} else {
for (var i = process.argv.length-1; i >= 0; --i) {
arg = process.argv[i].split("=", 2);
if (arg.length === 2 && arg[0] === "--rippled") {
rippledpath = path.resolve(process.cwd(), arg[1]);
break;
}
};
}
assert(rippledpath, "rippled_path not provided");
var args = [