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

138 Commits

Author SHA1 Message Date
Gibson Fahnestock
57f6a106fb test: fix temp-dir option in tools/test.py
If a temp-dir is specified and already exists, the NODE_TEST_DIR
environment variable will never be set. This fixes that.

PR-URL: https://github.com/nodejs/node/pull/10723
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-01-12 13:32:02 -08:00
Sakthipriyan Vairamani (thefourtheye)
26bf9545e0
Revert "test: test.py add option to use node in path"
This reverts commit 4198253a18.

PR-URL: https://github.com/nodejs/node/pull/10613

Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-04 23:17:59 +05:30
George Adams
4198253a18 test: test.py add option to use node in path
This pr adds the ability to run `tools/test.py --path`. This means that
instead of defaulting to out/Release we can use the node version from
the path.

PR-URL: https://github.com/nodejs/node/pull/9674
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-04 12:18:50 +00:00
Anna Henningsen
def6dfb62c
test: set stdin too for pseudo-tty tests
Ref: https://github.com/nodejs/node/pull/10037
Ref: https://github.com/nodejs/node/pull/10146
PR-URL: https://github.com/nodejs/node/pull/10149
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-09 15:19:52 +01:00
Francis Gulotta
951ba0d0a9 tools: allow test.py to use full paths of tests
Allow test.py to run tests with a 'tests/' prefix or a '.js' postfix

PR-URL: https://github.com/nodejs/node/pull/9694
Fixes: https://github.com/nodejs/node/issues/9684
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-26 16:19:56 +08:00
Johan Bergström
b634ef70da test: output tap13 instead of almost-tap
Produce a tap13-compatible output which makes it
simpler to parse. Output is still readable by
the jenkins tap plugin.

PR-URL: https://github.com/nodejs/node/pull/9262
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-11-10 15:22:54 -03:00
Rich Trott
60a78aedb9 tools: make --repeat work with -j in test.py
The repeat option in test.py did not work as expected if `-j` was set to
more than one. Repeated tests running at the same time could share temp
directories and cause test failures. This was observed with:

    tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive

By using copy.deepCopy(), the repeated tests are separate objects and
not references to the same objects. Setting `thread_id` on one of them
will now not change the `thread_id` on all of them. And `thread_id` is
how the temp directory (and common.PORT as well) are determined.

Refs: https://github.com/nodejs/node/pull/9228
PR-URL: https://github.com/nodejs/node/pull/9249
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-10-26 12:15:57 -07:00
Eugene Ostroukhov
b4a249f66b inspector: introduce a smoke test
This test executes a simple debug session over the inspector protocol.

PR-URL: https://github.com/nodejs/node/pull/8429
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
2016-09-19 12:40:16 -07:00
Santiago Gimeno
df4ef63aa5 tools,test: show signal code when test crashes
On every platform but `Windows`. Also, print the crash information when
using the tap reporter.

PR-URL: https://github.com/nodejs/node/pull/7859
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-31 23:05:59 +02:00
Sakthipriyan Vairamani
780776cf60 tools: cleanup no-build and build-only options
As the `no-build` and `build-only` options are not used anymore, they
can be safely removed.

PR-URL: https://github.com/nodejs/node/pull/7620
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-12 09:35:31 +05:30
Sakthipriyan Vairamani
89ede72fca tools: remove unnecessary imports and assignments
PR-URL: https://github.com/nodejs/node/pull/7483
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-07-08 20:17:08 +05:30
Rod Vagg
05de4d78a6 test: add note about duration_ms in TAP reporter
PR-URL: https://github.com/nodejs/node/pull/7216
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-06-13 21:55:49 +10:00
Rod Vagg
1d4c7993a9 Revert "test: change duration_ms to duration"
This reverts commit d413378e51.

PR-URL: https://github.com/nodejs/node/pull/7216
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-06-13 21:55:34 +10:00
Gibson Fahnestock
d413378e51 test: change duration_ms to duration
The test script (tools/test.py) logs duration as "duration_ms: x.y".
This is confusing (as the duration is measured in seconds).

