From 52bae222a3a8480b2b30d8dc4629b64a284410d4 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Wed, 11 May 2016 15:34:52 -0400 Subject: [PATCH] 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 Reviewed-By: Santiago Gimeno Reviewed-By: Fedor Indutny --- .../test-stringbytes-external-at-max.js | 9 ++++----- ...stringbytes-external-exceed-max-by-1-ascii.js | 9 ++++----- ...tringbytes-external-exceed-max-by-1-base64.js | 9 ++++----- ...tringbytes-external-exceed-max-by-1-binary.js | 9 ++++----- ...t-stringbytes-external-exceed-max-by-1-hex.js | 9 ++++----- ...-stringbytes-external-exceed-max-by-1-utf8.js | 9 ++++----- .../test-stringbytes-external-exceed-max-by-2.js | 9 ++++----- .../test-stringbytes-external-exceed-max.js | 9 ++++----- test/common.js | 3 +++ test/disabled/tls_server.js | 2 +- .../test-dgram-broadcast-multi-process.js | 2 +- .../test-dgram-multicast-multi-process.js | 2 +- test/internet/test-dns-ipv6.js | 2 +- test/internet/test-http-https-default-ports.js | 2 +- test/internet/test-tls-connnect-cnnic.js | 2 +- test/internet/test-tls-connnect-melissadata.js | 2 +- test/internet/test-tls-reuse-host-from-socket.js | 2 +- test/parallel/test-buffer-alloc.js | 2 +- test/parallel/test-buffer.js | 2 +- test/parallel/test-child-process-fork-dgram.js | 2 +- .../test-cluster-bind-privileged-port.js | 4 ++-- test/parallel/test-cluster-dgram-1.js | 2 +- test/parallel/test-cluster-dgram-2.js | 2 +- test/parallel/test-cluster-dgram-reuse.js | 2 +- test/parallel/test-cluster-disconnect-handles.js | 2 +- test/parallel/test-cluster-disconnect-race.js | 2 +- .../test-cluster-disconnect-unshared-udp.js | 2 +- test/parallel/test-cluster-http-pipe.js | 2 +- ...cluster-shared-handle-bind-privileged-port.js | 4 ++-- test/parallel/test-crypto-authenticated.js | 4 ++-- test/parallel/test-crypto-binary-default.js | 2 +- test/parallel/test-crypto-certificate.js | 2 +- test/parallel/test-crypto-cipher-decipher.js | 4 ++-- test/parallel/test-crypto-cipheriv-decipheriv.js | 2 +- test/parallel/test-crypto-deprecated.js | 2 +- test/parallel/test-crypto-dh-odd-key.js | 2 +- test/parallel/test-crypto-dh.js | 2 +- test/parallel/test-crypto-domain.js | 2 +- test/parallel/test-crypto-domains.js | 2 +- test/parallel/test-crypto-ecb.js | 4 ++-- test/parallel/test-crypto-fips.js | 2 +- test/parallel/test-crypto-from-binary.js | 2 +- test/parallel/test-crypto-hash-stream-pipe.js | 2 +- test/parallel/test-crypto-hash.js | 2 +- test/parallel/test-crypto-hmac.js | 2 +- test/parallel/test-crypto-padding-aes256.js | 2 +- test/parallel/test-crypto-padding.js | 2 +- test/parallel/test-crypto-pbkdf2.js | 2 +- test/parallel/test-crypto-random.js | 2 +- test/parallel/test-crypto-rsa-dsa.js | 2 +- test/parallel/test-crypto-sign-verify.js | 2 +- test/parallel/test-crypto-stream.js | 2 +- test/parallel/test-crypto-verify-failure.js | 2 +- test/parallel/test-crypto.js | 2 +- test/parallel/test-cwd-enoent-preload.js | 2 +- test/parallel/test-cwd-enoent-repl.js | 2 +- test/parallel/test-cwd-enoent.js | 2 +- test/parallel/test-dgram-bind-default-address.js | 4 ++-- test/parallel/test-dgram-empty-packet.js | 2 +- test/parallel/test-dgram-send-empty-buffer.js | 2 +- .../test-dgram-udp6-send-default-host.js | 2 +- test/parallel/test-dh-padding.js | 4 ++-- test/parallel/test-domain-crypto.js | 6 ++++-- test/parallel/test-dsa-fips-invalid-key.js | 2 +- test/parallel/test-fs-long-path.js | 2 +- test/parallel/test-fs-readdir-ucs2.js | 2 +- test/parallel/test-fs-readfile-error.js | 2 +- test/parallel/test-fs-realpath.js | 16 ++++++++-------- test/parallel/test-fs-symlink.js | 2 +- test/parallel/test-fs-watch-encoding.js | 2 +- test/parallel/test-fs-watch-recursive.js | 2 +- test/parallel/test-http-chunk-problem.js | 2 +- test/parallel/test-http-default-port.js | 2 +- test/parallel/test-http-dns-error.js | 4 ++-- test/parallel/test-http-full-response.js | 2 +- test/parallel/test-http-localaddress.js | 2 +- .../test-http-url.parse-https.request.js | 2 +- .../test-https-agent-disable-session-reuse.js | 2 +- test/parallel/test-https-agent-servername.js | 2 +- .../test-https-agent-session-eviction.js | 2 +- test/parallel/test-https-agent-session-reuse.js | 2 +- test/parallel/test-https-agent-sni.js | 2 +- test/parallel/test-https-agent.js | 2 +- test/parallel/test-https-byteswritten.js | 2 +- .../test-https-client-checkServerIdentity.js | 2 +- test/parallel/test-https-client-get-url.js | 2 +- test/parallel/test-https-client-reject.js | 2 +- test/parallel/test-https-client-resume.js | 2 +- test/parallel/test-https-close.js | 2 +- test/parallel/test-https-connecting-to-http.js | 2 +- test/parallel/test-https-drain.js | 2 +- test/parallel/test-https-eof-for-eom.js | 2 +- test/parallel/test-https-foafssl.js | 4 ++-- test/parallel/test-https-host-headers.js | 2 +- .../test-https-localaddress-bind-error.js | 2 +- test/parallel/test-https-localaddress.js | 4 ++-- test/parallel/test-https-pfx.js | 2 +- test/parallel/test-https-req-split.js | 2 +- test/parallel/test-https-set-timeout-server.js | 2 +- test/parallel/test-https-simple.js | 2 +- test/parallel/test-https-socket-options.js | 2 +- test/parallel/test-https-strict.js | 2 +- test/parallel/test-https-timeout-server-2.js | 2 +- test/parallel/test-https-timeout-server.js | 2 +- test/parallel/test-https-timeout.js | 2 +- test/parallel/test-https-truncate.js | 2 +- test/parallel/test-intl-v8BreakIterator.js | 4 ++-- test/parallel/test-intl.js | 6 +++--- test/parallel/test-listen-fd-cluster.js | 2 +- test/parallel/test-listen-fd-detached-inherit.js | 2 +- test/parallel/test-listen-fd-detached.js | 2 +- test/parallel/test-listen-fd-server.js | 2 +- test/parallel/test-module-loading-error.js | 4 ++-- test/parallel/test-net-connect-options-ipv6.js | 4 ++-- test/parallel/test-net-socket-local-address.js | 2 +- test/parallel/test-preload.js | 2 +- test/parallel/test-process-getgroups.js | 4 ++-- .../test-process-remove-all-signal-listeners.js | 2 +- test/parallel/test-regress-GH-1531.js | 2 +- test/parallel/test-regress-GH-3542.js | 2 +- test/parallel/test-repl-history-perm.js | 2 +- test/parallel/test-require-long-path.js | 2 +- test/parallel/test-signal-handler.js | 2 +- test/parallel/test-spawn-cmd-named-pipe.js | 2 +- test/parallel/test-stdio-closed.js | 2 +- test/parallel/test-stream2-unpipe-drain.js | 2 +- test/parallel/test-tick-processor.js | 4 ++-- test/parallel/test-tls-0-dns-altname.js | 2 +- test/parallel/test-tls-alert-handling.js | 4 ++-- test/parallel/test-tls-alert.js | 4 ++-- test/parallel/test-tls-alpn-server-client.js | 2 +- .../test-tls-async-cb-after-socket-end.js | 2 +- test/parallel/test-tls-cert-regression.js | 2 +- test/parallel/test-tls-check-server-identity.js | 2 +- test/parallel/test-tls-cipher-list.js | 2 +- test/parallel/test-tls-client-abort.js | 2 +- test/parallel/test-tls-client-abort2.js | 2 +- test/parallel/test-tls-client-default-ciphers.js | 2 +- test/parallel/test-tls-client-destroy-soon.js | 2 +- .../test-tls-client-getephemeralkeyinfo.js | 2 +- test/parallel/test-tls-client-mindhsize.js | 2 +- test/parallel/test-tls-client-reject.js | 2 +- test/parallel/test-tls-client-resume.js | 2 +- test/parallel/test-tls-client-verify.js | 2 +- test/parallel/test-tls-close-error.js | 2 +- test/parallel/test-tls-close-notify.js | 2 +- test/parallel/test-tls-cnnic-whitelist.js | 2 +- test/parallel/test-tls-connect-given-socket.js | 2 +- test/parallel/test-tls-connect-no-host.js | 2 +- test/parallel/test-tls-connect-pipe.js | 2 +- test/parallel/test-tls-connect-secure-context.js | 2 +- test/parallel/test-tls-connect-simple.js | 2 +- test/parallel/test-tls-connect.js | 2 +- test/parallel/test-tls-delayed-attach-error.js | 2 +- test/parallel/test-tls-delayed-attach.js | 2 +- test/parallel/test-tls-destroy-whilst-write.js | 2 +- test/parallel/test-tls-dhe.js | 2 +- test/parallel/test-tls-ecdh-disable.js | 2 +- test/parallel/test-tls-ecdh.js | 2 +- test/parallel/test-tls-econnreset.js | 2 +- test/parallel/test-tls-external-accessor.js | 2 +- test/parallel/test-tls-fast-writing.js | 2 +- test/parallel/test-tls-friendly-error-message.js | 2 +- test/parallel/test-tls-getcipher.js | 2 +- test/parallel/test-tls-getprotocol.js | 2 +- test/parallel/test-tls-handshake-error.js | 2 +- test/parallel/test-tls-handshake-nohang.js | 2 +- test/parallel/test-tls-hello-parser-failure.js | 2 +- test/parallel/test-tls-honorcipherorder.js | 2 +- test/parallel/test-tls-inception.js | 2 +- test/parallel/test-tls-interleave.js | 2 +- test/parallel/test-tls-invoke-queued.js | 2 +- test/parallel/test-tls-js-stream.js | 2 +- test/parallel/test-tls-junk-closes-server.js | 2 +- test/parallel/test-tls-junk-server.js | 2 +- test/parallel/test-tls-key-mismatch.js | 2 +- test/parallel/test-tls-legacy-onselect.js | 2 +- test/parallel/test-tls-max-send-fragment.js | 2 +- test/parallel/test-tls-multi-key.js | 2 +- test/parallel/test-tls-no-cert-required.js | 2 +- test/parallel/test-tls-no-rsa-key.js | 2 +- test/parallel/test-tls-no-sslv23.js | 2 +- test/parallel/test-tls-no-sslv3.js | 6 +++--- test/parallel/test-tls-npn-server-client.js | 4 ++-- test/parallel/test-tls-ocsp-callback.js | 6 +++--- test/parallel/test-tls-on-empty-socket.js | 2 +- test/parallel/test-tls-over-http-tunnel.js | 2 +- test/parallel/test-tls-passphrase.js | 2 +- test/parallel/test-tls-pause.js | 2 +- .../test-tls-peer-certificate-encoding.js | 2 +- .../test-tls-peer-certificate-multi-keys.js | 2 +- test/parallel/test-tls-peer-certificate.js | 2 +- test/parallel/test-tls-pfx-gh-5100-regr.js | 2 +- test/parallel/test-tls-regr-gh-5108.js | 2 +- test/parallel/test-tls-request-timeout.js | 2 +- test/parallel/test-tls-securepair-server.js | 2 +- .../test-tls-server-connection-server.js | 2 +- test/parallel/test-tls-server-verify.js | 4 ++-- test/parallel/test-tls-session-cache.js | 4 ++-- test/parallel/test-tls-set-ciphers.js | 4 ++-- test/parallel/test-tls-set-encoding.js | 2 +- test/parallel/test-tls-sni-option.js | 4 ++-- test/parallel/test-tls-sni-server-client.js | 4 ++-- test/parallel/test-tls-socket-default-options.js | 2 +- test/parallel/test-tls-ticket-cluster.js | 2 +- test/parallel/test-tls-ticket.js | 2 +- test/parallel/test-tls-timeout-server-2.js | 2 +- test/parallel/test-tls-timeout-server.js | 2 +- test/parallel/test-tls-wrap-timeout.js | 2 +- test/parallel/test-tls-zero-clear-in.js | 2 +- test/parallel/test-tty-wrap.js | 4 ++-- test/parallel/test-zlib-random-byte-pipes.js | 2 +- test/pummel/test-abort-fatal-error.js | 2 +- test/pummel/test-crypto-dh.js | 2 +- test/pummel/test-dh-regr.js | 2 +- test/pummel/test-dtrace-jsstack.js | 5 ++--- test/pummel/test-https-ci-reneg-attack.js | 4 ++-- test/pummel/test-https-large-response.js | 2 +- test/pummel/test-https-no-reader.js | 2 +- test/pummel/test-keep-alive.js | 2 +- test/pummel/test-regress-GH-892.js | 2 +- test/pummel/test-tls-ci-reneg-attack.js | 4 ++-- test/pummel/test-tls-connect-memleak.js | 2 +- test/pummel/test-tls-securepair-client.js | 4 ++-- test/pummel/test-tls-server-large-request.js | 2 +- test/pummel/test-tls-session-timeout.js | 4 ++-- test/pummel/test-tls-throttle.js | 2 +- test/sequential/test-child-process-emfile.js | 2 +- test/sequential/test-net-server-address.js | 2 +- 229 files changed, 300 insertions(+), 304 deletions(-) diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js index 9903d6787acf1a..867aedf0f67239 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js @@ -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; } diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js index 1a636a5c7f6578..0fc21d610239b2 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js @@ -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; } diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js index 82268bc5cde76e..53639a9f17531c 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js @@ -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; } diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js index 4cd4ca9dd93d04..04e4ad9f93c4e2 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js @@ -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; } diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js index f339f1ad5c097d..ccbe7233410599 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js @@ -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; } diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js index 5337836e2f4530..e20e0f5d191ae7 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js @@ -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; } diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js index 957a8f464f6665..abe0ac5731e141 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js @@ -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; } diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js index 38a2edff257f56..5cc4a49df75ba2 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js @@ -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; } diff --git a/test/common.js b/test/common.js index ffd1ba1366f15f..8d15b0408be788 100644 --- a/test/common.js +++ b/test/common.js @@ -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() { diff --git a/test/disabled/tls_server.js b/test/disabled/tls_server.js index cc381a61c31dfd..14e48f6b31a50f 100644 --- a/test/disabled/tls_server.js +++ b/test/disabled/tls_server.js @@ -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; diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js index d7e7f819ae2696..21133f2956da16 100644 --- a/test/internet/test-dgram-broadcast-multi-process.js +++ b/test/internet/test-dgram-broadcast-multi-process.js @@ -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; } diff --git a/test/internet/test-dgram-multicast-multi-process.js b/test/internet/test-dgram-multicast-multi-process.js index b2bed3a4bda0d0..307549bba870b6 100644 --- a/test/internet/test-dgram-multicast-multi-process.js +++ b/test/internet/test-dgram-multicast-multi-process.js @@ -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; } diff --git a/test/internet/test-dns-ipv6.js b/test/internet/test-dns-ipv6.js index 38a5c3bf735175..2929361f16ecc8 100644 --- a/test/internet/test-dns-ipv6.js +++ b/test/internet/test-dns-ipv6.js @@ -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; } diff --git a/test/internet/test-http-https-default-ports.js b/test/internet/test-http-https-default-ports.js index dbc50c650332e1..33d5436733f545 100644 --- a/test/internet/test-http-https-default-ports.js +++ b/test/internet/test-http-https-default-ports.js @@ -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'); diff --git a/test/internet/test-tls-connnect-cnnic.js b/test/internet/test-tls-connnect-cnnic.js index 01e15340c99dfb..038e23d2374584 100644 --- a/test/internet/test-tls-connnect-cnnic.js +++ b/test/internet/test-tls-connnect-cnnic.js @@ -10,7 +10,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/internet/test-tls-connnect-melissadata.js b/test/internet/test-tls-connnect-melissadata.js index 36795f3553050c..7ab7f2aa7a7895 100644 --- a/test/internet/test-tls-connnect-melissadata.js +++ b/test/internet/test-tls-connnect-melissadata.js @@ -4,7 +4,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/internet/test-tls-reuse-host-from-socket.js b/test/internet/test-tls-reuse-host-from-socket.js index 2ba6b5c816cb2f..8c438f573c21d7 100644 --- a/test/internet/test-tls-reuse-host-from-socket.js +++ b/test/internet/test-tls-reuse-host-from-socket.js @@ -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'); diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js index f7556da5af049a..0f06393d6a5aaa 100644 --- a/test/parallel/test-buffer-alloc.js +++ b/test/parallel/test-buffer-alloc.js @@ -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 diff --git a/test/parallel/test-buffer.js b/test/parallel/test-buffer.js index 7fc11fc8d555a3..62fd488efe525e 100644 --- a/test/parallel/test-buffer.js +++ b/test/parallel/test-buffer.js @@ -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 diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js index f440d9b197ee60..859a550a341498 100644 --- a/test/parallel/test-child-process-fork-dgram.js +++ b/test/parallel/test-child-process-fork-dgram.js @@ -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; } diff --git a/test/parallel/test-cluster-bind-privileged-port.js b/test/parallel/test-cluster-bind-privileged-port.js index 56449eaaf2e02f..9f4ef8ee5e8b81 100644 --- a/test/parallel/test-cluster-bind-privileged-port.js +++ b/test/parallel/test-cluster-bind-privileged-port.js @@ -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; } diff --git a/test/parallel/test-cluster-dgram-1.js b/test/parallel/test-cluster-dgram-1.js index de9c1ef3927c9f..c0d9418528d5c1 100644 --- a/test/parallel/test-cluster-dgram-1.js +++ b/test/parallel/test-cluster-dgram-1.js @@ -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; } diff --git a/test/parallel/test-cluster-dgram-2.js b/test/parallel/test-cluster-dgram-2.js index 6825817f588ce9..f152c2342da6c0 100644 --- a/test/parallel/test-cluster-dgram-2.js +++ b/test/parallel/test-cluster-dgram-2.js @@ -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; } diff --git a/test/parallel/test-cluster-dgram-reuse.js b/test/parallel/test-cluster-dgram-reuse.js index 1de6ad1e5f74dc..bd39a3958de4e6 100644 --- a/test/parallel/test-cluster-dgram-reuse.js +++ b/test/parallel/test-cluster-dgram-reuse.js @@ -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; } diff --git a/test/parallel/test-cluster-disconnect-handles.js b/test/parallel/test-cluster-disconnect-handles.js index 0ae0a0406f4db8..e2015254c5247b 100644 --- a/test/parallel/test-cluster-disconnect-handles.js +++ b/test/parallel/test-cluster-disconnect-handles.js @@ -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; } diff --git a/test/parallel/test-cluster-disconnect-race.js b/test/parallel/test-cluster-disconnect-race.js index 97d55a20b1ac51..e89b9e134fa83f 100644 --- a/test/parallel/test-cluster-disconnect-race.js +++ b/test/parallel/test-cluster-disconnect-race.js @@ -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; } diff --git a/test/parallel/test-cluster-disconnect-unshared-udp.js b/test/parallel/test-cluster-disconnect-unshared-udp.js index 2547ffae1f66f1..902538485d1c6f 100644 --- a/test/parallel/test-cluster-disconnect-unshared-udp.js +++ b/test/parallel/test-cluster-disconnect-unshared-udp.js @@ -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; } diff --git a/test/parallel/test-cluster-http-pipe.js b/test/parallel/test-cluster-http-pipe.js index cb9b090f08e801..8ea634b3034ebb 100644 --- a/test/parallel/test-cluster-http-pipe.js +++ b/test/parallel/test-cluster-http-pipe.js @@ -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; } diff --git a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js index a02a2ef5b6b4f1..90bab2febe41e7 100644 --- a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js +++ b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js @@ -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; } diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index b08fb7e0198640..02dab76a91b174 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -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; } diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index 7245f2407966db..1297fbe1bff601 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -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'); diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js index 9948303f32315e..66a5da04073825 100644 --- a/test/parallel/test-crypto-certificate.js +++ b/test/parallel/test-crypto-certificate.js @@ -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'); diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js index aeebc1c4685925..eef329b5f35384 100644 --- a/test/parallel/test-crypto-cipher-decipher.js +++ b/test/parallel/test-crypto-cipher-decipher.js @@ -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'); diff --git a/test/parallel/test-crypto-cipheriv-decipheriv.js b/test/parallel/test-crypto-cipheriv-decipheriv.js index 1d1aae091d17aa..9c2091a836d79f 100644 --- a/test/parallel/test-crypto-cipheriv-decipheriv.js +++ b/test/parallel/test-crypto-cipheriv-decipheriv.js @@ -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'); diff --git a/test/parallel/test-crypto-deprecated.js b/test/parallel/test-crypto-deprecated.js index a45c4111c6fa46..c702e9129ac956 100644 --- a/test/parallel/test-crypto-deprecated.js +++ b/test/parallel/test-crypto-deprecated.js @@ -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'); diff --git a/test/parallel/test-crypto-dh-odd-key.js b/test/parallel/test-crypto-dh-odd-key.js index 48d46f8237b2fd..cb8757efff0bde 100644 --- a/test/parallel/test-crypto-dh-odd-key.js +++ b/test/parallel/test-crypto-dh-odd-key.js @@ -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'); diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js index 4eb3977d63f391..6e33c538ed98da 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -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'); diff --git a/test/parallel/test-crypto-domain.js b/test/parallel/test-crypto-domain.js index 349ce7e1fc9e9d..9bb6c0229648e7 100644 --- a/test/parallel/test-crypto-domain.js +++ b/test/parallel/test-crypto-domain.js @@ -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'); diff --git a/test/parallel/test-crypto-domains.js b/test/parallel/test-crypto-domains.js index ca93d20fdf25b3..9036228bf6b16d 100644 --- a/test/parallel/test-crypto-domains.js +++ b/test/parallel/test-crypto-domains.js @@ -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'); diff --git a/test/parallel/test-crypto-ecb.js b/test/parallel/test-crypto-ecb.js index d47ec8a8091f38..dbdb486e9bcf7f 100644 --- a/test/parallel/test-crypto-ecb.js +++ b/test/parallel/test-crypto-ecb.js @@ -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'); diff --git a/test/parallel/test-crypto-fips.js b/test/parallel/test-crypto-fips.js index d9e85618f0bb09..0fe30214696d7c 100644 --- a/test/parallel/test-crypto-fips.js +++ b/test/parallel/test-crypto-fips.js @@ -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; } diff --git a/test/parallel/test-crypto-from-binary.js b/test/parallel/test-crypto-from-binary.js index 11617be1cb2710..5c7e75a72104c5 100644 --- a/test/parallel/test-crypto-from-binary.js +++ b/test/parallel/test-crypto-from-binary.js @@ -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'); diff --git a/test/parallel/test-crypto-hash-stream-pipe.js b/test/parallel/test-crypto-hash-stream-pipe.js index c41f91241d58ea..a2b19a69e5bb31 100644 --- a/test/parallel/test-crypto-hash-stream-pipe.js +++ b/test/parallel/test-crypto-hash-stream-pipe.js @@ -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'); diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js index c7e19ec4e98e84..55817ea69c64bd 100644 --- a/test/parallel/test-crypto-hash.js +++ b/test/parallel/test-crypto-hash.js @@ -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'); diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js index 91ffc23e34bfa6..f377d91fd88780 100644 --- a/test/parallel/test-crypto-hmac.js +++ b/test/parallel/test-crypto-hmac.js @@ -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'); diff --git a/test/parallel/test-crypto-padding-aes256.js b/test/parallel/test-crypto-padding-aes256.js index bf03b6e124a2c1..be1edd5edb32d3 100644 --- a/test/parallel/test-crypto-padding-aes256.js +++ b/test/parallel/test-crypto-padding-aes256.js @@ -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'); diff --git a/test/parallel/test-crypto-padding.js b/test/parallel/test-crypto-padding.js index bc2011d3d892f5..a6174728735601 100644 --- a/test/parallel/test-crypto-padding.js +++ b/test/parallel/test-crypto-padding.js @@ -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'); diff --git a/test/parallel/test-crypto-pbkdf2.js b/test/parallel/test-crypto-pbkdf2.js index a05eb70a8b8bfb..ea888180a05145 100644 --- a/test/parallel/test-crypto-pbkdf2.js +++ b/test/parallel/test-crypto-pbkdf2.js @@ -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'); diff --git a/test/parallel/test-crypto-random.js b/test/parallel/test-crypto-random.js index 2d28cccc4cfa3c..b4e36dfa045c05 100644 --- a/test/parallel/test-crypto-random.js +++ b/test/parallel/test-crypto-random.js @@ -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'); diff --git a/test/parallel/test-crypto-rsa-dsa.js b/test/parallel/test-crypto-rsa-dsa.js index e6f2fe6eb25131..c4b1dfaa383486 100644 --- a/test/parallel/test-crypto-rsa-dsa.js +++ b/test/parallel/test-crypto-rsa-dsa.js @@ -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'); diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js index 1bfaad3f7d026b..e8d892a8d63f15 100644 --- a/test/parallel/test-crypto-sign-verify.js +++ b/test/parallel/test-crypto-sign-verify.js @@ -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'); diff --git a/test/parallel/test-crypto-stream.js b/test/parallel/test-crypto-stream.js index 60168069da1cb7..10271e27da4191 100644 --- a/test/parallel/test-crypto-stream.js +++ b/test/parallel/test-crypto-stream.js @@ -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'); diff --git a/test/parallel/test-crypto-verify-failure.js b/test/parallel/test-crypto-verify-failure.js index 2bc4ce5433739d..f260ccfe128eaf 100644 --- a/test/parallel/test-crypto-verify-failure.js +++ b/test/parallel/test-crypto-verify-failure.js @@ -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'); diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js index 7941484dcd2ce0..be3e7f4d5f2fb7 100644 --- a/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js @@ -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'); diff --git a/test/parallel/test-cwd-enoent-preload.js b/test/parallel/test-cwd-enoent-preload.js index 7f11880ee0278a..b2f7ae0a4aed08 100644 --- a/test/parallel/test-cwd-enoent-preload.js +++ b/test/parallel/test-cwd-enoent-preload.js @@ -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; } diff --git a/test/parallel/test-cwd-enoent-repl.js b/test/parallel/test-cwd-enoent-repl.js index 82342ce64487a3..3c8b543cf139d6 100644 --- a/test/parallel/test-cwd-enoent-repl.js +++ b/test/parallel/test-cwd-enoent-repl.js @@ -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; } diff --git a/test/parallel/test-cwd-enoent.js b/test/parallel/test-cwd-enoent.js index c6b3925ce3baa3..9ff9f86405a333 100644 --- a/test/parallel/test-cwd-enoent.js +++ b/test/parallel/test-cwd-enoent.js @@ -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; } diff --git a/test/parallel/test-dgram-bind-default-address.js b/test/parallel/test-dgram-bind-default-address.js index 75069e3618623a..3d786209260408 100644 --- a/test/parallel/test-dgram-bind-default-address.js +++ b/test/parallel/test-dgram-bind-default-address.js @@ -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; } diff --git a/test/parallel/test-dgram-empty-packet.js b/test/parallel/test-dgram-empty-packet.js index 9a02799e2f35ca..297072b37de0ab 100644 --- a/test/parallel/test-dgram-empty-packet.js +++ b/test/parallel/test-dgram-empty-packet.js @@ -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; } diff --git a/test/parallel/test-dgram-send-empty-buffer.js b/test/parallel/test-dgram-send-empty-buffer.js index 06b85ddb646030..f6845360d006e3 100644 --- a/test/parallel/test-dgram-send-empty-buffer.js +++ b/test/parallel/test-dgram-send-empty-buffer.js @@ -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; } diff --git a/test/parallel/test-dgram-udp6-send-default-host.js b/test/parallel/test-dgram-udp6-send-default-host.js index 7e72ea570181cc..9ef080dc6eb14a 100644 --- a/test/parallel/test-dgram-udp6-send-default-host.js +++ b/test/parallel/test-dgram-udp6-send-default-host.js @@ -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; } diff --git a/test/parallel/test-dh-padding.js b/test/parallel/test-dh-padding.js index 7d482b78f63a7c..a9cd95225abedb 100644 --- a/test/parallel/test-dh-padding.js +++ b/test/parallel/test-dh-padding.js @@ -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; } diff --git a/test/parallel/test-domain-crypto.js b/test/parallel/test-domain-crypto.js index e6dbccf86ca39e..1109591fee9631 100644 --- a/test/parallel/test-domain-crypto.js +++ b/test/parallel/test-domain-crypto.js @@ -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'); diff --git a/test/parallel/test-dsa-fips-invalid-key.js b/test/parallel/test-dsa-fips-invalid-key.js index 2d30ef6891008a..ede3adab66c527 100644 --- a/test/parallel/test-dsa-fips-invalid-key.js +++ b/test/parallel/test-dsa-fips-invalid-key.js @@ -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; } diff --git a/test/parallel/test-fs-long-path.js b/test/parallel/test-fs-long-path.js index eadbcd1f78df98..d0945f1e518e42 100644 --- a/test/parallel/test-fs-long-path.js +++ b/test/parallel/test-fs-long-path.js @@ -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; } diff --git a/test/parallel/test-fs-readdir-ucs2.js b/test/parallel/test-fs-readdir-ucs2.js index 578723117a038a..46c99954351429 100644 --- a/test/parallel/test-fs-readdir-ucs2.js +++ b/test/parallel/test-fs-readdir-ucs2.js @@ -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; } diff --git a/test/parallel/test-fs-readfile-error.js b/test/parallel/test-fs-readfile-error.js index c61449a2db9b56..c2b3c015512497 100644 --- a/test/parallel/test-fs-readfile-error.js +++ b/test/parallel/test-fs-readfile-error.js @@ -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; } diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index db50657377fd5d..09f0c4ba7b46a1 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -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() { diff --git a/test/parallel/test-fs-symlink.js b/test/parallel/test-fs-symlink.js index b506013b0a23f5..bac0677b340393 100644 --- a/test/parallel/test-fs-symlink.js +++ b/test/parallel/test-fs-symlink.js @@ -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; } }); diff --git a/test/parallel/test-fs-watch-encoding.js b/test/parallel/test-fs-watch-encoding.js index cb7af00f6615f8..47cb70310825c1 100644 --- a/test/parallel/test-fs-watch-encoding.js +++ b/test/parallel/test-fs-watch-encoding.js @@ -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; } diff --git a/test/parallel/test-fs-watch-recursive.js b/test/parallel/test-fs-watch-recursive.js index 9c68b5e3557242..7853baaa02b797 100644 --- a/test/parallel/test-fs-watch-recursive.js +++ b/test/parallel/test-fs-watch-recursive.js @@ -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; } diff --git a/test/parallel/test-http-chunk-problem.js b/test/parallel/test-http-chunk-problem.js index 0342a9501c40be..23ec2d0263fa94 100644 --- a/test/parallel/test-http-chunk-problem.js +++ b/test/parallel/test-http-chunk-problem.js @@ -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; } diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js index 69d81e9b9724ce..c0a1ed50e34d1b 100644 --- a/test/parallel/test-http-default-port.js +++ b/test/parallel/test-http-default-port.js @@ -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() { diff --git a/test/parallel/test-http-dns-error.js b/test/parallel/test-http-dns-error.js index 37e9fca62e01e4..f1f144a60a24c0 100644 --- a/test/parallel/test-http-dns-error.js +++ b/test/parallel/test-http-dns-error.js @@ -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); diff --git a/test/parallel/test-http-full-response.js b/test/parallel/test-http-full-response.js index 767efa3cd6657e..331f2171d828b4 100644 --- a/test/parallel/test-http-full-response.js +++ b/test/parallel/test-http-full-response.js @@ -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(); diff --git a/test/parallel/test-http-localaddress.js b/test/parallel/test-http-localaddress.js index c7bb9f0301e407..9bf213a880444b 100644 --- a/test/parallel/test-http-localaddress.js +++ b/test/parallel/test-http-localaddress.js @@ -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; } diff --git a/test/parallel/test-http-url.parse-https.request.js b/test/parallel/test-http-url.parse-https.request.js index df01ae64f81dba..d843d9838d9914 100644 --- a/test/parallel/test-http-url.parse-https.request.js +++ b/test/parallel/test-http-url.parse-https.request.js @@ -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'); diff --git a/test/parallel/test-https-agent-disable-session-reuse.js b/test/parallel/test-https-agent-disable-session-reuse.js index a4f9517bd52ff3..d123efc35ef09d 100644 --- a/test/parallel/test-https-agent-disable-session-reuse.js +++ b/test/parallel/test-https-agent-disable-session-reuse.js @@ -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; } diff --git a/test/parallel/test-https-agent-servername.js b/test/parallel/test-https-agent-servername.js index f7d5e5a40d8679..1ebed86a82878a 100644 --- a/test/parallel/test-https-agent-servername.js +++ b/test/parallel/test-https-agent-servername.js @@ -2,7 +2,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-https-agent-session-eviction.js b/test/parallel/test-https-agent-session-eviction.js index da2accffcd9c85..553d5aa7d4121f 100644 --- a/test/parallel/test-https-agent-session-eviction.js +++ b/test/parallel/test-https-agent-session-eviction.js @@ -3,7 +3,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-https-agent-session-reuse.js b/test/parallel/test-https-agent-session-reuse.js index 2c202524456a75..1421d545783ac3 100644 --- a/test/parallel/test-https-agent-session-reuse.js +++ b/test/parallel/test-https-agent-session-reuse.js @@ -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; } diff --git a/test/parallel/test-https-agent-sni.js b/test/parallel/test-https-agent-sni.js index 117075f68264b4..b8f6c8cde8520c 100644 --- a/test/parallel/test-https-agent-sni.js +++ b/test/parallel/test-https-agent-sni.js @@ -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'); diff --git a/test/parallel/test-https-agent.js b/test/parallel/test-https-agent.js index 9dea313e42ed8e..08d35337121acf 100644 --- a/test/parallel/test-https-agent.js +++ b/test/parallel/test-https-agent.js @@ -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'); diff --git a/test/parallel/test-https-byteswritten.js b/test/parallel/test-https-byteswritten.js index 4d42714f3dc4c0..2f8856ca999833 100644 --- a/test/parallel/test-https-byteswritten.js +++ b/test/parallel/test-https-byteswritten.js @@ -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'); diff --git a/test/parallel/test-https-client-checkServerIdentity.js b/test/parallel/test-https-client-checkServerIdentity.js index e49427dcc76f6e..f16285860afe60 100644 --- a/test/parallel/test-https-client-checkServerIdentity.js +++ b/test/parallel/test-https-client-checkServerIdentity.js @@ -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'); diff --git a/test/parallel/test-https-client-get-url.js b/test/parallel/test-https-client-get-url.js index e8922de9434a03..50875e6d452da7 100644 --- a/test/parallel/test-https-client-get-url.js +++ b/test/parallel/test-https-client-get-url.js @@ -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'); diff --git a/test/parallel/test-https-client-reject.js b/test/parallel/test-https-client-reject.js index fc76e5b80f5806..ee19de2acdd0ab 100644 --- a/test/parallel/test-https-client-reject.js +++ b/test/parallel/test-https-client-reject.js @@ -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'); diff --git a/test/parallel/test-https-client-resume.js b/test/parallel/test-https-client-resume.js index 8f849b14b5818a..b91f3d83148ff1 100644 --- a/test/parallel/test-https-client-resume.js +++ b/test/parallel/test-https-client-resume.js @@ -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'); diff --git a/test/parallel/test-https-close.js b/test/parallel/test-https-close.js index 8a9a4f89960af0..18237a612bde31 100644 --- a/test/parallel/test-https-close.js +++ b/test/parallel/test-https-close.js @@ -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'); diff --git a/test/parallel/test-https-connecting-to-http.js b/test/parallel/test-https-connecting-to-http.js index 755abf9427fb32..2b705b4cfabb5b 100644 --- a/test/parallel/test-https-connecting-to-http.js +++ b/test/parallel/test-https-connecting-to-http.js @@ -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'); diff --git a/test/parallel/test-https-drain.js b/test/parallel/test-https-drain.js index 562d4ce01b0d0e..2b59467b1616a4 100644 --- a/test/parallel/test-https-drain.js +++ b/test/parallel/test-https-drain.js @@ -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'); diff --git a/test/parallel/test-https-eof-for-eom.js b/test/parallel/test-https-eof-for-eom.js index 50d909373ff5b0..5431d33c3d394f 100644 --- a/test/parallel/test-https-eof-for-eom.js +++ b/test/parallel/test-https-eof-for-eom.js @@ -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'); diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index 5e480bf6adc1e5..fa6200c845e229 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -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'); diff --git a/test/parallel/test-https-host-headers.js b/test/parallel/test-https-host-headers.js index 1e71fd5b9ef5b7..4c292d7e8bbd6f 100644 --- a/test/parallel/test-https-host-headers.js +++ b/test/parallel/test-https-host-headers.js @@ -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'); diff --git a/test/parallel/test-https-localaddress-bind-error.js b/test/parallel/test-https-localaddress-bind-error.js index f5bb1f84c310b3..75f915a05cc250 100644 --- a/test/parallel/test-https-localaddress-bind-error.js +++ b/test/parallel/test-https-localaddress-bind-error.js @@ -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'); diff --git a/test/parallel/test-https-localaddress.js b/test/parallel/test-https-localaddress.js index bce65d58e296f2..ed70d0281cfdc2 100644 --- a/test/parallel/test-https-localaddress.js +++ b/test/parallel/test-https-localaddress.js @@ -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; } diff --git a/test/parallel/test-https-pfx.js b/test/parallel/test-https-pfx.js index 5e080b4e3ded12..0d2c6d367a6e9a 100644 --- a/test/parallel/test-https-pfx.js +++ b/test/parallel/test-https-pfx.js @@ -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'); diff --git a/test/parallel/test-https-req-split.js b/test/parallel/test-https-req-split.js index 479fff36b4e5d2..d7b49b6d71b284 100644 --- a/test/parallel/test-https-req-split.js +++ b/test/parallel/test-https-req-split.js @@ -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'); diff --git a/test/parallel/test-https-set-timeout-server.js b/test/parallel/test-https-set-timeout-server.js index bfea7c4d5d5f48..176d056b66cfac 100644 --- a/test/parallel/test-https-set-timeout-server.js +++ b/test/parallel/test-https-set-timeout-server.js @@ -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'); diff --git a/test/parallel/test-https-simple.js b/test/parallel/test-https-simple.js index 92f9bde2ef802a..14ebb29e2d88ff 100644 --- a/test/parallel/test-https-simple.js +++ b/test/parallel/test-https-simple.js @@ -2,7 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-https-socket-options.js b/test/parallel/test-https-socket-options.js index 2adf8c798dff65..0306c659026dfd 100644 --- a/test/parallel/test-https-socket-options.js +++ b/test/parallel/test-https-socket-options.js @@ -2,7 +2,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var https = require('https'); diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js index 04561959de130f..9f845470b0f2e9 100644 --- a/test/parallel/test-https-strict.js +++ b/test/parallel/test-https-strict.js @@ -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'); diff --git a/test/parallel/test-https-timeout-server-2.js b/test/parallel/test-https-timeout-server-2.js index a195ce1938b9cd..f543150de7e118 100644 --- a/test/parallel/test-https-timeout-server-2.js +++ b/test/parallel/test-https-timeout-server-2.js @@ -4,7 +4,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'); diff --git a/test/parallel/test-https-timeout-server.js b/test/parallel/test-https-timeout-server.js index 0cfc9a6eec33c1..ad2a7e87992511 100644 --- a/test/parallel/test-https-timeout-server.js +++ b/test/parallel/test-https-timeout-server.js @@ -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'); diff --git a/test/parallel/test-https-timeout.js b/test/parallel/test-https-timeout.js index 2b41dadaec7857..20ee1d6868fa46 100644 --- a/test/parallel/test-https-timeout.js +++ b/test/parallel/test-https-timeout.js @@ -2,7 +2,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var https = require('https'); diff --git a/test/parallel/test-https-truncate.js b/test/parallel/test-https-truncate.js index 58fcf010f6ea5b..56f41107f85cd4 100644 --- a/test/parallel/test-https-truncate.js +++ b/test/parallel/test-https-truncate.js @@ -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'); diff --git a/test/parallel/test-intl-v8BreakIterator.js b/test/parallel/test-intl-v8BreakIterator.js index 6e25c32cd743d3..91717d139466a2 100644 --- a/test/parallel/test-intl-v8BreakIterator.js +++ b/test/parallel/test-intl-v8BreakIterator.js @@ -1,9 +1,9 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); if (global.Intl === undefined || Intl.v8BreakIterator === undefined) { - return console.log('1..0 # Skipped: no Intl'); + return common.skip('no Intl'); } try { diff --git a/test/parallel/test-intl.js b/test/parallel/test-intl.js index 551cc013131427..7c24ad69b31146 100644 --- a/test/parallel/test-intl.js +++ b/test/parallel/test-intl.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); +const common = require('../common'); var assert = require('assert'); // does node think that i18n was enabled? @@ -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('1..0 # Skipped: Intl tests because Intl object not present.'); + common.skip('Intl tests because Intl object not present.'); } else { const erMsg = @@ -46,7 +46,7 @@ if (!haveIntl) { // If list is specified and doesn't contain 'en' then return. if (process.config.variables.icu_locales && !haveLocale('en')) { - console.log('1..0 # Skipped: detailed Intl tests because English is not ' + + common.skip('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)); diff --git a/test/parallel/test-listen-fd-cluster.js b/test/parallel/test-listen-fd-cluster.js index 419efc7c099bf0..92aadfd49f8acd 100644 --- a/test/parallel/test-listen-fd-cluster.js +++ b/test/parallel/test-listen-fd-cluster.js @@ -9,7 +9,7 @@ var cluster = require('cluster'); console.error('Cluster listen fd test', process.argv[2] || 'runner'); if (common.isWindows) { - console.log('1..0 # Skipped: This test is disabled on windows.'); + common.skip('This test is disabled on windows.'); return; } diff --git a/test/parallel/test-listen-fd-detached-inherit.js b/test/parallel/test-listen-fd-detached-inherit.js index 472b1e8ff939f0..abe3b7ca5126b9 100644 --- a/test/parallel/test-listen-fd-detached-inherit.js +++ b/test/parallel/test-listen-fd-detached-inherit.js @@ -7,7 +7,7 @@ var PORT = common.PORT; var spawn = require('child_process').spawn; if (common.isWindows) { - console.log('1..0 # Skipped: This test is disabled on windows.'); + common.skip('This test is disabled on windows.'); return; } diff --git a/test/parallel/test-listen-fd-detached.js b/test/parallel/test-listen-fd-detached.js index 12c8c3ddc43fac..1bb1a7f13336a5 100644 --- a/test/parallel/test-listen-fd-detached.js +++ b/test/parallel/test-listen-fd-detached.js @@ -7,7 +7,7 @@ var PORT = common.PORT; var spawn = require('child_process').spawn; if (common.isWindows) { - console.log('1..0 # Skipped: This test is disabled on windows.'); + common.skip('This test is disabled on windows.'); return; } diff --git a/test/parallel/test-listen-fd-server.js b/test/parallel/test-listen-fd-server.js index 3e0fa521f75334..25a5393bd4a2fb 100644 --- a/test/parallel/test-listen-fd-server.js +++ b/test/parallel/test-listen-fd-server.js @@ -6,7 +6,7 @@ var net = require('net'); var PORT = common.PORT; if (common.isWindows) { - console.log('1..0 # Skipped: This test is disabled on windows.'); + common.skip('This test is disabled on windows.'); return; } diff --git a/test/parallel/test-module-loading-error.js b/test/parallel/test-module-loading-error.js index 072a6aadcb8c62..145530985401e4 100644 --- a/test/parallel/test-module-loading-error.js +++ b/test/parallel/test-module-loading-error.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); +const common = require('../common'); var assert = require('assert'); console.error('load test-module-loading-error.js'); @@ -13,7 +13,7 @@ var error_desc = { var dlerror_msg = error_desc[process.platform]; if (!dlerror_msg) { - console.log('1..0 # Skipped: platform not supported.'); + common.skip('platform not supported.'); return; } diff --git a/test/parallel/test-net-connect-options-ipv6.js b/test/parallel/test-net-connect-options-ipv6.js index 5cce7325f91967..f84c02678ff654 100644 --- a/test/parallel/test-net-connect-options-ipv6.js +++ b/test/parallel/test-net-connect-options-ipv6.js @@ -4,7 +4,7 @@ const assert = require('assert'); const net = require('net'); if (!common.hasIPv6) { - console.log('1..0 # Skipped: no IPv6 support'); + common.skip('no IPv6 support'); return; } @@ -60,7 +60,7 @@ function tryConnect() { if (host) tryConnect(); else { - console.log('1..0 # Skipped: no IPv6 localhost support'); + common.skip('no IPv6 localhost support'); server.close(); } return; diff --git a/test/parallel/test-net-socket-local-address.js b/test/parallel/test-net-socket-local-address.js index a291d3922e3197..78b67d0dd2ec9c 100644 --- a/test/parallel/test-net-socket-local-address.js +++ b/test/parallel/test-net-socket-local-address.js @@ -5,7 +5,7 @@ const net = require('net'); // skip test in FreeBSD jails if (common.inFreeBSDJail) { - console.log('1..0 # Skipped: In a FreeBSD jail'); + common.skip('In a FreeBSD jail'); return; } diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index 2686b3c003ff3f..6bb82b523f8985 100644 --- a/test/parallel/test-preload.js +++ b/test/parallel/test-preload.js @@ -7,7 +7,7 @@ const childProcess = require('child_process'); // Refs: https://github.com/nodejs/node/pull/2253 if (common.isSunOS) { - console.log('1..0 # Skipped: unreliable on SunOS'); + common.skip('unreliable on SunOS'); return; } diff --git a/test/parallel/test-process-getgroups.js b/test/parallel/test-process-getgroups.js index 08eab8d5a8afe2..6d07692a764e52 100644 --- a/test/parallel/test-process-getgroups.js +++ b/test/parallel/test-process-getgroups.js @@ -1,10 +1,10 @@ 'use strict'; -require('../common'); +const common = require('../common'); var assert = require('assert'); var exec = require('child_process').exec; if (process.platform === 'darwin') { - console.log('1..0 # Skipped: Output of `id -G` is unreliable on Darwin.'); + common.skip('Output of `id -G` is unreliable on Darwin.'); return; } diff --git a/test/parallel/test-process-remove-all-signal-listeners.js b/test/parallel/test-process-remove-all-signal-listeners.js index 59c2ae926b1cc2..f05e1f9dec79ef 100644 --- a/test/parallel/test-process-remove-all-signal-listeners.js +++ b/test/parallel/test-process-remove-all-signal-listeners.js @@ -5,7 +5,7 @@ const spawn = require('child_process').spawn; const common = require('../common'); if (common.isWindows) { - console.log('1..0 # Skipped: Win32 doesn\'t have signals, just a kind of ' + + common.skip('Win32 doesn\'t have signals, just a kind of ' + 'emulation, insufficient for this test to apply.'); return; } diff --git a/test/parallel/test-regress-GH-1531.js b/test/parallel/test-regress-GH-1531.js index 097611e1bfb11b..79766934edec5b 100644 --- a/test/parallel/test-regress-GH-1531.js +++ b/test/parallel/test-regress-GH-1531.js @@ -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'); diff --git a/test/parallel/test-regress-GH-3542.js b/test/parallel/test-regress-GH-3542.js index c7e52113178fbd..0d7e89ef9b5b51 100644 --- a/test/parallel/test-regress-GH-3542.js +++ b/test/parallel/test-regress-GH-3542.js @@ -7,7 +7,7 @@ let succeeded = 0; // This test is only relevant on Windows. if (!common.isWindows) { - console.log('1..0 # Skipped: Windows specific test.'); + common.skip('Windows specific test.'); return; } diff --git a/test/parallel/test-repl-history-perm.js b/test/parallel/test-repl-history-perm.js index 717728bc4fc287..c7d2852539a01d 100644 --- a/test/parallel/test-repl-history-perm.js +++ b/test/parallel/test-repl-history-perm.js @@ -4,7 +4,7 @@ const common = require('../common'); if (common.isWindows) { - console.log('1..0 # Skipped: Win32 uses ACLs for file permissions, ' + + common.skip('Win32 uses ACLs for file permissions, ' + 'modes are always 0666 and says nothing about group/other ' + 'read access.'); return; diff --git a/test/parallel/test-require-long-path.js b/test/parallel/test-require-long-path.js index c30a76a5a9e099..1a8ce1b7dfd2c3 100644 --- a/test/parallel/test-require-long-path.js +++ b/test/parallel/test-require-long-path.js @@ -4,7 +4,7 @@ const fs = require('fs'); const path = require('path'); if (!common.isWindows) { - console.log('1..0 # Skipped: this test is Windows-specific.'); + common.skip('this test is Windows-specific.'); return; } diff --git a/test/parallel/test-signal-handler.js b/test/parallel/test-signal-handler.js index dc37a8a1f6704a..43198de726d20e 100644 --- a/test/parallel/test-signal-handler.js +++ b/test/parallel/test-signal-handler.js @@ -4,7 +4,7 @@ const common = require('../common'); const assert = require('assert'); if (common.isWindows) { - console.log('1..0 # Skipped: SIGUSR1 and SIGHUP signals are not supported'); + common.skip('SIGUSR1 and SIGHUP signals are not supported'); return; } diff --git a/test/parallel/test-spawn-cmd-named-pipe.js b/test/parallel/test-spawn-cmd-named-pipe.js index 5371577e6c458c..fafc5b2167ba59 100644 --- a/test/parallel/test-spawn-cmd-named-pipe.js +++ b/test/parallel/test-spawn-cmd-named-pipe.js @@ -4,7 +4,7 @@ const assert = require('assert'); // This test is intended for Windows only if (!common.isWindows) { - console.log('1..0 # Skipped: this test is Windows-specific.'); + common.skip('this test is Windows-specific.'); return; } diff --git a/test/parallel/test-stdio-closed.js b/test/parallel/test-stdio-closed.js index bf9a57bd688ffc..0f94289ee96534 100644 --- a/test/parallel/test-stdio-closed.js +++ b/test/parallel/test-stdio-closed.js @@ -4,7 +4,7 @@ var assert = require('assert'); var spawn = require('child_process').spawn; if (common.isWindows) { - console.log('1..0 # Skipped: platform not supported.'); + common.skip('platform not supported.'); return; } diff --git a/test/parallel/test-stream2-unpipe-drain.js b/test/parallel/test-stream2-unpipe-drain.js index daad70a282a44c..39c3b19069b444 100644 --- a/test/parallel/test-stream2-unpipe-drain.js +++ b/test/parallel/test-stream2-unpipe-drain.js @@ -4,7 +4,7 @@ var assert = require('assert'); var stream = require('stream'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var crypto = require('crypto'); diff --git a/test/parallel/test-tick-processor.js b/test/parallel/test-tick-processor.js index b22e2ec14a3c6e..686e7178360ef9 100644 --- a/test/parallel/test-tick-processor.js +++ b/test/parallel/test-tick-processor.js @@ -10,7 +10,7 @@ var common = require('../common'); // addresses correctly and runs out of memory // Disabling until we get a fix upstreamed into V8 if (common.isAix) { - console.log('1..0 # Skipped: Aix address range too big for scripts.'); + common.skip('Aix address range too big for scripts.'); return; } @@ -32,7 +32,7 @@ if (common.isWindows || common.isAix || common.isLinuxPPCBE || common.isFreeBSD) { - console.log('1..0 # Skipped: C++ symbols are not mapped for this os.'); + common.skip('C++ symbols are not mapped for this os.'); return; } runTest(/RunInDebugContext/, diff --git a/test/parallel/test-tls-0-dns-altname.js b/test/parallel/test-tls-0-dns-altname.js index 793b56426f9463..bafbcd419a503d 100644 --- a/test/parallel/test-tls-0-dns-altname.js +++ b/test/parallel/test-tls-0-dns-altname.js @@ -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'); diff --git a/test/parallel/test-tls-alert-handling.js b/test/parallel/test-tls-alert-handling.js index 8c986b25f5e68d..c26b71b16307f8 100644 --- a/test/parallel/test-tls-alert-handling.js +++ b/test/parallel/test-tls-alert-handling.js @@ -3,12 +3,12 @@ var common = require('../common'); var assert = require('assert'); if (!common.opensslCli) { - console.log('1..0 # Skipped: node compiled without OpenSSL CLI.'); + common.skip('node compiled without OpenSSL CLI.'); return; } if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-alert.js b/test/parallel/test-tls-alert.js index d25f819d445f45..20e77afda4a4be 100644 --- a/test/parallel/test-tls-alert.js +++ b/test/parallel/test-tls-alert.js @@ -3,12 +3,12 @@ var common = require('../common'); var assert = require('assert'); if (!common.opensslCli) { - console.log('1..0 # Skipped: node compiled without OpenSSL CLI.'); + common.skip('node compiled without OpenSSL CLI.'); return; } if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-alpn-server-client.js b/test/parallel/test-tls-alpn-server-client.js index b0ce0dbcd482e5..35784511c439e9 100644 --- a/test/parallel/test-tls-alpn-server-client.js +++ b/test/parallel/test-tls-alpn-server-client.js @@ -2,7 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-async-cb-after-socket-end.js b/test/parallel/test-tls-async-cb-after-socket-end.js index d89a4e9930ca6a..902d37951a2099 100644 --- a/test/parallel/test-tls-async-cb-after-socket-end.js +++ b/test/parallel/test-tls-async-cb-after-socket-end.js @@ -7,7 +7,7 @@ var fs = require('fs'); var constants = require('constants'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-cert-regression.js b/test/parallel/test-tls-cert-regression.js index 1d4625d83fbce9..fce676f5618246 100644 --- a/test/parallel/test-tls-cert-regression.js +++ b/test/parallel/test-tls-cert-regression.js @@ -3,7 +3,7 @@ var assert = require('assert'); var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-check-server-identity.js b/test/parallel/test-tls-check-server-identity.js index 8d2155b94ea9af..c7d0a7ba1606ec 100644 --- a/test/parallel/test-tls-check-server-identity.js +++ b/test/parallel/test-tls-check-server-identity.js @@ -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 tls = require('tls'); diff --git a/test/parallel/test-tls-cipher-list.js b/test/parallel/test-tls-cipher-list.js index 70c99dd91e439c..c6abce18ba3f9e 100644 --- a/test/parallel/test-tls-cipher-list.js +++ b/test/parallel/test-tls-cipher-list.js @@ -2,7 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-client-abort.js b/test/parallel/test-tls-client-abort.js index 934162c35a426f..d2fcf3e687e676 100644 --- a/test/parallel/test-tls-client-abort.js +++ b/test/parallel/test-tls-client-abort.js @@ -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'); diff --git a/test/parallel/test-tls-client-abort2.js b/test/parallel/test-tls-client-abort2.js index 194882e7d52e08..4bb8f00cf5fc30 100644 --- a/test/parallel/test-tls-client-abort2.js +++ b/test/parallel/test-tls-client-abort2.js @@ -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'); diff --git a/test/parallel/test-tls-client-default-ciphers.js b/test/parallel/test-tls-client-default-ciphers.js index 9905fc45bdcd24..ebfc072dd33054 100644 --- a/test/parallel/test-tls-client-default-ciphers.js +++ b/test/parallel/test-tls-client-default-ciphers.js @@ -3,7 +3,7 @@ var assert = require('assert'); var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-client-destroy-soon.js b/test/parallel/test-tls-client-destroy-soon.js index a8452904746f28..c91194539d6c69 100644 --- a/test/parallel/test-tls-client-destroy-soon.js +++ b/test/parallel/test-tls-client-destroy-soon.js @@ -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 tls = require('tls'); diff --git a/test/parallel/test-tls-client-getephemeralkeyinfo.js b/test/parallel/test-tls-client-getephemeralkeyinfo.js index 6e45ffc62c0257..790722f6bc8535 100644 --- a/test/parallel/test-tls-client-getephemeralkeyinfo.js +++ b/test/parallel/test-tls-client-getephemeralkeyinfo.js @@ -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'); process.exit(); } var tls = require('tls'); diff --git a/test/parallel/test-tls-client-mindhsize.js b/test/parallel/test-tls-client-mindhsize.js index 28e9e1b6539078..5c7b300f8fbcc6 100644 --- a/test/parallel/test-tls-client-mindhsize.js +++ b/test/parallel/test-tls-client-mindhsize.js @@ -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'); process.exit(); } var tls = require('tls'); diff --git a/test/parallel/test-tls-client-reject.js b/test/parallel/test-tls-client-reject.js index 2f9ea230a06828..db53eb4b129ee5 100644 --- a/test/parallel/test-tls-client-reject.js +++ b/test/parallel/test-tls-client-reject.js @@ -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'); diff --git a/test/parallel/test-tls-client-resume.js b/test/parallel/test-tls-client-resume.js index 002151b7d82160..b7fd2fc9d9fb46 100644 --- a/test/parallel/test-tls-client-resume.js +++ b/test/parallel/test-tls-client-resume.js @@ -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 tls = require('tls'); diff --git a/test/parallel/test-tls-client-verify.js b/test/parallel/test-tls-client-verify.js index b4014ab351db2b..ed142b86529fd6 100644 --- a/test/parallel/test-tls-client-verify.js +++ b/test/parallel/test-tls-client-verify.js @@ -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'); diff --git a/test/parallel/test-tls-close-error.js b/test/parallel/test-tls-close-error.js index bd38cb55f7a17b..e338e8ecb7fd9f 100644 --- a/test/parallel/test-tls-close-error.js +++ b/test/parallel/test-tls-close-error.js @@ -4,7 +4,7 @@ var assert = require('assert'); var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-close-notify.js b/test/parallel/test-tls-close-notify.js index 5545f4512d5f39..d06484af8b9942 100644 --- a/test/parallel/test-tls-close-notify.js +++ b/test/parallel/test-tls-close-notify.js @@ -3,7 +3,7 @@ var assert = require('assert'); var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-cnnic-whitelist.js b/test/parallel/test-tls-cnnic-whitelist.js index 85e1d90e027b88..2b2a818969d9e9 100644 --- a/test/parallel/test-tls-cnnic-whitelist.js +++ b/test/parallel/test-tls-cnnic-whitelist.js @@ -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; } diff --git a/test/parallel/test-tls-connect-given-socket.js b/test/parallel/test-tls-connect-given-socket.js index 2fd44d870103b6..41ea94883ef74c 100644 --- a/test/parallel/test-tls-connect-given-socket.js +++ b/test/parallel/test-tls-connect-given-socket.js @@ -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'); diff --git a/test/parallel/test-tls-connect-no-host.js b/test/parallel/test-tls-connect-no-host.js index a6ead6ea6dceae..86203d7f42d5ef 100644 --- a/test/parallel/test-tls-connect-no-host.js +++ b/test/parallel/test-tls-connect-no-host.js @@ -2,7 +2,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-connect-pipe.js b/test/parallel/test-tls-connect-pipe.js index ae8062635c85b5..acf64f9af7cef3 100644 --- a/test/parallel/test-tls-connect-pipe.js +++ b/test/parallel/test-tls-connect-pipe.js @@ -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'); diff --git a/test/parallel/test-tls-connect-secure-context.js b/test/parallel/test-tls-connect-secure-context.js index c7519ed770fd50..246effc0b7eddc 100644 --- a/test/parallel/test-tls-connect-secure-context.js +++ b/test/parallel/test-tls-connect-secure-context.js @@ -2,7 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } const tls = require('tls'); diff --git a/test/parallel/test-tls-connect-simple.js b/test/parallel/test-tls-connect-simple.js index f56b4baed72aaa..f21417cef8f311 100644 --- a/test/parallel/test-tls-connect-simple.js +++ b/test/parallel/test-tls-connect-simple.js @@ -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'); diff --git a/test/parallel/test-tls-connect.js b/test/parallel/test-tls-connect.js index ce4317ac302738..3853ea66bc80f4 100644 --- a/test/parallel/test-tls-connect.js +++ b/test/parallel/test-tls-connect.js @@ -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'); diff --git a/test/parallel/test-tls-delayed-attach-error.js b/test/parallel/test-tls-delayed-attach-error.js index ca2562f683d7a0..bd8e58dd1fadbd 100644 --- a/test/parallel/test-tls-delayed-attach-error.js +++ b/test/parallel/test-tls-delayed-attach-error.js @@ -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'); diff --git a/test/parallel/test-tls-delayed-attach.js b/test/parallel/test-tls-delayed-attach.js index 2fbafd8ecb312a..ba2002dde305ea 100644 --- a/test/parallel/test-tls-delayed-attach.js +++ b/test/parallel/test-tls-delayed-attach.js @@ -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'); diff --git a/test/parallel/test-tls-destroy-whilst-write.js b/test/parallel/test-tls-destroy-whilst-write.js index 26c20264735926..4f6ede968be408 100644 --- a/test/parallel/test-tls-destroy-whilst-write.js +++ b/test/parallel/test-tls-destroy-whilst-write.js @@ -2,7 +2,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-dhe.js b/test/parallel/test-tls-dhe.js index f7d498b0436160..770e3e1266102e 100644 --- a/test/parallel/test-tls-dhe.js +++ b/test/parallel/test-tls-dhe.js @@ -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'); diff --git a/test/parallel/test-tls-ecdh-disable.js b/test/parallel/test-tls-ecdh-disable.js index 9bfb5f871a4822..a7e18a319afae2 100644 --- a/test/parallel/test-tls-ecdh-disable.js +++ b/test/parallel/test-tls-ecdh-disable.js @@ -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'); diff --git a/test/parallel/test-tls-ecdh.js b/test/parallel/test-tls-ecdh.js index a6e16114b955ae..9ecd5c16e010d3 100644 --- a/test/parallel/test-tls-ecdh.js +++ b/test/parallel/test-tls-ecdh.js @@ -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'); diff --git a/test/parallel/test-tls-econnreset.js b/test/parallel/test-tls-econnreset.js index b369ec763a944a..d9cda6ffc24389 100644 --- a/test/parallel/test-tls-econnreset.js +++ b/test/parallel/test-tls-econnreset.js @@ -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'); diff --git a/test/parallel/test-tls-external-accessor.js b/test/parallel/test-tls-external-accessor.js index 919af0e8f33e4f..08a4ad16e8b4d4 100644 --- a/test/parallel/test-tls-external-accessor.js +++ b/test/parallel/test-tls-external-accessor.js @@ -4,7 +4,7 @@ const common = require('../common'); const assert = require('assert'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-fast-writing.js b/test/parallel/test-tls-fast-writing.js index e7cabd6d9a3943..aede462808ede8 100644 --- a/test/parallel/test-tls-fast-writing.js +++ b/test/parallel/test-tls-fast-writing.js @@ -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'); diff --git a/test/parallel/test-tls-friendly-error-message.js b/test/parallel/test-tls-friendly-error-message.js index ee2c21f6b5c220..38197b6201770f 100644 --- a/test/parallel/test-tls-friendly-error-message.js +++ b/test/parallel/test-tls-friendly-error-message.js @@ -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'); diff --git a/test/parallel/test-tls-getcipher.js b/test/parallel/test-tls-getcipher.js index 646d396eca9a86..9e525b8c477792 100644 --- a/test/parallel/test-tls-getcipher.js +++ b/test/parallel/test-tls-getcipher.js @@ -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'); diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js index 67592143ee4875..60c75667bd831f 100644 --- a/test/parallel/test-tls-getprotocol.js +++ b/test/parallel/test-tls-getprotocol.js @@ -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; } diff --git a/test/parallel/test-tls-handshake-error.js b/test/parallel/test-tls-handshake-error.js index f65440ed93b1a3..3bb583bb2c7802 100644 --- a/test/parallel/test-tls-handshake-error.js +++ b/test/parallel/test-tls-handshake-error.js @@ -4,7 +4,7 @@ var assert = require('assert'); var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-handshake-nohang.js b/test/parallel/test-tls-handshake-nohang.js index 374ac02a2f45b5..052833a50e3462 100644 --- a/test/parallel/test-tls-handshake-nohang.js +++ b/test/parallel/test-tls-handshake-nohang.js @@ -2,7 +2,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-hello-parser-failure.js b/test/parallel/test-tls-hello-parser-failure.js index ecfbb9a70e4df9..9f4a4f6649d692 100644 --- a/test/parallel/test-tls-hello-parser-failure.js +++ b/test/parallel/test-tls-hello-parser-failure.js @@ -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'); diff --git a/test/parallel/test-tls-honorcipherorder.js b/test/parallel/test-tls-honorcipherorder.js index 28c930b07edc28..dd3ead8d42db3d 100644 --- a/test/parallel/test-tls-honorcipherorder.js +++ b/test/parallel/test-tls-honorcipherorder.js @@ -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'); diff --git a/test/parallel/test-tls-inception.js b/test/parallel/test-tls-inception.js index 6f71e4682c2d84..a182629fb1e3c2 100644 --- a/test/parallel/test-tls-inception.js +++ b/test/parallel/test-tls-inception.js @@ -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'); diff --git a/test/parallel/test-tls-interleave.js b/test/parallel/test-tls-interleave.js index fd93a05e593107..0c78e3e71a20c4 100644 --- a/test/parallel/test-tls-interleave.js +++ b/test/parallel/test-tls-interleave.js @@ -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'); diff --git a/test/parallel/test-tls-invoke-queued.js b/test/parallel/test-tls-invoke-queued.js index efa5c0aa9aa31d..8b0d0e1271d4b2 100644 --- a/test/parallel/test-tls-invoke-queued.js +++ b/test/parallel/test-tls-invoke-queued.js @@ -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'); diff --git a/test/parallel/test-tls-js-stream.js b/test/parallel/test-tls-js-stream.js index 1c5e749911b6be..ddfcaf94bf19c4 100644 --- a/test/parallel/test-tls-js-stream.js +++ b/test/parallel/test-tls-js-stream.js @@ -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'); diff --git a/test/parallel/test-tls-junk-closes-server.js b/test/parallel/test-tls-junk-closes-server.js index 5ee4e025f5dc18..5e20e753395912 100644 --- a/test/parallel/test-tls-junk-closes-server.js +++ b/test/parallel/test-tls-junk-closes-server.js @@ -2,7 +2,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-junk-server.js b/test/parallel/test-tls-junk-server.js index 4eb8129a11dfd6..af454730218f60 100644 --- a/test/parallel/test-tls-junk-server.js +++ b/test/parallel/test-tls-junk-server.js @@ -2,7 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-key-mismatch.js b/test/parallel/test-tls-key-mismatch.js index 2e17a4931078c7..f0eb8121bd68e5 100644 --- a/test/parallel/test-tls-key-mismatch.js +++ b/test/parallel/test-tls-key-mismatch.js @@ -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'); diff --git a/test/parallel/test-tls-legacy-onselect.js b/test/parallel/test-tls-legacy-onselect.js index d3b20d5d8a4cef..6151d503c4d0a5 100644 --- a/test/parallel/test-tls-legacy-onselect.js +++ b/test/parallel/test-tls-legacy-onselect.js @@ -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'); diff --git a/test/parallel/test-tls-max-send-fragment.js b/test/parallel/test-tls-max-send-fragment.js index d52cb86bcf74f4..ba609a7ee9d1cd 100644 --- a/test/parallel/test-tls-max-send-fragment.js +++ b/test/parallel/test-tls-max-send-fragment.js @@ -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'); diff --git a/test/parallel/test-tls-multi-key.js b/test/parallel/test-tls-multi-key.js index 86f135936c74c5..044beed307809d 100644 --- a/test/parallel/test-tls-multi-key.js +++ b/test/parallel/test-tls-multi-key.js @@ -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'); diff --git a/test/parallel/test-tls-no-cert-required.js b/test/parallel/test-tls-no-cert-required.js index 97863606cf2a96..72e24c59f63ae1 100644 --- a/test/parallel/test-tls-no-cert-required.js +++ b/test/parallel/test-tls-no-cert-required.js @@ -2,7 +2,7 @@ var common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-no-rsa-key.js b/test/parallel/test-tls-no-rsa-key.js index ff9806cdb02614..2d2055eae8f5b5 100644 --- a/test/parallel/test-tls-no-rsa-key.js +++ b/test/parallel/test-tls-no-rsa-key.js @@ -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'); diff --git a/test/parallel/test-tls-no-sslv23.js b/test/parallel/test-tls-no-sslv23.js index 702019a0bc8575..0db61afe0e97ec 100644 --- a/test/parallel/test-tls-no-sslv23.js +++ b/test/parallel/test-tls-no-sslv23.js @@ -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'); diff --git a/test/parallel/test-tls-no-sslv3.js b/test/parallel/test-tls-no-sslv3.js index 6298af11d20dc5..19c589dfaa9e87 100644 --- a/test/parallel/test-tls-no-sslv3.js +++ b/test/parallel/test-tls-no-sslv3.js @@ -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'); @@ -12,7 +12,7 @@ var fs = require('fs'); var spawn = require('child_process').spawn; if (common.opensslCli === false) { - console.log('1..0 # Skipped: node compiled without OpenSSL CLI.'); + common.skip('node compiled without OpenSSL CLI.'); return; } @@ -52,7 +52,7 @@ server.on('tlsClientError', (err) => errors.push(err)); process.on('exit', function() { if (/unknown option -ssl3/.test(stderr)) { - console.log('1..0 # Skipped: `openssl s_client -ssl3` not supported.'); + common.skip('`openssl s_client -ssl3` not supported.'); } else { assert.equal(errors.length, 1); assert(/:wrong version number/.test(errors[0].message)); diff --git a/test/parallel/test-tls-npn-server-client.js b/test/parallel/test-tls-npn-server-client.js index d74d65c8b03bd7..446d249c60856d 100644 --- a/test/parallel/test-tls-npn-server-client.js +++ b/test/parallel/test-tls-npn-server-client.js @@ -1,6 +1,6 @@ 'use strict'; if (!process.features.tls_npn) { - console.log('1..0 # Skipped: node compiled without OpenSSL or ' + + common.skip('node compiled without OpenSSL or ' + 'with old OpenSSL version.'); return; } @@ -10,7 +10,7 @@ const assert = require('assert'); const fs = require('fs'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-ocsp-callback.js b/test/parallel/test-tls-ocsp-callback.js index 27afb3431a48fc..190c7166940bcf 100644 --- a/test/parallel/test-tls-ocsp-callback.js +++ b/test/parallel/test-tls-ocsp-callback.js @@ -2,17 +2,17 @@ var common = require('../common'); if (!process.features.tls_ocsp) { - console.log('1..0 # Skipped: node compiled without OpenSSL or ' + + common.skip('node compiled without OpenSSL or ' + 'with old OpenSSL version.'); return; } if (!common.opensslCli) { - console.log('1..0 # Skipped: node compiled without OpenSSL CLI.'); + common.skip('node compiled without OpenSSL CLI.'); return; } if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-on-empty-socket.js b/test/parallel/test-tls-on-empty-socket.js index 84c95a99db5f7d..1b5a3f342f5cbc 100644 --- a/test/parallel/test-tls-on-empty-socket.js +++ b/test/parallel/test-tls-on-empty-socket.js @@ -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'); diff --git a/test/parallel/test-tls-over-http-tunnel.js b/test/parallel/test-tls-over-http-tunnel.js index cf3ad776f7c9de..eab72e411555b4 100644 --- a/test/parallel/test-tls-over-http-tunnel.js +++ b/test/parallel/test-tls-over-http-tunnel.js @@ -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'); diff --git a/test/parallel/test-tls-passphrase.js b/test/parallel/test-tls-passphrase.js index 05015399553fc8..f04c8e28076068 100644 --- a/test/parallel/test-tls-passphrase.js +++ b/test/parallel/test-tls-passphrase.js @@ -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'); diff --git a/test/parallel/test-tls-pause.js b/test/parallel/test-tls-pause.js index 6857773bb89008..cd26df723c6f20 100644 --- a/test/parallel/test-tls-pause.js +++ b/test/parallel/test-tls-pause.js @@ -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'); diff --git a/test/parallel/test-tls-peer-certificate-encoding.js b/test/parallel/test-tls-peer-certificate-encoding.js index 32b1583a0c4840..00f42c4065907b 100644 --- a/test/parallel/test-tls-peer-certificate-encoding.js +++ b/test/parallel/test-tls-peer-certificate-encoding.js @@ -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'); diff --git a/test/parallel/test-tls-peer-certificate-multi-keys.js b/test/parallel/test-tls-peer-certificate-multi-keys.js index 1d62bbaa032aa4..85b2fd3fa5533d 100644 --- a/test/parallel/test-tls-peer-certificate-multi-keys.js +++ b/test/parallel/test-tls-peer-certificate-multi-keys.js @@ -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'); diff --git a/test/parallel/test-tls-peer-certificate.js b/test/parallel/test-tls-peer-certificate.js index dfdaf93dbb439f..4448806b882944 100644 --- a/test/parallel/test-tls-peer-certificate.js +++ b/test/parallel/test-tls-peer-certificate.js @@ -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'); diff --git a/test/parallel/test-tls-pfx-gh-5100-regr.js b/test/parallel/test-tls-pfx-gh-5100-regr.js index 865ac2ba3f299a..4123efde71c7c6 100644 --- a/test/parallel/test-tls-pfx-gh-5100-regr.js +++ b/test/parallel/test-tls-pfx-gh-5100-regr.js @@ -3,7 +3,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: node compiled without crypto.'); + common.skip('node compiled without crypto.'); return; } diff --git a/test/parallel/test-tls-regr-gh-5108.js b/test/parallel/test-tls-regr-gh-5108.js index 5efcb76eab9c7f..af295fe0db170d 100644 --- a/test/parallel/test-tls-regr-gh-5108.js +++ b/test/parallel/test-tls-regr-gh-5108.js @@ -2,7 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-request-timeout.js b/test/parallel/test-tls-request-timeout.js index 0db2a613afc9e4..6c24c0c2ce0ba1 100644 --- a/test/parallel/test-tls-request-timeout.js +++ b/test/parallel/test-tls-request-timeout.js @@ -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'); diff --git a/test/parallel/test-tls-securepair-server.js b/test/parallel/test-tls-securepair-server.js index ef182f3b5ded19..f846f36d3ff89a 100644 --- a/test/parallel/test-tls-securepair-server.js +++ b/test/parallel/test-tls-securepair-server.js @@ -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'); diff --git a/test/parallel/test-tls-server-connection-server.js b/test/parallel/test-tls-server-connection-server.js index 534a16a440ca6c..41847cb8b362d0 100644 --- a/test/parallel/test-tls-server-connection-server.js +++ b/test/parallel/test-tls-server-connection-server.js @@ -2,7 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js index c9d4d263f5be7d..f1a6132a661a38 100644 --- a/test/parallel/test-tls-server-verify.js +++ b/test/parallel/test-tls-server-verify.js @@ -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; } @@ -99,7 +99,7 @@ var testCases = ]; if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js index ddceb973f5fc80..c2bebc39dd1934 100644 --- a/test/parallel/test-tls-session-cache.js +++ b/test/parallel/test-tls-session-cache.js @@ -2,12 +2,12 @@ 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; } if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-set-ciphers.js b/test/parallel/test-tls-set-ciphers.js index 696644cdc43a5b..efdd4260adbad3 100644 --- a/test/parallel/test-tls-set-ciphers.js +++ b/test/parallel/test-tls-set-ciphers.js @@ -2,12 +2,12 @@ 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; } if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/parallel/test-tls-set-encoding.js b/test/parallel/test-tls-set-encoding.js index ec728dad0c88ec..bd34ede8f5c188 100644 --- a/test/parallel/test-tls-set-encoding.js +++ b/test/parallel/test-tls-set-encoding.js @@ -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'); diff --git a/test/parallel/test-tls-sni-option.js b/test/parallel/test-tls-sni-option.js index b19c1bcb41d960..c548e2f4247649 100644 --- a/test/parallel/test-tls-sni-option.js +++ b/test/parallel/test-tls-sni-option.js @@ -1,6 +1,6 @@ 'use strict'; if (!process.features.tls_sni) { - console.log('1..0 # Skipped: node compiled without OpenSSL or ' + + common.skip('node compiled without OpenSSL or ' + 'with old OpenSSL version.'); return; } @@ -10,7 +10,7 @@ const assert = require('assert'); const fs = require('fs'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-sni-server-client.js b/test/parallel/test-tls-sni-server-client.js index 409f482d252f59..e228b76bea2abc 100644 --- a/test/parallel/test-tls-sni-server-client.js +++ b/test/parallel/test-tls-sni-server-client.js @@ -1,6 +1,6 @@ 'use strict'; if (!process.features.tls_sni) { - console.log('1..0 # Skipped: node compiled without OpenSSL or ' + + common.skip('node compiled without OpenSSL or ' + 'with old OpenSSL version.'); return; } @@ -10,7 +10,7 @@ const assert = require('assert'); const fs = require('fs'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); diff --git a/test/parallel/test-tls-socket-default-options.js b/test/parallel/test-tls-socket-default-options.js index c2c6e518bbc4d8..70f24ebf2b80ef 100644 --- a/test/parallel/test-tls-socket-default-options.js +++ b/test/parallel/test-tls-socket-default-options.js @@ -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 tls = require('tls'); diff --git a/test/parallel/test-tls-ticket-cluster.js b/test/parallel/test-tls-ticket-cluster.js index 1fd1776ca8199f..4d1667a7adcab2 100644 --- a/test/parallel/test-tls-ticket-cluster.js +++ b/test/parallel/test-tls-ticket-cluster.js @@ -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'); diff --git a/test/parallel/test-tls-ticket.js b/test/parallel/test-tls-ticket.js index ed776100026596..0e43ffaeaea0cb 100644 --- a/test/parallel/test-tls-ticket.js +++ b/test/parallel/test-tls-ticket.js @@ -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'); diff --git a/test/parallel/test-tls-timeout-server-2.js b/test/parallel/test-tls-timeout-server-2.js index 29cce0f6af8eca..44847e057311dc 100644 --- a/test/parallel/test-tls-timeout-server-2.js +++ b/test/parallel/test-tls-timeout-server-2.js @@ -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'); diff --git a/test/parallel/test-tls-timeout-server.js b/test/parallel/test-tls-timeout-server.js index 036d480b5ea039..2611dceab4e36c 100644 --- a/test/parallel/test-tls-timeout-server.js +++ b/test/parallel/test-tls-timeout-server.js @@ -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'); diff --git a/test/parallel/test-tls-wrap-timeout.js b/test/parallel/test-tls-wrap-timeout.js index d9e260f99e70c4..c260a03bf37b28 100644 --- a/test/parallel/test-tls-wrap-timeout.js +++ b/test/parallel/test-tls-wrap-timeout.js @@ -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'); diff --git a/test/parallel/test-tls-zero-clear-in.js b/test/parallel/test-tls-zero-clear-in.js index 652d6d176d7324..7b50bbd81e729c 100644 --- a/test/parallel/test-tls-zero-clear-in.js +++ b/test/parallel/test-tls-zero-clear-in.js @@ -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'); diff --git a/test/parallel/test-tty-wrap.js b/test/parallel/test-tty-wrap.js index 6f94199c2b97a1..fce4e194a8c6b1 100644 --- a/test/parallel/test-tty-wrap.js +++ b/test/parallel/test-tty-wrap.js @@ -1,12 +1,12 @@ 'use strict'; -require('../common'); +const common = require('../common'); var assert = require('assert'); var TTY = process.binding('tty_wrap').TTY; var isTTY = process.binding('tty_wrap').isTTY; if (isTTY(1) == false) { - console.log('1..0 # Skipped: fd 1 is not a tty.'); + common.skip('fd 1 is not a tty.'); return; } diff --git a/test/parallel/test-zlib-random-byte-pipes.js b/test/parallel/test-zlib-random-byte-pipes.js index c5d0adf2b4e2c4..f9804460c13ba7 100644 --- a/test/parallel/test-zlib-random-byte-pipes.js +++ b/test/parallel/test-zlib-random-byte-pipes.js @@ -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'); diff --git a/test/pummel/test-abort-fatal-error.js b/test/pummel/test-abort-fatal-error.js index 20d5c137d53aaf..f84440b9270d72 100644 --- a/test/pummel/test-abort-fatal-error.js +++ b/test/pummel/test-abort-fatal-error.js @@ -3,7 +3,7 @@ var assert = require('assert'); var common = require('../common'); if (common.isWindows) { - console.log('1..0 # Skipped: no RLIMIT_NOFILE on Windows'); + common.skip('no RLIMIT_NOFILE on Windows'); return; } diff --git a/test/pummel/test-crypto-dh.js b/test/pummel/test-crypto-dh.js index a2d41a5fa7c19d..081f4999c3d24e 100644 --- a/test/pummel/test-crypto-dh.js +++ b/test/pummel/test-crypto-dh.js @@ -4,7 +4,7 @@ const assert = require('assert'); const crypto = require('crypto'); if (!common.hasCrypto) { - console.log('1..0 # Skipped: node compiled without OpenSSL.'); + common.skip('node compiled without OpenSSL.'); return; } diff --git a/test/pummel/test-dh-regr.js b/test/pummel/test-dh-regr.js index 1ccf8ec239266f..448319318b44a4 100644 --- a/test/pummel/test-dh-regr.js +++ b/test/pummel/test-dh-regr.js @@ -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'); diff --git a/test/pummel/test-dtrace-jsstack.js b/test/pummel/test-dtrace-jsstack.js index f53c950baa32e9..b50794bd7b78cf 100644 --- a/test/pummel/test-dtrace-jsstack.js +++ b/test/pummel/test-dtrace-jsstack.js @@ -1,10 +1,10 @@ 'use strict'; -require('../common'); +const common = require('../common'); var assert = require('assert'); var os = require('os'); if (os.type() != 'SunOS') { - console.log('1..0 # Skipped: no DTRACE support'); + common.skip('no DTRACE support'); return; } @@ -80,4 +80,3 @@ dtrace.on('exit', function(code) { }); setTimeout(doogle, 10); - diff --git a/test/pummel/test-https-ci-reneg-attack.js b/test/pummel/test-https-ci-reneg-attack.js index 05622c896e4005..701963606e6d80 100644 --- a/test/pummel/test-https-ci-reneg-attack.js +++ b/test/pummel/test-https-ci-reneg-attack.js @@ -4,7 +4,7 @@ var assert = require('assert'); var spawn = require('child_process').spawn; if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); @@ -13,7 +13,7 @@ var https = require('https'); var fs = require('fs'); if (!common.opensslCli) { - console.log('1..0 # Skipped: node compiled without OpenSSL CLI.'); + common.skip('node compiled without OpenSSL CLI.'); return; } diff --git a/test/pummel/test-https-large-response.js b/test/pummel/test-https-large-response.js index 1979c6737f76b3..36d8e368709770 100644 --- a/test/pummel/test-https-large-response.js +++ b/test/pummel/test-https-large-response.js @@ -5,7 +5,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'); diff --git a/test/pummel/test-https-no-reader.js b/test/pummel/test-https-no-reader.js index 72b558cf2dbedb..fab59591993a69 100644 --- a/test/pummel/test-https-no-reader.js +++ b/test/pummel/test-https-no-reader.js @@ -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'); diff --git a/test/pummel/test-keep-alive.js b/test/pummel/test-keep-alive.js index 46190555b27263..1861b2df970e18 100644 --- a/test/pummel/test-keep-alive.js +++ b/test/pummel/test-keep-alive.js @@ -8,7 +8,7 @@ var http = require('http'); var url = require('url'); if (common.isWindows) { - console.log('1..0 # Skipped: no `wrk` on windows'); + common.skip('no `wrk` on windows'); return; } diff --git a/test/pummel/test-regress-GH-892.js b/test/pummel/test-regress-GH-892.js index 11cab1b8b6230e..8bbf3c8f1a0ff4 100644 --- a/test/pummel/test-regress-GH-892.js +++ b/test/pummel/test-regress-GH-892.js @@ -10,7 +10,7 @@ var assert = require('assert'); 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'); diff --git a/test/pummel/test-tls-ci-reneg-attack.js b/test/pummel/test-tls-ci-reneg-attack.js index 3fad5e6a4e7aac..b62b8944357ee7 100644 --- a/test/pummel/test-tls-ci-reneg-attack.js +++ b/test/pummel/test-tls-ci-reneg-attack.js @@ -4,7 +4,7 @@ var assert = require('assert'); var spawn = require('child_process').spawn; if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } var tls = require('tls'); @@ -12,7 +12,7 @@ var tls = require('tls'); var fs = require('fs'); if (!common.opensslCli) { - console.log('1..0 # Skipped: node compiled without OpenSSL CLI.'); + common.skip('node compiled without OpenSSL CLI.'); return; } diff --git a/test/pummel/test-tls-connect-memleak.js b/test/pummel/test-tls-connect-memleak.js index 41617ba259018c..2ea61ead6fe5c3 100644 --- a/test/pummel/test-tls-connect-memleak.js +++ b/test/pummel/test-tls-connect-memleak.js @@ -5,7 +5,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'); diff --git a/test/pummel/test-tls-securepair-client.js b/test/pummel/test-tls-securepair-client.js index 3d33ef8f21623f..5dd2af65b2ba5f 100644 --- a/test/pummel/test-tls-securepair-client.js +++ b/test/pummel/test-tls-securepair-client.js @@ -4,12 +4,12 @@ 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; } if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/pummel/test-tls-server-large-request.js b/test/pummel/test-tls-server-large-request.js index d15cb15c2ad8d8..db31c28a9d508e 100644 --- a/test/pummel/test-tls-server-large-request.js +++ b/test/pummel/test-tls-server-large-request.js @@ -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'); diff --git a/test/pummel/test-tls-session-timeout.js b/test/pummel/test-tls-session-timeout.js index 64548e204342e6..225d743eb8ab89 100644 --- a/test/pummel/test-tls-session-timeout.js +++ b/test/pummel/test-tls-session-timeout.js @@ -2,12 +2,12 @@ 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; } if (!common.hasCrypto) { - console.log('1..0 # Skipped: missing crypto'); + common.skip('missing crypto'); return; } diff --git a/test/pummel/test-tls-throttle.js b/test/pummel/test-tls-throttle.js index 0e5cd455c8c4c4..d80544eae610e7 100644 --- a/test/pummel/test-tls-throttle.js +++ b/test/pummel/test-tls-throttle.js @@ -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 tls = require('tls'); diff --git a/test/sequential/test-child-process-emfile.js b/test/sequential/test-child-process-emfile.js index 2ac0b6c0b23a73..f186db54016a40 100644 --- a/test/sequential/test-child-process-emfile.js +++ b/test/sequential/test-child-process-emfile.js @@ -5,7 +5,7 @@ const child_process = require('child_process'); const fs = require('fs'); if (common.isWindows) { - console.log('1..0 # Skipped: no RLIMIT_NOFILE on Windows'); + common.skip('no RLIMIT_NOFILE on Windows'); return; } diff --git a/test/sequential/test-net-server-address.js b/test/sequential/test-net-server-address.js index e0c5b08be2be9b..3c5d1bf6d28852 100644 --- a/test/sequential/test-net-server-address.js +++ b/test/sequential/test-net-server-address.js @@ -20,7 +20,7 @@ server_ipv4.listen(common.PORT, common.localhostIPv4, function() { }); if (!common.hasIPv6) { - console.log('1..0 # Skipped: ipv6 part of test, no IPv6 support'); + common.skip('ipv6 part of test, no IPv6 support'); return; }