Skip to content

Commit

Permalink
build for 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmetcalf committed Jun 22, 2015
1 parent b681059 commit edae701
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Stream = require('st' + 'ream');
}catch(_){Stream = require('events').EventEmitter;}}())
/*</replacement>*/

var Buffer = require('buffer').Buffer;

/*<replacement>*/
var util = require('core-util-is');
Expand Down
1 change: 1 addition & 0 deletions lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Stream = require('st' + 'ream');
}catch(_){Stream = require('events').EventEmitter;}}())
/*</replacement>*/

var Buffer = require('buffer').Buffer;

util.inherits(Writable, Stream);

Expand Down
56 changes: 56 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,60 @@ exports.fixturesDir = path.join(exports.testDir, 'fixtures');
exports.libDir = path.join(exports.testDir, '../lib');
exports.tmpDirName = 'tmp';
exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
exports.isWindows = process.platform === 'win32';

function rimrafSync(p) {
try {
var st = fs.lstatSync(p);
} catch (e) {
if (e.code === 'ENOENT')
return;
}

try {
if (st && st.isDirectory())
rmdirSync(p, null);
else
fs.unlinkSync(p);
} catch (e) {
if (e.code === 'ENOENT')
return;
if (e.code === 'EPERM')
return rmdirSync(p, er);
if (e.code !== 'EISDIR')
throw e;
rmdirSync(p, e);
}
}

function rmdirSync(p, originalEr) {
try {
fs.rmdirSync(p);
} catch (e) {
if (e.code === 'ENOTDIR')
throw originalEr;
if (e.code === 'ENOTEMPTY' || e.code === 'EEXIST' || e.code === 'EPERM') {
forEach(fs.readdirSync(p), function(f) {
rimrafSync(path.join(p, f));
});
fs.rmdirSync(p);
}
}
}

function refreshTmpDir() {
if (!process.send) { // Not a child process
try {
rimrafSync(exports.tmpDir);
} catch (e) {
}

try {
fs.mkdirSync(exports.tmpDir);
} catch (e) {
}
}
}

if (process.env.TEST_THREAD_ID) {
// Distribute ports in parallel tests
Expand All @@ -41,6 +95,8 @@ if (process.env.TEST_THREAD_ID) {
}
exports.tmpDir = path.join(exports.testDir, exports.tmpDirName);

refreshTmpDir();

var opensslCli = null;
var inFreeBSDJail = null;
var localhostIPv4 = null;
Expand Down

0 comments on commit edae701

Please sign in to comment.