0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

37 Commits

Author SHA1 Message Date
Sakthipriyan Vairamani
d5ab92bcc1 test: use common.isWindows consistently
In the tests, we use "process.platform === 'win32'" in some places.
This patch replaces them with the "common.isWindows" for consistency.

PR-URL: https://github.com/nodejs/io.js/pull/2269
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-07-31 00:29:36 +05:30
Sakthipriyan Vairamani
4e78cd71c0 test: skip IPv6 part before testing it
PR-URL: https://github.com/nodejs/io.js/pull/2226
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-07-27 23:24:03 +05:30
Sakthipriyan Vairamani
79c865a53f test: changing process.exit to return while skipping tests
This patch uses `return` statement to skip the test instead of using
`process.exit` call.

PR-URL: https://github.com/nodejs/io.js/pull/2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-07-20 15:50:42 +05:30
Sakthipriyan Vairamani
69298d36cf test: formatting skip messages for TAP parsing
This patch makes the skip messages consistent so that the TAP plugin
in CI can parse the messages properly. The format will be

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

PR-URL: https://github.com/nodejs/io.js/pull/2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-07-20 15:46:30 +05:30
Roman Reiss
d4ceb16da2 test: properly clean up temp directory
A persistent failure on OS X 10.11 uncovered a inproperly cleaned up
temp directory in this test. This changes the mkdirSync call to clean up
properly in case it throws.

PR-URL: https://github.com/nodejs/io.js/pull/2164
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-07-12 01:09:25 +02:00
Sakthipriyan Vairamani
9cd44bb2b6 util: prepend '(node) ' to deprecation messages
Changes included in this commit are

   1. Making the deprecation messages consistent. The messages will be in
      the following format

           x is deprecated. Use y instead.

      If there is no alternative for `x`, then the ` Use y instead.` part
      will not be there in the message.

   2. All the internal deprecation messages are printed with the prefix
      `(node) `, except when the `--trace-deprecation` flag is set.

Fixes: https://github.com/nodejs/io.js/issues/1883
PR-URL: https://github.com/nodejs/io.js/pull/1892
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-07-03 16:32:29 +02:00
Roman Reiss
e3f9335c40 tools: re-enable comma-spacing linter rule
The rule was disabled because of an eslint bug which is now resolved.
All code in lib was already conforming and only test code needed a few
changes to make the linter happy with this rule enabled.

Ref: https://github.com/eslint/eslint/issues/2408

PR-URL: https://github.com/nodejs/io.js/pull/2072
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alex Kocharin <alex@kocharin.ru>
2015-06-29 19:04:16 +02:00
Roman Reiss
fb8811d95e lib,test: fix whitespace issues
PR-URL: https://github.com/nodejs/io.js/pull/1971
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-15 16:37:37 +02:00
Rich Trott
7c79490bfb test: only refresh tmpDir for tests that need it
Expose `common.refreshTmpDir()` and only call it
for tests that use common.tmpDir or common.PIPE.

A positive side effect is the removal of a code
smell where child processes were detected by the
presence of `.send()`. Now each process can decide
for itself if it needs to refresh tmpDir.

PR-URL: https://github.com/nodejs/io.js/pull/1954
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-13 22:27:17 -07:00
Rich Trott
a6b8ee19b8 test: create temp dir in common.js
Move creation of temporary directories for tests
out of the Python harness and into common.js. This
allows all tests to be run reliably outside of the
Python wrapper.

PR-URL: https://github.com/nodejs/io.js/pull/1877
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-12 10:27:29 +10:00
Rod Vagg
f78c722df5 test: remove hardwired references to 'iojs'
PR-URL: https://github.com/nodejs/io.js/pull/1882
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-06-03 16:53:05 +02:00
Evan Lucas
5b6f575c1f Revert "src: add getopt option parser"
This reverts commit c0e7bf2d8c.

There are a few edge cases that can cause a crash
and need to be properly handled.

PR-URL: https://github.com/nodejs/io.js/pull/1862
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-01 11:25:32 -05:00
Evan Lucas
c0e7bf2d8c src: add getopt option parser
Options have been moved into the NodeOptions class.
A new global, node_options now exists and is used
to access the options after the command line arguments
have been parsed.