New example output: duration: 0.212s

PR-URL: https://github.com/nodejs/node/pull/7133
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-06 08:54:07 -07:00
Jeremiah Senkpiel
88804b84ec test: test TTY problems by fakeing a TTY using openpty
Many thanks to thefourtheye and addaleax who helped make the python
bits of this possible.

See https://github.com/nodejs/node/issues/6980 for more info regarding
the related TTY issues.

Refs: https://github.com/nodejs/node/issues/6456
Refs: https://github.com/nodejs/node/pull/6773
Refs: https://github.com/nodejs/node/pull/6816
PR-URL: https://github.com/nodejs/node/pull/6895
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-06-01 18:59:01 -04:00
Ben Noordhuis
5b72f891a8 test: fix component printing on windows
Commit 084b2ec ("test: include component in tap output") introduced
an in hindsight glaringly obvious but fortunately not very critical
Windows-specific bug by failing to take the path separator into account.
This commit rectifies that, the prefix is now correctly stripped.

PR-URL: https://github.com/nodejs/node/pull/6915
Refs: https://github.com/nodejs/node/pull/6653
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-22 09:00:11 +02:00
Jeremiah Senkpiel
4babe656b4 tools: print stderr on bad test.py vmArch check
This makes it so you can see why the check fails if it does.

Typically that sort of thing can happen if you are modifying
bootstrapping or `process`.

PR-URL: https://github.com/nodejs/node/pull/6786
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-19 09:53:24 -04:00
Ben Noordhuis
084b2ec198 test: include component in tap output
Print test name as (for example) "parallel/test-assert".  Tests that are
scraped from the addons documentation are all named test.js, making it
hard to decipher what test is running when only the filename is printed.

Fixes: https://github.com/nodejs/node/issues/6651
PR-URL: https://github.com/nodejs/node/pull/6653
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-13 23:38:24 +02:00
Michael Dawson
ccbb00e2cc test: add --repeat option to tools/test.py
I often want to run a test many times to see if a failure
can be recreated and I believe this is a common
use case.  We even have this job in the CI
https://ci.nodejs.org/job/node-stress-single-test/configure
but often you want to run it on a specific machine.

This patch adds the --repeat option so that
you can repeat the selected set of tests a
number of times. Given existing options
in test.py this will allow you to run
one or more tests for the number of
repeats specified. For example:

tools/test.py -j8 --repeat 1000 parallel/test-process-exec-argv

runs the test-process-exec-argv test 1000 times,
running 8 copies in parallel

tools/test.py --repeat 2

would run the entire test suite twice.

PR-URL: https://github.com/nodejs/node/pull/6700
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-05-13 09:26:20 -04:00
Ian Kronquist
2e845f8501
tools: add tests for the doctool
* Test the toHTML function in html.js. Check that given valid markdown
  it produces the expected html. One test case will prevent regressions
  of #5873.
* Check that when given valid markdown toJSON produces valid JSON with
  the expected schema.
* Add doctool to the list of built in tests so it runs in CI.

PR-URL: https://github.com/nodejs/node/pull/6031
Fixes: https://github.com/nodejs/node/issues/5955
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-04-29 00:45:49 +02:00
Santiago Gimeno
858b4b3770 test: make arch available in status files
The value is retrieved from `process.arch` in node itself.

PR-URL: https://github.com/nodejs/node/pull/5997
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-04-04 14:51:06 -07:00
Michael Dawson
a4c4a852a9 build: enable compilation for linuxOne
Changes to Node core in order to allow compilation for linuxOne.

The ../archs/linux32-s390x/opensslconf.h and
../archs/linux64-s390x/opensslconf.h were automatically
generated by running make linux-ppc linux-ppc64 in the
deps/openssl/config directory as per our standard
practice

After these changes we still need a version of v8
which supports linuxOne but that will be coming soon
in the 5.1 version of v8.  Until then with these changes
we'll be able to create a hybrid build which pulls in
v8 from the http://github/andrewlow repo.

