diff --git a/test/config.js b/test/config.js index 7cacb41a8..6b320f248 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 585315546..0be028cc5 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;