diff options
author | Randal Hanford <rhanford@gmail.com> | 2017-10-06 10:51:12 -0700 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2017-10-15 00:47:06 +0800 |
commit | 971aad1b132a5ec37216c0d755d3ea59afc63812 (patch) | |
tree | 26d99c86895060b73c58ed47891c9dbd83e6723e /test/common/index.js | |
parent | 4826ac537f408304a8a208a2365d3bb415065c14 (diff) | |
download | android-node-v8-971aad1b132a5ec37216c0d755d3ea59afc63812.tar.gz android-node-v8-971aad1b132a5ec37216c0d755d3ea59afc63812.tar.bz2 android-node-v8-971aad1b132a5ec37216c0d755d3ea59afc63812.zip |
test: use relative path in pipePrefix
Modified pipePrefix to use relative path on windows,
previously tests failed when the full path was 120+ characters
PR-URL: https://github.com/nodejs/node/pull/15988
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/common/index.js')
-rw-r--r-- | test/common/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/common/index.js b/test/common/index.js index 278f9f6a78..05f21e25ca 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -258,7 +258,8 @@ Object.defineProperty(exports, 'hasFipsCrypto', { }); { - const pipePrefix = exports.isWindows ? '\\\\.\\pipe\\' : `${exports.tmpDir}/`; + const localRelative = path.relative(process.cwd(), `${exports.tmpDir}/`); + const pipePrefix = exports.isWindows ? '\\\\.\\pipe\\' : localRelative; const pipeName = `node-test.${process.pid}.sock`; exports.PIPE = pipePrefix + pipeName; } |