PR-URL: https://github.com/nodejs/node/pull/5941
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-29 18:52:48 -04:00
cjihrig
32e1f9d0b5 tools: support testing known issues
This commit adds a known_issues directory to the test directory
for scripts that reproduce known bugs. Since these scripts are
expected to fail, it also adds a --expect-fail flag to test.py
which reports tests as successful when they fail.

Refs: https://github.com/nodejs/testing/issues/18
PR-URL: https://github.com/nodejs/node/pull/5528
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-03-04 08:50:42 -05:00
Stefan Budeanu
c98d159ed3 test: fix test runner arg regression
Append --node-args to existing list, don't overwrite arg list.

Fixes: https://github.com/nodejs/node/issues/5442
PR-URL: https://github.com/nodejs/node/pull/5446
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
2016-02-26 12:43:03 -05:00
Stefan Budeanu
23a584d517 test: allow passing args to executable
Add --node-args option that will pass arguments.

PR-URL: https://github.com/nodejs/node/pull/5376
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-02-25 14:28:39 -05:00
Johan Bergström
1170b26261 test: inherit JOBS from environment
In some virtualized environments the amount of available resources
are misleading; for instance `multiprocessing.cpu_count()` on our current
4-core smartos vm's returns `48`. This is not a bug, merely how the vm
host provides information about available hardware.

Avoid running into issues by overriding `cpu_count()` with `JOBS`.

PR-URL: https://github.com/nodejs/node/pull/4495
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-12-31 18:29:07 +11:00
Johan Bergström
8132b942a7 test: make temp path customizable
In CI we previously passed `NODE_COMMON_PIPE` to the test runner to
avoid long filenames. Add an option to the test runner that allows the
user to change the temporary directory instead. This also allows us to
run test suites in parallel since `NODE_COMMON_PIPE` otherwise would
have been used from multiple tests at the same time.

PR-URL: https://github.com/nodejs/node/pull/3325
Reviewed-By: Joao Reis <reis@janeasystems.com>
2015-12-30 15:47:37 +11:00
Rich Trott
41519fd1a4 test: add TAP diagnostic message for retried tests
Tests on SmartOS are sometimes retried due to a SmartOS issue on CI.
When this happens, a TAP diagnostic message is written.

PR-URL: https://github.com/nodejs/node/pull/3960
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-11-24 08:17:12 -08:00
Rich Trott
8bc8038687 test: retry on smartos if ECONNREFUSED
SmartOS has a bug that causes unexpected ECONNREFUSED errors.

See https://smartos.org/bugview/OS-2767

If ECONNREFUSED on SmartOS, retry the test one time.

Fixes: https://github.com/nodejs/node/issues/3864
Fixes: https://github.com/nodejs/node/issues/2815
PR-URL: https://github.com/nodejs/node/pull/3941
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-11-23 12:21:10 -08:00
Karl Skomski
10924ce8ed test: report timeout in TapReporter
Be slightly more verbose in cases where tests time out.

PR-URL: https://github.com/nodejs/node/pull/2647
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-10-07 22:26:04 +11:00
Sakthipriyan Vairamani
91e7e9c0a0 tools: open test.tap file in write-binary mode
By default the logfile is opened in append mode. This commit makes sure
that the file is opened in write-binary mode, so that the file will be
created if it doesn't exist or overwrite if it exists.

Fixes: #2834

PR-URL: #2837
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
2015-09-15 10:12:22 +05:30
Sakthipriyan Vairamani
de051757e2 tools: remove hyphen in TAP result
As it is, the TAP result shows an extra hyphen in front of test names.
Sample:
ci.nodejs.org/job/node-test-commit-osx/nodes=osx1010/454/tapResults/
This patch removes the extra hyphen.

PR-URL: https://github.com/nodejs/node/pull/2718
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-09-12 10:53:11 +05:30
Alexis Campailla
8c41b9a826 test: runner should return 0 on flaky tests
Make the test runner return a 0 exit code when only
flaky tests fail and --flaky-tests=dontcare is specified.

Ported from a9b642cf5b

