tools: fix for testing openssl integrations
authorRefael Ackermann <refack@gmail.com>
Thu, 2 Oct 2014 08:20:51 +0000 (11:20 +0300)
committerTrevor Norris <trev.norris@gmail.com>
Wed, 8 Oct 2014 08:19:25 +0000 (01:19 -0700)
Windows doesn't resolve ".." the way we expect it for symlinks and
junctions.

PR-URL: https://github.com/joyent/node/pull/8489
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
test/common.js

index bd7318c..622b0a3 100644 (file)
@@ -30,12 +30,12 @@ exports.libDir = path.join(exports.testDir, '../lib');
 exports.tmpDir = path.join(exports.testDir, 'tmp');
 exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
 
+exports.opensslCli = path.join(path.dirname(process.execPath), 'openssl-cli');
 if (process.platform === 'win32') {
   exports.PIPE = '\\\\.\\pipe\\libuv-test';
-  exports.opensslCli = path.join(process.execPath, '..', 'openssl-cli.exe');
+  exports.opensslCli += '.exe';
 } else {
   exports.PIPE = exports.tmpDir + '/test.sock';
-  exports.opensslCli = path.join(process.execPath, '..', 'openssl-cli');
 }
 if (!fs.existsSync(exports.opensslCli))
   exports.opensslCli = false;