PR-URL: https://github.com/nodejs/io.js/pull/1804
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-01 08:39:06 -05:00
Roman Reiss
f29762f4dd test: enable linting for tests
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.

test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.

PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-19 21:21:27 +02:00
Rod Vagg
f9b226c1c1 test: extend timeouts for ARMv6
Based on tests running on original Raspberry Pi

PR-URL: https://github.com/iojs/io.js/pull/1554
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-04-29 19:28:11 +10:00
Roman Reiss
7049d7b474 test: increase timeouts on ARM
This commit introduces platform-specific test timeouts for the ARM
architectures. ARMv6 is notoriously slow so gets very large timeouts on
both the timeout value for each test, as well as certain problematic
individual tests. ARMv7 and ARMv8 also get slightly increased headroom.

PR-URL: https://github.com/iojs/io.js/pull/1366
Fixes: https://github.com/iojs/io.js/issues/1343
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-09 15:10:34 +02:00
Roman Reiss
955c1508da test: reduce sequential/test-fs-watch flakiness
The fs.watch test's write events sometimes aren't produced on OS X,
possibly because of a fsevents race condition. This patch gives delays
the writing a total of 20ms, which makes the test pass consistently.

PR-URL: https://github.com/iojs/io.js/pull/1275
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-03-27 17:08:07 +01:00
Ben Noordhuis
9705a34e96 test: move sequential/test-signal-unregister
Move sequential/test-signal-unregister to test/parallel, it doesn't
need to run in sequential mode.

PR-URL: https://github.com/iojs/io.js/pull/1227
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-03-23 00:56:16 +01:00
Ben Noordhuis
10a9c00563 test: fix timing issue in signal test
Change sequential/test-signal-unregister so it doesn't use fixed
timeouts for sending the signal and expecting the child to quit.

Fixes: https://github.com/iojs/io.js/issues/1223
PR-URL: https://github.com/iojs/io.js/pull/1227
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-03-23 00:55:34 +01:00
Rod Vagg
f600111d82 test: cache lazy properties, fix style nits
inFreeBSDJail involves an execSync() and is used by localhost_ipv4 so
will be unnecessarily expensive, so cache both values and reuse
rather than re-evaluate each time.

Renamed localhost_ipv4 to localhostIPv4 for style consistency.

PR-URL: https://github.com/iojs/io.js/pull/1196
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-03-19 16:27:45 +11:00
Johan Bergström
c15e81afdd test: Introduce knowledge of FreeBSD jails
FreeBSD jails act differently than your average vm or similar
application container. All routing passes through one ip address,
which makes things like localhost or 0.0.0.0 resolve differently.

Introduce a helper that allows us to verify if we're in a jail
and another one for returning an ip address for localhost.

Also, skip one test instead of trading additional complexity
in common.js for one specific user scenario.

PR-URL: https://github.com/iojs/io.js/pull/1167
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-03-19 09:11:50 +11:00
Shigeki Ohtsu
82f067e60b test: fix ext commands to be double quoted
Paths used on the Windows command line need to be enclosed in double
quotes, or they'll be parsed incorrectly when there are spaces in the
path.

PR-URL: https://github.com/iojs/io.js/pull/1122
Reviewed-by: Bert Belder <bertbelder@gmail.com>
2015-03-12 17:35:20 -07:00
Johan Bergström
671fbd5a9d test: refactor all tests that depends on crypto
we had a few ways versions of looking for support before executing a test. this
commit unifies them as well as add the check for all tests that previously
lacked them. found by running `./configure --without-ssl && make test`. also,
produce tap skip output if the test is skipped.

PR-URL: https://github.com/iojs/io.js/pull/1049
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-03-05 10:31:41 +09:00
Brendan Ashworth
0df54303c1 test: common.js -> common
This commit changes many test styles to change all references
from require('./common.js'); to require('./common');.

The latter is much more common, with the former only being used in 50
tests. It is just a stylistic change, and it seems that `common.js` was
introduced by a rogue test and copied and pasted into the rest.