PR-URL: https://github.com/nodejs/node/pull/2424
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-27 05:49:18 +02:00
Alexis Campailla
c8caf8d616 test: runner support for flaky tests
Adding --flaky-tests option, to allow regarding flaky tests failures
as non-fatal.

Currently only observed by the TapProgressIndicator, which will
add a # TODO directive to tests classified as flaky. According to the
TAP specification, the test harness is supposed to treat failures
that have a # TODO directive as non-fatal.

Ported from df3a2b2cf2

PR-URL: https://github.com/nodejs/node/pull/2424
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-27 05:48:59 +02:00
cjihrig
a69ab27ab4 node: rename from io.js to node
This commit replaces instances of io.js with Node.js, based on the
recent convergence. There are some remaining instances of io.js,
related to build and the installer.

Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-23 17:59:43 -04:00
João Reis
a642a76ef4 test: option to run a subset of tests
With this option, tests can be divided in groups and only one is run
from each group. This enables us to parallelize the tests across
multiple machines.

PR-URL: https://github.com/nodejs/io.js/pull/2260
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-08-13 10:21:24 +01:00
Michael Dawson
b4226e797a build: first set of updates to enable PPC support
These are the core changes that allow pLinux BE/LE compile. They
don't include all of the changes needed for AIX which will follow
once we have pLinux up and running in the builds

PR-URL: https://github.com/nodejs/io.js/pull/2124
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: Johan Bergstrom <bugs@bergstroem.nu>
2015-08-04 11:56:16 -07:00
Johan Bergström
3cbb5870e5 tools: expose skip output to test runner
In the TAP protocol, skips are flagged as ok. Expose more
information so we can understand if the test was skipped or not.

PR-URL: https://github.com/nodejs/io.js/pull/2130
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-30 08:45:03 +02:00
Johan Bergström
8606793999 tools: pass constant to logger instead of string
On a few of our installations (namely CentOS), passing 'INFO'
resulted in a silent loglevel. Use a logging constant instead.

Fixes: https://github.com/nodejs/build/issues/104
PR-URL: https://github.com/nodejs/io.js/pull/1842
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-05-30 14:46:22 +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
Ben Noordhuis
3066f2c0c3 test: double test timeout on arm machines
The ARM buildbots are notoriously slow.  Update the test runner to
double the per-test time limit when it's running on one of them.

PR-URL: https://github.com/iojs/io.js/pull/1357
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-04-07 16:18:12 +02:00
Johan Bergström
a7bdce249c test: support writing test output to file
This is a minimal effort to support test output written both to
stdout and file in order to get our buildbots understanding
test output.

PR-URL: https://github.com/iojs/io.js/pull/934
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-24 12:02:42 -06:00
Rod Vagg
20f8e7f17a test: remove flaky test functionality
Reverts https://github.com/joyent/node/pull/8689

PR-URL: https://github.com/iojs/io.js/pull/812
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-16 15:27:33 +11:00
Ben Noordhuis
7861ff4728 test: create test-ci, modify test-all, fix cpplint
test: add test/addons to default test list

`make test-all` and `python tools/test.py` will now also run the addon
tests in test/addons.

test: remove test-npm from test-all make target

The test-npm target builds documentation, changes versioned files,
clutters the current working directory with artifacts, etc.  In short,
it doesn't seem quite ready for inclusion in `make test-all`.

test: add test-ci target, reduced test-all

Add a test-ci target that is like test-all minus the (slow) pummel and
gc test suites.

This is primarily intended for the continuous integration, where we want
decent coverage but don't want to wait for ages for tests to complete.

cpplint: add -license/copyright to default filters

Commit 3e1b1dd ("Remove excessive copyright/license boilerplate") trips
up the copyright boilerplate style check.  Disable it.

PR-URL: https://github.com/iojs/io.js/pull/314
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-13 13:46:52 +11:00
Bert Belder
b57e9a9973 win,test: try again if file unlink fails
Now that parallel tests are enabled, the test runner spits out a ton of
'access denied' errors while running the tests. These happen because a
virus scanner or the indexing service temporarily open the file after it
has been updated, and the test runner tries to unlink() them at the same
time.

This patch resolves this issue by attempting to unlink the file until it
succeeds.

