test: abstract skip functionality to common

The tap skipping output is so prevalent yet obscure in nature that we
ought to move it into it's own function in test/common.js

PR-URL: https://github.com/nodejs/node/pull/6697
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
This commit is contained in:
Jeremiah Senkpiel 2016-05-11 15:34:52 -04:00
parent dffafde7f1
commit 52bae222a3
229 changed files with 300 additions and 304 deletions

View File

@ -8,10 +8,9 @@ const assert = require('assert');
// v8::String::kMaxLength defined in v8.h
const kStringMaxLength = process.binding('buffer').kStringMaxLength;
const skipMessage =
'1..0 # Skipped: intensive toString tests due to memory confinements';
const skipMessage = 'intensive toString tests due to memory confinements';
if (!common.enoughTestMem) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}
@ -20,13 +19,13 @@ try {
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.
if (e.message !== 'Array buffer allocation failed') throw (e);
console.log(skipMessage);
common.skip(skipMessage);
return;
}
// Ensure we have enough memory available for future allocations to succeed.
if (!binding.ensureAllocation(2 * kStringMaxLength)) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}

View File

@ -4,10 +4,9 @@ const common = require('../../common');
const binding = require('./build/Release/binding');
const assert = require('assert');
const skipMessage =
'1..0 # Skipped: intensive toString tests due to memory confinements';
const skipMessage = 'intensive toString tests due to memory confinements';
if (!common.enoughTestMem) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}
@ -20,13 +19,13 @@ try {
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.
if (e.message !== 'Array buffer allocation failed') throw (e);
console.log(skipMessage);
common.skip(skipMessage);
return;
}
// Ensure we have enough memory available for future allocations to succeed.
if (!binding.ensureAllocation(2 * kStringMaxLength)) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}

View File

@ -4,10 +4,9 @@ const common = require('../../common');
const binding = require('./build/Release/binding');
const assert = require('assert');
const skipMessage =
'1..0 # Skipped: intensive toString tests due to memory confinements';
const skipMessage = 'intensive toString tests due to memory confinements';
if (!common.enoughTestMem) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}
@ -20,13 +19,13 @@ try {
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.
if (e.message !== 'Array buffer allocation failed') throw (e);
console.log(skipMessage);
common.skip(skipMessage);
return;
}
// Ensure we have enough memory available for future allocations to succeed.
if (!binding.ensureAllocation(2 * kStringMaxLength)) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}

View File

@ -4,10 +4,9 @@ const common = require('../../common');
const binding = require('./build/Release/binding');
const assert = require('assert');
const skipMessage =
'1..0 # Skipped: intensive toString tests due to memory confinements';
const skipMessage = 'intensive toString tests due to memory confinements';
if (!common.enoughTestMem) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}
@ -20,13 +19,13 @@ try {
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.
if (e.message !== 'Array buffer allocation failed') throw (e);
console.log(skipMessage);
common.skip(skipMessage);
return;
}
// Ensure we have enough memory available for future allocations to succeed.
if (!binding.ensureAllocation(2 * kStringMaxLength)) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}

View File

@ -4,10 +4,9 @@ const common = require('../../common');
const binding = require('./build/Release/binding');
const assert = require('assert');
const skipMessage =
'1..0 # Skipped: intensive toString tests due to memory confinements';
const skipMessage = 'intensive toString tests due to memory confinements';
if (!common.enoughTestMem) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}
@ -20,13 +19,13 @@ try {
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.
if (e.message !== 'Array buffer allocation failed') throw (e);
console.log(skipMessage);
common.skip(skipMessage);
return;
}
// Ensure we have enough memory available for future allocations to succeed.
if (!binding.ensureAllocation(2 * kStringMaxLength)) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}

View File

@ -4,10 +4,9 @@ const common = require('../../common');
const binding = require('./build/Release/binding');
const assert = require('assert');
const skipMessage =
'1..0 # Skipped: intensive toString tests due to memory confinements';
const skipMessage = 'intensive toString tests due to memory confinements';
if (!common.enoughTestMem) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}
@ -20,13 +19,13 @@ try {
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.
if (e.message !== 'Array buffer allocation failed') throw (e);
console.log(skipMessage);
common.skip(skipMessage);
return;
}
// Ensure we have enough memory available for future allocations to succeed.
if (!binding.ensureAllocation(2 * kStringMaxLength)) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}

View File

