summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-08-02 19:36:43 +0530
committerSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-08-03 21:32:48 +0530
commit80a1cf742599ef52235171e2e32f615b6b611007 (patch)
treec532b446b32f143ecc9eb31915ecf80a28c73181 /test
parent9bac1dbae90050624ef091d54f014ac4b3718a9c (diff)
downloadandroid-node-v8-80a1cf742599ef52235171e2e32f615b6b611007.tar.gz
android-node-v8-80a1cf742599ef52235171e2e32f615b6b611007.tar.bz2
android-node-v8-80a1cf742599ef52235171e2e32f615b6b611007.zip
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>
Diffstat (limited to 'test')
-rw-r--r--test/disabled/tls_server.js4
-rw-r--r--test/parallel/test-child-process-fork-dgram.js5
-rw-r--r--test/parallel/test-cluster-bind-privileged-port.js4
-rw-r--r--test/parallel/test-cluster-dgram-1.js5
-rw-r--r--test/parallel/test-cluster-dgram-2.js5
-rw-r--r--test/parallel/test-cluster-http-pipe.js5
-rw-r--r--test/parallel/test-dh-padding.js4
-rw-r--r--test/parallel/test-domain-crypto.js4
-rw-r--r--test/parallel/test-process-remove-all-signal-listeners.js4
-rw-r--r--test/parallel/test-signal-handler.js4
-rw-r--r--test/parallel/test-tls-npn-server-client.js2
-rw-r--r--test/parallel/test-tls-ocsp-callback.js2
-rw-r--r--test/parallel/test-tls-sni-option.js2
-rw-r--r--test/parallel/test-tls-sni-server-client.js2
-rw-r--r--test/pummel/test-crypto-dh.js4
-rw-r--r--test/sequential/test-regress-GH-3542.js3
16 files changed, 32 insertions, 27 deletions
diff --git a/test/disabled/tls_server.js b/test/disabled/tls_server.js
index b3f43b564d..cc381a61c3 100644
--- a/test/disabled/tls_server.js
+++ b/test/disabled/tls_server.js
@@ -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) {
diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js
index 8676481a17..f700960490 100644
--- a/test/parallel/test-child-process-fork-dgram.js
+++ b/test/parallel/test-child-process-fork-dgram.js
@@ -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') {
diff --git a/test/parallel/test-cluster-bind-privileged-port.js b/test/parallel/test-cluster-bind-privileged-port.js
index 0e1e7e244c..d173762575 100644
--- a/test/parallel/test-cluster-bind-privileged-port.js
+++ b/test/parallel/test-cluster-bind-privileged-port.js
@@ -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) {
diff --git a/test/parallel/test-cluster-dgram-1.js b/test/parallel/test-cluster-dgram-1.js
index b0db72b129..9404c55f2b 100644
--- a/test/parallel/test-cluster-dgram-1.js
+++ b/test/parallel/test-cluster-dgram-1.js
@@ -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)
diff --git a/test/parallel/test-cluster-dgram-2.js b/test/parallel/test-cluster-dgram-2.js
index 016a836227..0253cafcf4 100644
--- a/test/parallel/test-cluster-dgram-2.js
+++ b/test/parallel/test-cluster-dgram-2.js
@@ -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)
diff --git a/test/parallel/test-cluster-http-pipe.js b/test/parallel/test-cluster-http-pipe.js
index 2a968f5645..4c6dee347b 100644
--- a/test/parallel/test-cluster-http-pipe.js
+++ b/test/parallel/test-cluster-http-pipe.js
@@ -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) {
diff --git a/test/parallel/test-dh-padding.js b/test/parallel/test-dh-padding.js
index 8726537632..ef6ea0fd4d 100644
--- a/test/parallel/test-dh-padding.js
+++ b/test/parallel/test-dh-padding.js
@@ -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';
diff --git a/test/parallel/test-domain-crypto.js b/test/parallel/test-domain-crypto.js
index 9604747495..00de1aee27 100644
--- a/test/parallel/test-domain-crypto.js
+++ b/test/parallel/test-domain-crypto.js
@@ -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
diff --git a/test/parallel/test-process-remove-all-signal-listeners.js b/test/parallel/test-process-remove-all-signal-listeners.js
index 460f8f0365..59c2ae926b 100644
--- a/test/parallel/test-process-remove-all-signal-listeners.js
+++ b/test/parallel/test-process-remove-all-signal-listeners.js
@@ -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;
}
diff --git a/test/parallel/test-signal-handler.js b/test/parallel/test-signal-handler.js
index a6e9adab3f..bcd8256272 100644
--- a/test/parallel/test-signal-handler.js
+++ b/test/parallel/test-signal-handler.js
@@ -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);
diff --git a/test/parallel/test-tls-npn-server-client.js b/test/parallel/test-tls-npn-server-client.js
index bdccaaf17e..0a0453633a 100644
--- a/test/parallel/test-tls-npn-server-client.js
+++ b/test/parallel/test-tls-npn-server-client.js
@@ -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'),
diff --git a/test/parallel/test-tls-ocsp-callback.js b/test/parallel/test-tls-ocsp-callback.js
index 2dbfc6c164..d970b2ab01 100644
--- a/test/parallel/test-tls-ocsp-callback.js
+++ b/test/parallel/test-tls-ocsp-callback.js
@@ -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.');
diff --git a/test/parallel/test-tls-sni-option.js b/test/parallel/test-tls-sni-option.js
index 92c5aadfcb..8ebc0c3af4 100644
--- a/test/parallel/test-tls-sni-option.js
+++ b/test/parallel/test-tls-sni-option.js
@@ -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'),
diff --git a/test/parallel/test-tls-sni-server-client.js b/test/parallel/test-tls-sni-server-client.js
index 5a1894cd6e..bad5e10878 100644
--- a/test/parallel/test-tls-sni-server-client.js
+++ b/test/parallel/test-tls-sni-server-client.js
@@ -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'),
diff --git a/test/pummel/test-crypto-dh.js b/test/pummel/test-crypto-dh.js
index 5588cdb708..a223e45c86 100644
--- a/test/pummel/test-crypto-dh.js
+++ b/test/pummel/test-crypto-dh.js
@@ -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() {
diff --git a/test/sequential/test-regress-GH-3542.js b/test/sequential/test-regress-GH-3542.js
index dee24c79fb..2025645ae7 100644
--- a/test/sequential/test-regress-GH-3542.js
+++ b/test/sequential/test-regress-GH-3542.js
@@ -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) {