PR-URL: https://github.com/iojs/io.js/pull/284
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-11 01:54:35 +01:00
Chris Dickinson
12912c6b30 tools: enable ctrl-c for parallel tests
use a threading.Event instead of a boolean attribute.

PR-URL: https://github.com/iojs/io.js/pull/277
Fixes: https://github.com/iojs/io.js/issues/260
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-09 15:23:19 -08:00
Ben Noordhuis
f17f473af5 build: rename binary from node to iojs
* rename the build targets

* update the test runner to use `out/{Debug,Release}/iojs`

* update the installer to install the iojs binary

* update one test that explicitly checks for the binary name

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-01-08 23:21:20 +01:00
Ben Noordhuis
3e7a25dd95 test: remove --use-http1 test runner flag
The flag was used for a short while during the v0.5 development cycle,
four years ago.  Remove it, it's long overdue.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-01-08 23:21:18 +01:00
Fedor Indutny
b7d247856e test: run tests in parallel, common improvements
* Allow running tests in mixed parallel/sequential modes
* Add -J flag for running tests on all available CPUs
* Support TEST_THREAD_ID in test/common.js and use it for tmpDir and PORT
* make: use -J flag

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:37 +07: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
Alexis Campailla
7f87b82fc4 test: runner support for flaky tests
Adding --flaky-tests option, to allow regarding flaky tests failures
as non-fatal.

Currently only observed by the TapProgressIndicator, which will
add a # TODO directive to tests classified as flaky. According to the
TAP specification, the test harness is supposed to treat failures
that have a # TODO directive as non-fatal.
2014-12-09 17:57:11 +01:00
Ben Noordhuis
edaf7af30b test: make test runner multi-arch/mode compatible
Make `python tools/test.py --arch=ia32,x64 --mode=debug,release` work.
The test runner looks for the `node` binary in `out/${arch}.${mode}/`.

Running tools/test.py without --arch makes it use `out/Release/node` or
`out/Debug/node` like before.

This commit removes `test/simple/test-executable-path.js` because the
assumptions it makes about the locations of the debug and release
binaries are now outdated.

PR-URL: https://github.com/node-forward/node/pull/24
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-10-16 22:39:34 +02:00
Timothy J Fontaine
574f71444c test: move debugger repl into own section 2014-01-20 09:00:13 -08:00
Timothy J Fontaine
56492de5b9 test: don't use total_seconds() because of py2.6 2013-05-07 15:33:47 -07:00
Timothy J Fontaine
ee4f0baeac test: report test duration in TAP progress 2013-05-07 13:13:44 -07:00
Ben Noordhuis
b5c172138c tools: fix test.py after v8 upgrade
test.py imports deps/v8/tools/utils.py but that file is gone after the
upgrade to 3.18.4 in commit 2f75785. Resurrect the file in tools/
2013-04-29 23:08:57 +02:00
Timothy J Fontaine
fb6dd0c0b5 test: test name is the last elem, not second
When a test requires node to have parameters passed (--expose-gc) the
test name will be the last element in the command array, not the second.
2013-03-26 00:21:41 +01:00
Ben Noordhuis
d019bec72d Merge remote-tracking branch 'origin/v0.8' 2013-02-28 23:13:54 +01:00
Timothy J Fontaine
d032ff4954 test: fix tap output on windows
Test output is always \n and not platform dependent
2013-02-28 23:13:05 +01:00
Timothy J Fontaine
9d45b945f7 test: add TAP output to the test runner
This is a back-port of commit 14ed173 from the master branch.
2013-02-20 18:50:55 +01:00
Ben Noordhuis
a6756a2c06 test: run tests in alphabetical order 2013-01-10 01:58:30 +01:00
Ben Noordhuis
fa3bfc3a66 test: put tty in blocking mode after test
Tests can leave the tty in non-blocking mode. If the test runner tries
to print to stdout/stderr after that and the tty buffer is full, it'll
die with a EAGAIN OSError. Ergo, put the tty back in blocking mode
before proceeding.
2013-01-07 03:59:10 +01:00
Timothy J Fontaine
14ed1732ce test: add TAP output to the test runner 2012-12-19 11:16:23 +01:00
isaacs
8a411bae66 Revert "tests: kill process group on failure"
This reverts commit 0cebfc8ddb.
2012-05-28 20:02:49 -07:00
isaacs
e63c7821d5 Tests for memory leaks
Conflicts:

	Makefile