@ -4,10 +4,9 @@ const common = require('../../common');
const binding = require('./build/Release/binding');
const assert = require('assert');
const skipMessage =
'1..0 # Skipped: intensive toString tests due to memory confinements';
const skipMessage = 'intensive toString tests due to memory confinements';
if (!common.enoughTestMem) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}
@ -20,13 +19,13 @@ try {
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.
if (e.message !== 'Array buffer allocation failed') throw (e);
console.log(skipMessage);
common.skip(skipMessage);
return;
}
// Ensure we have enough memory available for future allocations to succeed.
if (!binding.ensureAllocation(2 * kStringMaxLength)) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}

View File

@ -4,10 +4,9 @@ const common = require('../../common');
const binding = require('./build/Release/binding');
const assert = require('assert');
const skipMessage =
'1..0 # Skipped: intensive toString tests due to memory confinements';
const skipMessage = 'intensive toString tests due to memory confinements';
if (!common.enoughTestMem) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}
@ -20,13 +19,13 @@ try {
} catch (e) {
// If the exception is not due to memory confinement then rethrow it.
if (e.message !== 'Array buffer allocation failed') throw (e);
console.log(skipMessage);
common.skip(skipMessage);
return;
}
// Ensure we have enough memory available for future allocations to succeed.
if (!binding.ensureAllocation(2 * kStringMaxLength)) {
console.log(skipMessage);
common.skip(skipMessage);
return;
}

View File

@ -465,6 +465,9 @@ exports.fail = function(msg) {
assert.fail(null, null, msg);
};
exports.skip = function(msg) {
console.log(`1..0 # Skipped: ${msg}`);
};
// A stream to push an array into a REPL
function ArrayStream() {

View File

@ -13,7 +13,7 @@ var certPem = fs.readFileSync(common.fixturesDir + '/cert.pem');
try {
var credentials = crypto.createCredentials({key: keyPem, cert: certPem});
} catch (e) {
console.log('1..0 # Skipped: node compiled without OpenSSL.');
common.skip('node compiled without OpenSSL.');
return;
}
var i = 0;

View File

@ -16,7 +16,7 @@ const messages = [
];
if (common.inFreeBSDJail) {
console.log('1..0 # Skipped: in a FreeBSD jail');
common.skip('in a FreeBSD jail');
return;
}

View File

@ -17,7 +17,7 @@ const listeners = 3;
// Skip test in FreeBSD jails.
if (common.inFreeBSDJail) {
console.log('1..0 # Skipped: In a FreeBSD jail');
common.skip('In a FreeBSD jail');
return;
}

View File

@ -11,7 +11,7 @@ let running = false;
const queue = [];
if (!common.hasIPv6) {
console.log('1..0 # Skipped: this test, no IPv6 support');
common.skip('this test, no IPv6 support');
return;
}

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -10,7 +10,7 @@
var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

View File

@ -4,7 +4,7 @@
var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var tls = require('tls');

View File

@ -1364,7 +1364,7 @@ if (common.hasCrypto) {
crypto.createHash('sha1').update(b2).digest('hex')
);
} else {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
}
// Test Compare

View File

@ -1367,7 +1367,7 @@ if (common.hasCrypto) {
crypto.createHash('sha1').update(b2).digest('hex')
);
} else {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
}
// Test Compare

View File

