Commit Graph

50 Commits

Author SHA1 Message Date
Santiago Gimeno
282dc7bc22 test: improve tap output on test failures
Print `errmsg` on TAP output. After making the TAP output the default,
the info in `errmsg` was not being used anymore.

PR-URL: https://github.com/libuv/libuv/pull/1012
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-24 10:47:14 +01:00
Ben Noordhuis
7e7e221260 test: remove unused RETURN_TODO macro
PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-10 10:08:15 +02:00
Ben Noordhuis
b936ace934 test: improve formatting of diagnostic messages
Put a space after the '#' and handle messages with newlines.

PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-10 10:08:13 +02:00
Ben Noordhuis
dd9f751ead test: don't dump output for skipped tests
A skipped test already prints a diagnostic.  Dumping its output just
prints the same message twice.

PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-10 10:08:11 +02:00
Ben Noordhuis
cc1d38ea93 test: make tap output the default
With the non-tap output, it's sometimes difficult to distinguish skipped
tests from test failures.

PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-10 10:07:45 +02:00
Jeremy Whitlock
eb3f48ebaf win: do not read more from stream than available
On Windows the pipe implementation could read more from a stream than
was available and it would create an assertion failure.  This change
will make it so we read the minimum of the available data or the length
of the data.

To test this, I took the existing ipc_send_recv_tcp test and updated it
to do two writes and two read on each side of the pipe since that was the
reproduction recipe used by the reporter.  This approach reproduced the
issue on Windows and the committed fix resolved the issue.

Fixes: https://github.com/libuv/libuv/issues/505
PR-URL: https://github.com/libuv/libuv/pull/549
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-12-08 09:28:15 +01:00
Louis DeJardin
dfdecf0006 pipe: enable inprocess uv_write2 on Windows
When duplicating the socket handle being sent the target process
id is defaulted to the current process id. This enables uv_write2
to be used for thread-clustering in addition to process-clustering on
multi-threaded programming languages.

The ipc tests are updated to run in two modes. In the _inproc mode
the echo work is done on a second thread instead of in a second
process.

An internal function int uv_current_pid() is added to the windows
specific code which caches the value of GetCurrentProcessId(). This
means uv_write2 does not call GetCurrentProcessId() every inprocess
send.

Refs: https://github.com/joyent/libuv/issues/926
PR-URL: https://github.com/libuv/libuv/pull/540
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-11-06 09:33:15 +01:00
Saúl Ibarra Corretgé
cdc10a907a test: remove LOG and LOGF variadic macros
Initial patch by @simar7, thanks!

PR-URL: https://github.com/libuv/libuv/pull/313
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-12 18:44:34 +02:00
Ben Noordhuis
ff29322b99 test: canonicalize test runner path
The get_currentexe test requires a canonicalized argv[0] to check
against.  Before this commit, it failed when argv[0] contained symbolic
links.

Fixes libuv/libuv#18.
2014-12-01 16:20:51 +01:00
Dylan Cali
756087e017 test: support flexibly setting custom task options
Add a single TEST_ENTRY_CUSTOM hook that can be used to override task
entry defaults. Different tests can have different timeouts depending on
what is appropriate for each test. A separate TEST_OUTPUT_ENTRY hook is
no longer necessary.

In order to support per-task timeouts, the timeout field has been moved
into the task_entry_t struct. The default (5000) is now set as part of
TEST_ENTRY.
2014-02-01 00:50:40 +04:00
Ben Noordhuis
f5baf210df test: wrap long lines at 80 columns 2013-09-11 17:29:43 +02:00
Miroslav Bajtoš
2c21050956 test: add RETURN_SKIP and RETURN_TODO macros
Added two new flags to identify tests that are intentionally ignored
(usually because we don't want to implement the tested functionality
on current platform) and test serving as TODO list (usually indicating
that the tested functionality should be implemented on current plaform
in the near future.)
2013-05-08 15:43:54 -07:00
Timothy J Fontaine
49d2ae33ef test: fix tap output even when ok but have output 2013-02-27 22:48:54 +01:00
Ben Noordhuis
1821bba408 test: fix tap output check
Only report as an error when status != 0.