2012-05-04 14:30:54 -07:00
Fedor Indutny
0cebfc8ddb tests: kill process group on failure
Test suite is often leaving `stray` processes on failure. They are
harmless, but may cause future test runs fail because those `stray`
processes are occupying `common.PORT` or due to some other reasons.

Killing whole process group on test suite failure should help in such
cases.
2012-02-20 22:07:19 +06:00
Ryan Dahl
850609ea2d Remove separation of libuv tests 2011-11-02 16:38:59 -07:00
Ryan Dahl
06428d853c tools/test.py to support marking files a libuv-broken
Use

  export NODE_USE_UV=1
  python tools/test.py --libuv simple pummel

To run the equivalent of "make test-uv".
2011-08-23 23:45:46 -07:00
Ryan Dahl
4fa13152af Support MSVS build directories in tools/test.py 2011-08-23 19:59:07 -07:00
Ryan Dahl
a7300c8297 WAF builds in out/ instead of build/ 2011-08-23 14:10:39 -07:00
Ryan Dahl
879eb16280 Have WAF variants match GYP configuration names 2011-08-23 14:10:35 -07:00
Ryan Dahl
f145e35a93 Tests should point at the build directory until GYP is default 2011-08-08 17:01:44 -07:00
Ryan Dahl
43d7cfca18 gyp: fix test runner 2011-08-06 03:12:06 -07:00
Ben Noordhuis
38f948a373 http: make http2 the default, legacy backend is available with --use-http1
Fixes #1441.
2011-08-02 23:40:56 +02:00
Ben Noordhuis
e1bb241b51 test: add targets test-http2 and test-all-http2
Passes `--use-http2` to node. Fixes #1430.
2011-08-02 01:52:24 +02:00
Bert Belder
25ce5016f4 Fix test runner bug on windows 2011-02-17 10:52:28 -08:00
Bert Belder
4eea3e45bd make test somewhat works 2010-12-20 23:51:21 +01:00
Bert Belder
3c3d1d31c5 Better way of getting rid of symlinks
Windows, especially msysgit, doesn't like 'em
2010-12-20 23:51:21 +01:00
Ryan Dahl
97c9745063 Back to WAF
Too much instability right now. Hopefully we can revisit autoconf soon.
2010-11-01 16:51:20 -07:00
Ryan Dahl
15594eaf87 Replace WAF with make/autoconf 2010-10-24 18:39:36 -07:00
Ryan Dahl
97255c2651 Fix test harness for Linux
Mostly just upgraded tools/test.py to the latest one that's in V8.  But also
fixing the before and after hooks to preserve the test/tmp directory so that
running tests manually usually works.
2010-10-18 14:54:39 -07:00
isaacs
85fb47c11c Better temporary directory handling for tests.
Add a setUp and tearDown function to the test case class, and use it to
create and remove the test/tmp directory for each test.

TODO: amend other tests.
2010-09-09 16:43:18 -07:00
Ryan Dahl
1c7057f09c Execute message tests by default 2010-06-19 20:30:49 -07:00
arlolra
04fac19822 Split tests. 2010-02-25 11:41:11 -08:00
Ryan Dahl
e5a41a75b7 Revert "Adding output of Platform information into the test runner"
Broken on at least one platform http://pastie.org/808217

This reverts commit 704f394c66.
2010-02-03 12:57:05 -08:00
Micheil Smith
704f394c66 Adding output of Platform information into the test runner 2010-01-29 23:46:56 -08:00
Ryan
18a1923604 Update test script to use new debug build's name: node_g 2009-08-31 16:12:27 +02:00
Ryan
3fed1a0954 Use v8's test runner 2009-06-22 14:08:42 +02:00