From 333da36c19019eebe92aa368496e0bcb8c65a0f3 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 17 Sep 2012 15:45:44 -0700 Subject: [PATCH] UT: Set the cwd for the servers. --- test/config.js | 4 +++- test/server.js | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/config.js b/test/config.js index 7cacb41a8c..6b320f248f 100644 --- a/test/config.js +++ b/test/config.js @@ -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 = { diff --git a/test/server.js b/test/server.js index 585315546f..0be028cc59 100644 --- a/test/server.js +++ b/test/server.js @@ -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;