Skip to content

Commit

Permalink
test: formatting skip messages for TAP parsing
Browse files Browse the repository at this point in the history
This patch makes the skip messages consistent so that the TAP plugin
in CI can parse the messages properly. The format will be

    1..0 # Skipped: [Actual reason why the test is skipped]

PR-URL: #2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
  • Loading branch information
thefourtheye committed Jul 20, 2015
1 parent 6b85d5a commit 69298d3
Show file tree
Hide file tree
Showing 47 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-bind-privileged-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var cluster = require('cluster');
var net = require('net');

if (process.platform === 'win32') {
console.log('Skipping test, not reliable on Windows.');
console.log('1..0 # Skipped: not reliable on Windows.');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-disconnect-unshared-udp.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
if (process.platform === 'win32') {
console.log('skipping test on windows, where clustered dgram is ENOTSUP');
console.log('1..0 # Skipped: on windows, because clustered dgram is ENOTSUP');
process.exit(0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ var cluster = require('cluster');
var net = require('net');

if (process.platform === 'win32') {
console.log('Skipping test, not reliable on Windows.');
console.log('1..0 # Skipped: not reliable on Windows');
process.exit(0);
}

if (process.getuid() === 0) {
console.log('Do not run this test as root.');
console.log('1..0 # Skipped: as this test should not be run as `root`');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-authenticated.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ for (var i in TEST_CASES) {
var test = TEST_CASES[i];

if (ciphers.indexOf(test.algo) == -1) {
console.log('skipping unsupported ' + test.algo + ' test');
console.log('1..0 # Skipped: unsupported ' + test.algo + ' test');
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-dgram-bind-default-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dgram.createSocket('udp4').bind(common.PORT + 0, common.mustCall(function() {
}));

if (!common.hasIPv6) {
console.error('Skipping udp6 part of test, no IPv6 support');
console.log('1..0 # Skipped: udp6 part of test, because no IPv6 support');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-dgram-empty-packet.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var client;
var timer;

if (process.platform === 'darwin') {
console.error('Test is disabled due to 17894467 Apple bug');
console.log('1..0 # Skipped: because of 17894467 Apple bug');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-dgram-send-empty-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var callbacks = 0;
var client, timer, buf;

if (process.platform === 'darwin') {
console.error('Test is disabled due to 17894467 Apple bug');
console.log('1..0 # Skipped: because of 17894467 Apple bug');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readfile-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.error('Skipping test, platform not supported.');
console.log('1..0 # Skipped: platform not supported.');
process.exit();
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readfile-pipe-large.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var path = require('path');
// simulate `cat readfile.js | node readfile.js`

if (process.platform === 'win32') {
console.error('No /dev/stdin on windows. Skipping test.');
console.log('1..0 # Skipped: No /dev/stdin on windows.');
process.exit();
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readfile-pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var assert = require('assert');
// simulate `cat readfile.js | node readfile.js`

if (process.platform === 'win32') {
console.error('No /dev/stdin on windows. Skipping test.');
console.log('1..0 # Skipped: No /dev/stdin on windows.');
process.exit();
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readfilesync-pipe-large.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var path = require('path');
// simulate `cat readfile.js | node readfile.js`

if (process.platform === 'win32') {
console.error('No /dev/stdin on windows. Skipping test.');
console.log('1..0 # Skipped: No /dev/stdin on windows.');
process.exit();
}

Expand Down
16 changes: 8 additions & 8 deletions test/parallel/test-fs-realpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function test_simple_error_callback(cb) {
function test_simple_relative_symlink(callback) {
console.log('test_simple_relative_symlink');
if (skipSymlinks) {
console.log('skipping symlink test (no privs)');
console.log('1..0 # Skipped: symlink test (no privs)');
return runNextTest();
}
var entry = common.tmpDir + '/symlink',
Expand Down Expand Up @@ -143,7 +143,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('skipping symlink test (no privs)');
console.log('1..0 # Skipped: symlink test (no privs)');
return runNextTest();
}

Expand Down Expand Up @@ -175,7 +175,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('skipping symlink test (no privs)');
console.log('1..0 # Skipped: symlink test (no privs)');
return runNextTest();
}
var expected = path.join(common.fixturesDir, 'cycles', 'folder');
Expand Down Expand Up @@ -207,7 +207,7 @@ function test_deep_relative_dir_symlink(callback) {
function test_cyclic_link_protection(callback) {
console.log('test_cyclic_link_protection');
if (skipSymlinks) {
console.log('skipping symlink test (no privs)');
console.log('1..0 # Skipped: symlink test (no privs)');
return runNextTest();
}
var entry = common.tmpDir + '/cycles/realpath-3a';
Expand All @@ -230,7 +230,7 @@ function test_cyclic_link_protection(callback) {
function test_cyclic_link_overprotection(callback) {
console.log('test_cyclic_link_overprotection');
if (skipSymlinks) {
console.log('skipping symlink test (no privs)');
console.log('1..0 # Skipped: symlink test (no privs)');
return runNextTest();
}
var cycles = common.tmpDir + '/cycles';
Expand All @@ -251,7 +251,7 @@ function test_cyclic_link_overprotection(callback) {
function test_relative_input_cwd(callback) {
console.log('test_relative_input_cwd');
if (skipSymlinks) {
console.log('skipping symlink test (no privs)');
console.log('1..0 # Skipped: symlink test (no privs)');
return runNextTest();
}

Expand Down Expand Up @@ -295,7 +295,7 @@ function test_deep_symlink_mix(callback) {
if (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('skipping symlink test (no way to work on windows)');
console.log('1..0 # Skipped: symlink test (no privs)');
return runNextTest();
}

Expand Down Expand Up @@ -391,7 +391,7 @@ assert.equal(upone, uponeActual,
function test_up_multiple(cb) {
console.error('test_up_multiple');
if (skipSymlinks) {
console.log('skipping symlink test (no privs)');
console.log('1..0 # Skipped: symlink test (no privs)');
return runNextTest();
}
function cleanup() {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-curl-chunk-problem.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var common = require('../common');
var assert = require('assert');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-full-response.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function runAb(opts, callback) {
exec(command, function(err, stdout, stderr) {
if (err) {
if (/ab|apr/mi.test(stderr)) {
console.log('problem spawning ab - skipping test.\n' + stderr);
console.log('1..0 # Skipped: problem spawning `ab`.\n' + stderr);
process.reallyExit(0);
}
process.exit();
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-localaddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var http = require('http'),
assert = require('assert');

if (!common.hasMultiLocalhost()) {
console.log('Skipping platform-specific test.');
console.log('1..0 # Skipped: platform-specific test.');
process.exit();
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-https-foafssl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var common = require('../common');

if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-https-localaddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (!common.hasCrypto) {
var https = require('https');

if (!common.hasMultiLocalhost()) {
console.log('Skipping platform-specific test.');
console.log('1..0 # Skipped: platform-specific test.');
process.exit();
}

Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-intl.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (!haveIntl) {
'"Intl" object is NOT present but v8_enable_i18n_support is ' +
enablei18n;
assert.equal(enablei18n, false, erMsg);
console.log('Skipping Intl tests because Intl object not present.');
console.log('1..0 # Skipped: Intl tests because Intl object not present.');

} else {
var erMsg =
Expand All @@ -46,8 +46,8 @@ if (!haveIntl) {

// If list is specified and doesn't contain 'en' then return.
if (process.config.variables.icu_locales && !haveLocale('en')) {
console.log('Skipping detailed Intl tests because English is not listed ' +
'as supported.');
console.log('1..0 # Skipped: detailed Intl tests because English is not ' +
'listed as supported.');
// Smoke test. Does it format anything, or fail?
console.log('Date(0) formatted to: ' + dtf.format(date0));
return;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-listen-fd-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var cluster = require('cluster');
console.error('Cluster listen fd test', process.argv.slice(2));

if (process.platform === 'win32') {
console.error('This test is disabled on windows.');
console.log('1..0 # Skipped: This test is disabled on windows.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-listen-fd-detached-inherit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var PORT = common.PORT;
var spawn = require('child_process').spawn;

if (process.platform === 'win32') {
console.error('This test is disabled on windows.');
console.log('1..0 # Skipped: This test is disabled on windows.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-listen-fd-detached.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var PORT = common.PORT;
var spawn = require('child_process').spawn;

if (process.platform === 'win32') {
console.error('This test is disabled on windows.');
console.log('1..0 # Skipped: This test is disabled on windows.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-listen-fd-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var PORT = common.PORT;
var spawn = require('child_process').spawn;

if (process.platform === 'win32') {
console.error('This test is disabled on windows.');
console.log('1..0 # Skipped: This test is disabled on windows.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-module-loading-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var error_desc = {
var dlerror_msg = error_desc[process.platform];

if (!dlerror_msg) {
console.error('Skipping test, platform not supported.');
console.log('1..0 # Skipped: platform not supported.');
process.exit();
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-net-connect-options-ipv6.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var net = require('net');
var dns = require('dns');

if (!common.hasIPv6) {
console.error('Skipping test, no IPv6 support');
console.log('1..0 # Skipped: no IPv6 support');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-process-getgroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var assert = require('assert');
var exec = require('child_process').exec;

if (process.platform === 'darwin') {
console.log('Skipping. Output of `id -G` is unreliable on Darwin.');
console.log('1..0 # Skipped: Output of `id -G` is unreliable on Darwin.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-stdio-closed.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var assert = require('assert');
var spawn = require('child_process').spawn;

if (process.platform === 'win32') {
console.log('Skipping test, platform not supported.');
console.log('1..0 # Skipped: platform not supported.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-alert-handling.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');

if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');

if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-no-sslv3.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var fs = require('fs');
var spawn = require('child_process').spawn;

if (common.opensslCli === false) {
console.error('Skipping because openssl command cannot be executed');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-npn-server-client.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
if (!process.features.tls_npn) {
console.error('Skipping because node compiled without OpenSSL or ' +
'with old OpenSSL version.');
console.log('1..0 # Skipped: node compiled without OpenSSL or ' +
'with old OpenSSL version.');
process.exit(0);
}

Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-tls-ocsp-callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
var common = require('../common');

if (!process.features.tls_ocsp) {
console.error('Skipping because node compiled without OpenSSL or ' +
'with old OpenSSL version.');
console.log('1..0 # Skipped: node compiled without OpenSSL or ' +
'with old OpenSSL version.');
process.exit(0);
}
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-server-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var common = require('../common');

if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-session-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var common = require('../common');

if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-set-ciphers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var common = require('../common');

if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
}

Expand Down
Loading

0 comments on commit 69298d3

Please sign in to comment.