parent
2800962285
commit
95285cb590
18
gulpfile.js
18
gulpfile.js
@ -122,6 +122,16 @@ function safeSpawnSync(command, parameters, options) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function startNode(args, options) {
|
||||||
|
// Node.js decreased the maximum header size from 80 KB to 8 KB in newer
|
||||||
|
// releases, which is not sufficient for some of our reference test files
|
||||||
|
// (such as `issue6360.pdf`), so we need to restore this value. Note that
|
||||||
|
// this argument needs to be before all other arguments as it needs to be
|
||||||
|
// passed to the Node.js process itself and not to the script that it runs.
|
||||||
|
args.unshift('--max-http-header-size=80000');
|
||||||
|
return spawn('node', args, options);
|
||||||
|
}
|
||||||
|
|
||||||
function createStringSource(filename, content) {
|
function createStringSource(filename, content) {
|
||||||
var source = stream.Readable({ objectMode: true, });
|
var source = stream.Readable({ objectMode: true, });
|
||||||
source._read = function () {
|
source._read = function () {
|
||||||
@ -405,7 +415,7 @@ function createTestSource(testsName, bot) {
|
|||||||
args.push('--strictVerify');
|
args.push('--strictVerify');
|
||||||
}
|
}
|
||||||
|
|
||||||
var testProcess = spawn('node', args, { cwd: TEST_DIR, stdio: 'inherit', });
|
var testProcess = startNode(args, { cwd: TEST_DIR, stdio: 'inherit', });
|
||||||
testProcess.on('close', function (code) {
|
testProcess.on('close', function (code) {
|
||||||
source.push(null);
|
source.push(null);
|
||||||
});
|
});
|
||||||
@ -435,7 +445,7 @@ function makeRef(done, bot) {
|
|||||||
args.push('--noPrompts', '--strictVerify');
|
args.push('--noPrompts', '--strictVerify');
|
||||||
}
|
}
|
||||||
args.push('--browserManifestFile=' + PDF_BROWSERS);
|
args.push('--browserManifestFile=' + PDF_BROWSERS);
|
||||||
var testProcess = spawn('node', args, { cwd: TEST_DIR, stdio: 'inherit', });
|
var testProcess = startNode(args, { cwd: TEST_DIR, stdio: 'inherit', });
|
||||||
testProcess.on('close', function (code) {
|
testProcess.on('close', function (code) {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -1146,7 +1156,7 @@ gulp.task('baseline', function (done) {
|
|||||||
gulp.task('unittestcli', gulp.series('testing-pre', 'lib', function(done) {
|
gulp.task('unittestcli', gulp.series('testing-pre', 'lib', function(done) {
|
||||||
var options = ['node_modules/jasmine/bin/jasmine',
|
var options = ['node_modules/jasmine/bin/jasmine',
|
||||||
'JASMINE_CONFIG_PATH=test/unit/clitests.json'];
|
'JASMINE_CONFIG_PATH=test/unit/clitests.json'];
|
||||||
var jasmineProcess = spawn('node', options, { stdio: 'inherit', });
|
var jasmineProcess = startNode(options, { stdio: 'inherit', });
|
||||||
jasmineProcess.on('close', function(code) {
|
jasmineProcess.on('close', function(code) {
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
done(new Error('Unit tests failed.'));
|
done(new Error('Unit tests failed.'));
|
||||||
@ -1163,7 +1173,7 @@ gulp.task('lint', gulp.series('default_preferences', function(done) {
|
|||||||
// Ensure that we lint the Firefox specific *.jsm files too.
|
// Ensure that we lint the Firefox specific *.jsm files too.
|
||||||
var options = ['node_modules/eslint/bin/eslint', '--ext', '.js,.jsm', '.',
|
var options = ['node_modules/eslint/bin/eslint', '--ext', '.js,.jsm', '.',
|
||||||
'--report-unused-disable-directives'];
|
'--report-unused-disable-directives'];
|
||||||
var esLintProcess = spawn('node', options, { stdio: 'inherit', });
|
var esLintProcess = startNode(options, { stdio: 'inherit', });
|
||||||
esLintProcess.on('close', function (code) {
|
esLintProcess.on('close', function (code) {
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
done(new Error('ESLint failed.'));
|
done(new Error('ESLint failed.'));
|
||||||
|
Loading…
Reference in New Issue
Block a user