Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix messages and use return to skip tests #2290

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/disabled/tls_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(See also)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

return;
}
var i = 0;
var server = net.createServer(function(connection) {
Expand Down
5 changes: 3 additions & 2 deletions test/parallel/test-child-process-fork-dgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-cluster-bind-privileged-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions test/parallel/test-cluster-dgram-1.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions test/parallel/test-cluster-dgram-2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions test/parallel/test-cluster-http-pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-dh-padding.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: Not compiled with OPENSSL support.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make sure the messages are consistent? :D

return;
}

var prime = 'c51f7bf8f0e1cf899243cdf408b1bc7c09c010e33ef7f3fbe5bd5feaf906113b';
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-domain-crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: Not compiled with OPENSSL support.');
return;
}

// the missing var keyword is intentional
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-process-remove-all-signal-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-signal-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-npn-server-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-ocsp-callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-sni-option.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-sni-server-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
4 changes: 2 additions & 2 deletions test/pummel/test-crypto-dh.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: Not compiled with OPENSSL support.');
return;
}

assert.throws(function() {
Expand Down
3 changes: 2 additions & 1 deletion test/sequential/test-regress-GH-3542.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down