diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-29 17:21:12 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-11-05 21:49:11 +0100 |
commit | 9fb7aee7471119d4d33982f5acca6eadde75745c (patch) | |
tree | b94351a4bee0424f880d4d8febd6377665928640 /test/common.js | |
parent | bf23328a9c19a47df95f650bfd6dc8767f6af371 (diff) | |
download | nodejs-9fb7aee7471119d4d33982f5acca6eadde75745c.tar.gz nodejs-9fb7aee7471119d4d33982f5acca6eadde75745c.tar.bz2 nodejs-9fb7aee7471119d4d33982f5acca6eadde75745c.zip |
test: unlink custom unix socket before test
Unlink NODE_COMMON_PIPE before running the test if set in the
environment. The test runner won't do it for us like it does
for files in test/tmp.
PR-URL: https://github.com/node-forward/node/pull/40
Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'test/common.js')
-rw-r--r-- | test/common.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/common.js b/test/common.js index 17bfdc071..bbc772ef5 100644 --- a/test/common.js +++ b/test/common.js @@ -37,8 +37,18 @@ if (process.platform === 'win32') { } else { exports.PIPE = exports.tmpDir + '/test.sock'; } -if (process.env.NODE_COMMON_PIPE) + +if (process.env.NODE_COMMON_PIPE) { exports.PIPE = process.env.NODE_COMMON_PIPE; + // Remove manually, the test runner won't do it + // for us like it does for files in test/tmp. + try { + fs.unlinkSync(exports.PIPE); + } catch (e) { + // Ignore. + } +} + if (!fs.existsSync(exports.opensslCli)) exports.opensslCli = false; |