Semver: patch
PR-URL: https://github.com/iojs/io.js/pull/917
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-22 19:34:17 -08:00
Glen Keane
5e825d1073 tracing: add lttng support for tracing on linux
This commit adds the ability to enable userspace tracing with lttng
in io.js. It adds tracepoints for all the equivalent dtrace and ETW
tracepoints. To use these tracepoints enable --with-lttng on linux.

PR-URL: https://github.com/iojs/io.js/pull/702
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ryan Graham <ryan@strongloop.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-02-09 18:06:57 +01:00
Vladimir Kurchatkin
8de89ec465 lib: move default address logic to net._listen2
When address is not provided to `server.listen()`, `_connectionKey` and
error messages should include actual address and correct family.

PR-URL: https://github.com/iojs/io.js/pull/539
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-23 18:09:39 +01:00
Ben Noordhuis
1ea607cb29 test: move sequential/test-debug-port-from-cmdline
Move sequential/test-debug-port-from-cmdline to test/parallel.  Per the
previous commit, it should now be possible to run the test in parallel
with other debugger tests.

PR-URL: https://github.com/iojs/io.js/pull/501
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 19:30:04 +01:00
Julien Gilli
2f33e00d71 test: fix test-debug-port-from-cmdline.js
Make this test less prone to race conditions by using synchronous
interprocess communication instead of a timer to determine when the
child process is ready to receive messages from its parent.

Also, remove a superfluous timer since the tests suite already makes
tests time out after a while.

Original-PR-URL: https://github.com/joyent/node/pull/9049
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>

PR-URL: https://github.com/iojs/io.js/pull/501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 19:29:18 +01:00
Fedor Indutny
27e9ed6e98 test: fix setproctitle on FreeBSD
PR-URL: https://github.com/iojs/io.js/pull/332
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-13 20:36:44 +03:00
isaacs
3e1b1dd4a9 Remove excessive copyright/license boilerplate
The copyright and license notice is already in the LICENSE file.  There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
2015-01-12 15:30:28 -08:00
Ben Noordhuis
c8676cb361 test: move sequential/test-debug-port-cluster
Move sequential/test-debug-port-cluster to test/parallel.  This test
is safe to run in parallel with other debugger tests, it doesn't use
fixed port numbers.

PR-URL: https://github.com/iojs/io.js/pull/306
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
2015-01-12 18:31:34 +01:00
Ben Noordhuis
3da4f87b32 test: move sequential/test-debug-signal-cluster
Move sequential/test-debug-signal-cluster to test/parallel.  Per the
previous commit, it can now run in parallel with other debugger tests.

PR-URL: https://github.com/iojs/io.js/pull/306
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
2015-01-12 18:31:31 +01:00
Ben Noordhuis
11c1bae734 lib: make --debug-port work with cluster
Make the cluster module intercept the `--debug-port=<port>` command line
switch and replace it with the debug port of the child process.

A happy coincidence of this change is that it finally makes it possible
to run the sequential/test-debug-signal-cluster in parallel, it now no
longer needs the default port numbers.

PR-URL: https://github.com/iojs/io.js/pull/306
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
2015-01-12 18:31:29 +01:00
Ben Noordhuis
5ec5fd83d4 test: delete sequential/test-debug-cluster
The test does not work well with concurrent invocations of the test
runner because it uses fixed port numbers.  The functionality it tests
is covered by sequential/test-debug-port-cluster, a verbatim copy with
the only difference being that it doesn't use fixed port numbers.

PR-URL: https://github.com/iojs/io.js/pull/306
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
2015-01-12 18:30:54 +01:00
Caitlin Potter
be2404e0d3 core: throw TypeError if chdir() args are wrong
PR-URL: https://github.com/iojs/io.js/pull/274
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-09 18:36:15 +01:00
cjihrig
5678595856 fs: deprecate exists() and existsSync()
These methods don't follow standard conventions, and shouldn't
be used anyway.

Fixes: https://github.com/iojs/io.js/issues/103
PR-URL: https://github.com/iojs/io.js/pull/166
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-19 10:27:48 -05:00
Fedor Indutny
0e19476595 test: split test in parallel/sequential
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/172
Fix: iojs/io.js#139
2014-12-17 20:45:02 +07:00