mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: fix messages and use return to skip tests
This is a followup of https://github.com/nodejs/io.js/pull/2109. The tests which didn't make it in #2109, are included in this patch. The skip messages are supposed to follow the format 1..0 # Skipped: [Actual reason why the test is skipped] and the tests should be skipped with the return statement. PR-URL: https://github.com/nodejs/io.js/pull/2290 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
This commit is contained in:
@@ -13,8 +13,8 @@ var certPem = fs.readFileSync(common.fixturesDir + '/cert.pem');
|
||||
try {
|
||||
var credentials = crypto.createCredentials({key: keyPem, cert: certPem});
|
||||
} catch (e) {
|
||||
console.log('Not compiled with OPENSSL support.');
|
||||
process.exit();
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL.');
|
||||
return;
|
||||
}
|
||||
var i = 0;
|
||||
var server = net.createServer(function(connection) {
|
||||
|
||||
@@ -19,8 +19,9 @@ var assert = require('assert');
|
||||
var common = require('../common');
|
||||
|
||||
if (common.isWindows) {
|
||||
console.error('Sending dgram sockets to child processes not supported');
|
||||
process.exit(0);
|
||||
console.log('1..0 # Skipped: Sending dgram sockets to child processes is ' +
|
||||
'not supported');
|
||||
return;
|
||||
}
|
||||
|
||||
if (process.argv[2] === 'child') {
|
||||
|
||||
@@ -10,8 +10,8 @@ if (common.isWindows) {
|
||||
}
|
||||
|
||||
if (process.getuid() === 0) {
|
||||
console.log('Do not run this test as root.');
|
||||
process.exit(0);
|
||||
console.log('1..0 # Skipped: Test is not supposed to be run as root.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (cluster.isMaster) {
|
||||
|
||||
@@ -9,8 +9,9 @@ var dgram = require('dgram');
|
||||
|
||||
|
||||
if (common.isWindows) {
|
||||
console.warn('dgram clustering is currently not supported on windows.');
|
||||
process.exit(0);
|
||||
console.log('1..0 # Skipped: dgram clustering is currently not supported ' +
|
||||
'on windows.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (cluster.isMaster)
|
||||
|
||||
@@ -9,8 +9,9 @@ var dgram = require('dgram');
|
||||
|
||||
|
||||
if (common.isWindows) {
|
||||
console.warn('dgram clustering is currently not supported on windows.');
|
||||
process.exit(0);
|
||||
console.log('1..0 # Skipped: dgram clustering is currently not supported ' +
|
||||
'on windows.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (cluster.isMaster)
|
||||
|
||||
@@ -5,9 +5,10 @@ const assert = require('assert');
|
||||
const cluster = require('cluster');
|
||||
const http = require('http');
|
||||
|
||||
// It is not possible to send pipe handles over the IPC pipe on Windows.
|
||||
if (common.isWindows) {
|
||||
process.exit(0);
|
||||
console.log('1..0 # Skipped: It is not possible to send pipe handles over ' +
|
||||
'the IPC pipe on Windows');
|
||||
return;
|
||||
}
|
||||
|
||||
if (cluster.isMaster) {
|
||||
|
||||
@@ -5,8 +5,8 @@ var assert = require('assert');
|
||||
try {
|
||||
var crypto = require('crypto');
|
||||
} catch (e) {
|
||||
console.log('Not compiled with OPENSSL support.');
|
||||
process.exit();
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL.');
|
||||
return;
|
||||
}
|
||||
|
||||
var prime = 'c51f7bf8f0e1cf899243cdf408b1bc7c09c010e33ef7f3fbe5bd5feaf906113b';
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
try {
|
||||
var crypto = require('crypto');
|
||||
} catch (e) {
|
||||
console.log('Not compiled with OPENSSL support.');
|
||||
process.exit();
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL.');
|
||||
return;
|
||||
}
|
||||
|
||||
// the missing var keyword is intentional
|
||||
|
||||
@@ -5,8 +5,8 @@ const spawn = require('child_process').spawn;
|
||||
const common = require('../common');
|
||||
|
||||
if (common.isWindows) {
|
||||
// Win32 doesn't have signals, just a kindof emulation, insufficient
|
||||
// for this test to apply.
|
||||
console.log('1..0 # Skipped: Win32 doesn\'t have signals, just a kind of ' +
|
||||
'emulation, insufficient for this test to apply.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
// SIGUSR1 and SIGHUP are not supported on Windows
|
||||
if (common.isWindows) {
|
||||
process.exit(0);
|
||||
console.log('1..0 # Skipped: SIGUSR1 and SIGHUP signals are not supported');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('process.pid: ' + process.pid);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if (!process.features.tls_npn) {
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL or ' +
|
||||
'with old OpenSSL version.');
|
||||
process.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
var common = require('../common'),
|
||||
|
||||
@@ -4,7 +4,7 @@ var common = require('../common');
|
||||
if (!process.features.tls_ocsp) {
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL or ' +
|
||||
'with old OpenSSL version.');
|
||||
process.exit(0);
|
||||
return;
|
||||
}
|
||||
if (!common.opensslCli) {
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if (!process.features.tls_sni) {
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL or ' +
|
||||
'with old OpenSSL version.');
|
||||
process.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
var common = require('../common'),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if (!process.features.tls_sni) {
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL or ' +
|
||||
'with old OpenSSL version.');
|
||||
process.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
var common = require('../common'),
|
||||
|
||||
@@ -5,8 +5,8 @@ var assert = require('assert');
|
||||
try {
|
||||
var crypto = require('crypto');
|
||||
} catch (e) {
|
||||
console.log('Not compiled with OPENSSL support.');
|
||||
process.exit();
|
||||
console.log('1..0 # Skipped: node compiled without OpenSSL.');
|
||||
return;
|
||||
}
|
||||
|
||||
assert.throws(function() {
|
||||
|
||||
@@ -7,7 +7,8 @@ var common = require('../common'),
|
||||
|
||||
// This test is only relevant on Windows.
|
||||
if (!common.isWindows) {
|
||||
return process.exit(0);
|
||||
console.log('1..0 # Skipped: Windows specific test.');
|
||||
return;
|
||||
}
|
||||
|
||||
function test(p) {
|
||||
|
||||
Reference in New Issue
Block a user