@ -19,7 +19,7 @@ var assert = require('assert');
var common = require('../common');
if (common.isWindows) {
console.log('1..0 # Skipped: Sending dgram sockets to child processes is ' +
common.skip('Sending dgram sockets to child processes is ' +
'not supported');
return;
}

View File

@ -5,12 +5,12 @@ var cluster = require('cluster');
var net = require('net');
if (common.isWindows) {
console.log('1..0 # Skipped: not reliable on Windows.');
common.skip('not reliable on Windows.');
return;
}
if (process.getuid() === 0) {
console.log('1..0 # Skipped: Test is not supposed to be run as root.');
common.skip('Test is not supposed to be run as root.');
return;
}

View File

@ -9,7 +9,7 @@ var dgram = require('dgram');
if (common.isWindows) {
console.log('1..0 # Skipped: dgram clustering is currently not supported ' +
common.skip('dgram clustering is currently not supported ' +
'on windows.');
return;
}

View File

@ -8,7 +8,7 @@ var dgram = require('dgram');
if (common.isWindows) {
console.log('1..0 # Skipped: dgram clustering is currently not supported ' +
common.skip('dgram clustering is currently not supported ' +
'on windows.');
return;
}

View File

@ -5,7 +5,7 @@ const cluster = require('cluster');
const dgram = require('dgram');
if (common.isWindows) {
console.log('1..0 # Skipped: dgram clustering is currently not supported ' +
common.skip('dgram clustering is currently not supported ' +
'on windows.');
return;
}

View File

@ -10,7 +10,7 @@ const net = require('net');
const Protocol = require('_debugger').Protocol;
if (common.isWindows) {
console.log('1..0 # Skipped: SCHED_RR not reliable on Windows');
common.skip('SCHED_RR not reliable on Windows');
return;
}

View File

@ -9,7 +9,7 @@ const net = require('net');
const cluster = require('cluster');
if (common.isWindows) {
console.log('1..0 # Skipped: This test does not apply to Windows.');
common.skip('This test does not apply to Windows.');
return;
}

View File

@ -3,7 +3,7 @@
const common = require('../common');
if (common.isWindows) {
console.log('1..0 # Skipped: on windows, because clustered dgram is ENOTSUP');
common.skip('on windows, because clustered dgram is ENOTSUP');
return;
}

View File

@ -6,7 +6,7 @@ const cluster = require('cluster');
const http = require('http');
if (common.isWindows) {
console.log('1..0 # Skipped: It is not possible to send pipe handles over ' +
common.skip('It is not possible to send pipe handles over ' +
'the IPC pipe on Windows');
return;
}

View File

@ -5,12 +5,12 @@ var cluster = require('cluster');
var net = require('net');
if (common.isWindows) {
console.log('1..0 # Skipped: not reliable on Windows');
common.skip('not reliable on Windows');
return;
}
if (process.getuid() === 0) {
console.log('1..0 # Skipped: as this test should not be run as `root`');
common.skip('as this test should not be run as `root`');
return;
}

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');
@ -56,7 +56,7 @@ for (var i in TEST_CASES) {
var test = TEST_CASES[i];
if (ciphers.indexOf(test.algo) == -1) {
console.log('1..0 # Skipped: unsupported ' + test.algo + ' test');
common.skip('unsupported ' + test.algo + ' test');
continue;
}

View File

@ -8,7 +8,7 @@ var assert = require('assert');
var constants = require('constants');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,11 +3,11 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
if (common.hasFipsCrypto) {
console.log('1..0 # Skipped: not supported in FIPS mode');
common.skip('not supported in FIPS mode');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ const common = require('../common');
const assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
const crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ const assert = require('assert');
const constants = require('constants');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
const crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
var domain = require('domain');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -7,7 +7,7 @@ var expect = ['pbkdf2', 'randomBytes', 'pseudoRandomBytes'];
var errors = 0;
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,11 +3,11 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
if (common.hasFipsCrypto) {
console.log('1..0 # Skipped: BF-ECB is not FIPS 140-2 compatible');
common.skip('BF-ECB is not FIPS 140-2 compatible');
return;
}
var crypto = require('crypto');

View File

@ -5,7 +5,7 @@ var spawnSync = require('child_process').spawnSync;
var path = require('path');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

View File

@ -7,7 +7,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -5,7 +5,7 @@ var fs = require('fs');
var path = require('path');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -5,7 +5,7 @@ var fs = require('fs');
var constants = require('constants');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
var fs = require('fs');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -5,7 +5,7 @@ var stream = require('stream');
var util = require('util');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -2,7 +2,7 @@
var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
var util = require('util');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

View File

@ -6,7 +6,7 @@ const spawn = require('child_process').spawn;
// Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
if (process.platform === 'sunos' || common.isWindows || common.isAix) {
console.log('1..0 # Skipped: cannot rmdir current working directory');
common.skip('cannot rmdir current working directory');
return;
}

View File

@ -6,7 +6,7 @@ var spawn = require('child_process').spawn;
// Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
if (process.platform === 'sunos' || common.isWindows || common.isAix) {
console.log('1..0 # Skipped: cannot rmdir current working directory');
common.skip('cannot rmdir current working directory');
return;
}

View File

@ -6,7 +6,7 @@ var spawn = require('child_process').spawn;
// Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
if (process.platform === 'sunos' || common.isWindows || common.isAix) {
console.log('1..0 # Skipped: cannot rmdir current working directory');
common.skip('cannot rmdir current working directory');
return;
}

View File

@ -5,7 +5,7 @@ var dgram = require('dgram');
// skip test in FreeBSD jails since 0.0.0.0 will resolve to default interface
if (common.inFreeBSDJail) {
console.log('1..0 # Skipped: In a FreeBSD jail');
common.skip('In a FreeBSD jail');
return;
}
@ -16,7 +16,7 @@ dgram.createSocket('udp4').bind(common.PORT + 0, common.mustCall(function() {
}));
if (!common.hasIPv6) {
console.log('1..0 # Skipped: udp6 part of test, because no IPv6 support');
common.skip('udp6 part of test, because no IPv6 support');
return;
}

View File

@ -7,7 +7,7 @@ var client;
var timer;
if (process.platform === 'darwin') {
console.log('1..0 # Skipped: because of 17894467 Apple bug');
common.skip('because of 17894467 Apple bug');
return;
}

View File

@ -3,7 +3,7 @@ const common = require('../common');
const dgram = require('dgram');
if (process.platform === 'darwin') {
console.log('1..0 # Skipped: because of 17894467 Apple bug');
common.skip('because of 17894467 Apple bug');
return;
}

View File

@ -5,7 +5,7 @@ const assert = require('assert');
const dgram = require('dgram');
if (!common.hasIPv6) {
console.log('1..0 # Skipped: no IPv6 support');
common.skip('no IPv6 support');
return;
}

View File

@ -1,11 +1,11 @@
'use strict';
require('../common');
const common = require('../common');
var assert = require('assert');
try {
var crypto = require('crypto');
} catch (e) {
console.log('1..0 # Skipped: node compiled without OpenSSL.');
common.skip('node compiled without OpenSSL.');
return;
}

View File

@ -1,14 +1,16 @@
/* eslint-disable required-modules */
'use strict';
const common = require('../common');
try {
var crypto = require('crypto');
} catch (e) {
console.log('1..0 # Skipped: node compiled without OpenSSL.');
common.skip('node compiled without OpenSSL.');
return;
}
// Pollution of global is intentional as part of test.
common.globalCheck = false;
// See https://github.com/nodejs/node/commit/d1eff9ab
global.domain = require('domain');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasFipsCrypto) {
console.log('1..0 # Skipped: node compiled without FIPS OpenSSL.');
common.skip('node compiled without FIPS OpenSSL.');
return;
}

View File

@ -5,7 +5,7 @@ var path = require('path');
var assert = require('assert');
if (!common.isWindows) {
console.log('1..0 # Skipped: this test is Windows-specific.');
common.skip('this test is Windows-specific.');
return;
}

View File

@ -6,7 +6,7 @@ const fs = require('fs');
const assert = require('assert');
if (process.platform !== 'linux') {
console.log('1..0 # Skipped: Test is linux specific.');
common.skip('Test is linux specific.');
return;
}

View File

@ -7,7 +7,7 @@ var path = require('path');
// `fs.readFile('/')` does not fail on FreeBSD, because you can open and read
// the directory there.
if (process.platform === 'freebsd') {
console.log('1..0 # Skipped: platform not supported.');
common.skip('platform not supported.');
return;
}

View File

@ -86,7 +86,7 @@ function test_simple_error_callback(cb) {
function test_simple_relative_symlink(callback) {
console.log('test_simple_relative_symlink');
if (skipSymlinks) {
console.log('1..0 # Skipped: symlink test (no privs)');
common.skip('symlink test (no privs)');
return runNextTest();
}
const entry = common.tmpDir + '/symlink';
@ -135,7 +135,7 @@ function test_simple_absolute_symlink(callback) {
function test_deep_relative_file_symlink(callback) {
console.log('test_deep_relative_file_symlink');
if (skipSymlinks) {
console.log('1..0 # Skipped: symlink test (no privs)');
common.skip('symlink test (no privs)');
return runNextTest();
}
@ -164,7 +164,7 @@ function test_deep_relative_file_symlink(callback) {
function test_deep_relative_dir_symlink(callback) {
console.log('test_deep_relative_dir_symlink');
if (skipSymlinks) {
console.log('1..0 # Skipped: symlink test (no privs)');
common.skip('symlink test (no privs)');
return runNextTest();
}
var expected = path.join(common.fixturesDir, 'cycles', 'folder');
@ -192,7 +192,7 @@ function test_deep_relative_dir_symlink(callback) {
function test_cyclic_link_protection(callback) {
console.log('test_cyclic_link_protection');
if (skipSymlinks) {
console.log('1..0 # Skipped: symlink test (no privs)');
common.skip('symlink test (no privs)');
return runNextTest();
}
var entry = common.tmpDir + '/cycles/realpath-3a';
@ -215,7 +215,7 @@ function test_cyclic_link_protection(callback) {
function test_cyclic_link_overprotection(callback) {
console.log('test_cyclic_link_overprotection');
if (skipSymlinks) {
console.log('1..0 # Skipped: symlink test (no privs)');
common.skip('symlink test (no privs)');
return runNextTest();
}
var cycles = common.tmpDir + '/cycles';
@ -236,7 +236,7 @@ function test_cyclic_link_overprotection(callback) {
function test_relative_input_cwd(callback) {
console.log('test_relative_input_cwd');
if (skipSymlinks) {
console.log('1..0 # Skipped: symlink test (no privs)');
common.skip('symlink test (no privs)');
return runNextTest();
}
@ -275,7 +275,7 @@ function test_deep_symlink_mix(callback) {
if (common.isWindows) {
// This one is a mix of files and directories, and it's quite tricky
// to get the file/dir links sorted out correctly.
console.log('1..0 # Skipped: symlink test (no privs)');
common.skip('symlink test (no privs)');
return runNextTest();
}
@ -362,7 +362,7 @@ assertEqualPath(upone, uponeActual,
function test_up_multiple(cb) {
console.error('test_up_multiple');
if (skipSymlinks) {
console.log('1..0 # Skipped: symlink test (no privs)');
common.skip('symlink test (no privs)');
return runNextTest();
}
function cleanup() {

View File

@ -13,7 +13,7 @@ if (common.isWindows) {
// We'll only try to run symlink test if we have enough privileges.
exec('whoami /priv', function(err, o) {
if (err || o.indexOf('SeCreateSymbolicLinkPrivilege') == -1) {
console.log('1..0 # Skipped: insufficient privileges');
common.skip('insufficient privileges');
return;
}
});

View File

@ -6,7 +6,7 @@ const path = require('path');
const assert = require('assert');
if (common.isFreeBSD) {
console.log('1..0 # Skipped: Test currently not working on FreeBSD');
common.skip('Test currently not working on FreeBSD');
return;
}

View File

@ -3,7 +3,7 @@
const common = require('../common');
if (!(process.platform === 'darwin' || common.isWindows)) {
console.log('1..0 # Skipped: recursive option is darwin/windows specific');
common.skip('recursive option is darwin/windows specific');
return;
}

View File

@ -3,7 +3,7 @@
const common = require('../common');
const assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

View File

@ -18,7 +18,7 @@ let gotHttpResp = false;
if (common.hasCrypto) {
var https = require('https');
} else {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
}
process.on('exit', function() {

View File

@ -7,7 +7,7 @@ var http = require('http');
if (common.hasCrypto) {
var https = require('https');
} else {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
}
var host = '*'.repeat(256);
@ -36,7 +36,7 @@ function test(mod) {
if (common.hasCrypto) {
test(https);
} else {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
}
test(http);

View File

@ -24,7 +24,7 @@ function runAb(opts, callback) {
exec(command, function(err, stdout, stderr) {
if (err) {
if (/ab|apr/mi.test(stderr)) {
console.log('1..0 # Skipped: problem spawning `ab`.\n' + stderr);
common.skip('problem spawning `ab`.\n' + stderr);
process.reallyExit(0);
}
process.exit();

View File

@ -4,7 +4,7 @@ const http = require('http');
const assert = require('assert');
if (!common.hasMultiLocalhost()) {
console.log('1..0 # Skipped: platform-specific test.');
common.skip('platform-specific test.');
return;
}

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -3,7 +3,7 @@ const common = require('../common');
const assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

View File

@ -2,7 +2,7 @@
var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

View File

@ -3,7 +3,7 @@
const common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

View File

@ -3,7 +3,7 @@ const common = require('../common');
const assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
const https = require('https');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
var fs = require('fs');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -6,7 +6,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -6,7 +6,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -3,7 +3,7 @@ const common = require('../common');
const fs = require('fs');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
const https = require('https');

View File

@ -6,7 +6,7 @@ var assert = require('assert');
var http = require('http');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -11,7 +11,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -2,7 +2,7 @@
var common = require('../common');
if (!common.opensslCli) {
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
common.skip('node compiled without OpenSSL CLI.');
return;
}
@ -13,7 +13,7 @@ var fs = require('fs');
var spawn = require('child_process').spawn;
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
var fs = require('fs');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -4,13 +4,13 @@ const fs = require('fs');
const assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');
if (!common.hasMultiLocalhost()) {
console.log('1..0 # Skipped: platform-specific test.');
common.skip('platform-specific test.');
return;
}

View File

@ -4,7 +4,7 @@ var assert = require('assert');
var fs = require('fs');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -6,7 +6,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}
var https = require('https');

View File

@ -2,7 +2,7 @@
const common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
common.skip('missing crypto');
return;
}

Some files were not shown because too many files have changed in this diff Show More