Stops the platform_output test from being reported as having failed
on Jenkins.
2013-02-27 22:20:14 +01:00
Timothy J Fontaine
72bbf5d702 test: don't rewind_cursor when using tap_output 2013-02-25 19:00:16 +01:00
Timothy J Fontaine
bfe269b8a0 test: add tap output
Given UV_TAP_OUTPUT being set, test result output should use TAP formatting
2013-02-22 23:06:17 +01:00
Ben Noordhuis
1c722d6c22 test: make fmt() not leak memory 2012-12-24 12:03:25 +01:00
Bert Belder
47eb03490a test: move loop cleanup code to the individual tests 2012-10-17 01:24:49 +02:00
Ben Noordhuis
f090297f62 test: delete default loop after test run
Delete the default event loop after the test completes. Keeps valgrind happy.
2012-10-01 22:53:59 +02:00
Ben Noordhuis
4e268f7718 test: add valgrind support
Run tests through valgrind when UV_USE_VALGRIND=1 is set in the environment.
2012-10-01 22:53:59 +02:00
Bert Belder
c85672eb13 test: avoid compiler complaints about implicit double-to-int cast 2012-08-13 22:31:45 +02:00
Ben Noordhuis
123ca8b87e test: make fmt() function global 2012-06-29 02:29:21 +02:00
Maciej Małecki
c92788e503 test: fix test runner progress bar
Make % completed indicator actually show % completed instead of 0 %.
2012-06-09 18:09:26 +02:00
Ben Noordhuis
34445d0741 test: remove stale UNIX socket before running test
Fixes spurious test and benchmark failures.
2012-05-26 01:42:40 +02:00
Ben Noordhuis
ad024040fc test: prevent accidental division by zero 2012-05-07 16:41:05 +02:00
Ben Noordhuis
6031156602 test: silence compiler warning
main_proc is never read without having been initialized first but gcc 4.4.x
fails to infer that.
2012-03-15 16:09:06 +01:00
Bert Belder
0d6aa2a2e5 Windows: output newline before output from passed tests 2012-03-09 17:15:00 +01:00
Bert Belder
e99fba47c8 Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	src/win/pipe.c
	test/run-tests.c
2012-03-09 16:41:12 +01:00
Bert Belder
743cab9f9d Test runner: avoid process_wait failure when the test process didn't start 2012-03-08 16:44:30 +01:00
Maciej Małecki
b06da4cbab test: make test runner return non-zero in case of failure 2011-12-12 02:08:28 +01:00
Bruce Mitchener
d513d9bb41 Fix typos. 2011-11-30 14:35:13 +01:00
Igor Zinkovsky
3d189de699 platform api 2011-12-14 17:50:36 -08:00
Ben Noordhuis
7dda111306 test, bench: add --list option to runners, prints available tests 2011-08-06 23:57:28 +02:00
Ben Noordhuis
7fbe0c3882 test: run-tests helper_name runs helper in same process
Fixes #116.
2011-07-21 19:02:19 +02:00
Ryan Dahl
685c083c79 Only sleep on 'make bench' not on 'make test' 2011-07-20 12:18:07 -07:00
Ben Noordhuis
eb5e00fd1b runner: give helpers a chance to clean up after the test.
Fixes #50.
2011-07-20 21:13:00 +02:00
Ryan Dahl
abf854597b Don't output progress in 'make bench'
Fixes #115.
2011-07-20 11:44:10 -07:00
Ben Noordhuis
9aff11026b runner: bring back benchmark output 2011-07-14 03:33:56 +02:00
Ben Noordhuis
a29b2099ac Make it possible to run individual tests.
Fixes #100.
2011-07-14 02:19:36 +02:00
Ryan Dahl
6d07c0d522 benchmarks should print helper output too 2011-06-09 19:45:19 +02:00
Ryan Dahl
b2df6d9a99 Increase racy sleep to make some tests pass 2011-06-08 15:18:03 +02:00
Ryan Dahl
3ee60b7351 test runner separator should be paired with progress bar 2011-06-07 14:23:40 +02:00
Bert Belder
d5b3ae0f58 usleep -> uv_sleep 2011-05-27 19:41:34 +02:00
Ryan Dahl
7e34b7bdfc runner: insert little delay after starting helpers 2011-05-27 01:47:42 -07:00
Igor Zinkovsky
9fc8a7f167 Adds uv_get_exepath API
Only works on Linux, Mac, Windows currently.
2011-05-24 08:40:27 -07:00
Ryan Dahl
9f652d4729 Benchmarks print their own name 2011-05-09 21:39:02 -07:00
Ryan Dahl
8c6c48595a Make test runner better.
Probably screws up windows.
Fixes #30.
2011-04-28 15:19:11 -04:00
Bert Belder
5275b036b0 Benchmark runner 2011-04-19 04:47:21 +02:00
Ryan Dahl
cf4fbc0925 Add copyright headers, license file.
closes #17.
2011-04-18 11:11:30 -07:00
Bert Belder
a3be5339e2 Rename test-runner to just runner
And a minor fix to the VS solution.
2011-04-18 14:44:01 +02:00