UT: Set the cwd for the servers.

This commit is contained in:
Arthur Britto
2012-09-17 15:45:44 -07:00
parent b6771dcae9
commit 333da36c19
2 changed files with 7 additions and 5 deletions

View File

@@ -2,8 +2,10 @@
// Configuration for unit tests
//
var path = require("path");
// Where to find the binary.
exports.newcoind = "./newcoind";
exports.newcoind = path.join(process.cwd(), "newcoind");
// Configuration for servers.
exports.servers = {

View File

@@ -30,7 +30,6 @@ var configContent = function(name) {
var configPath = function(name) {
return path.join(serverPath(name), "newcoind.cfg");
};
// Write a server's newcoind.cfg.
@@ -44,11 +43,12 @@ var serverSpawnSync = function(name) {
config.newcoind,
[
"-a",
"--conf=" + configPath(name)
"--conf=newcoind.cfg"
],
{
env : process.env,
stdio : 'inherit'
cwd: serverPath(name),
env: process.env,
stdio: 'inherit'
});
servers[name] = server;