diff options
| author | bors <bors@rust-lang.org> | 2020-11-29 04:54:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-29 04:54:20 +0000 |
| commit | 6add378d6b77a727697f2920a9cc85a63766297e (patch) | |
| tree | 3e0961bf1c566673bc4600092b8c78daee4a2ddf /library/std/src/sys/unix/stack_overflow.rs | |
| parent | 40d7efad5e581c60a81171d96d78696b7ed65009 (diff) | |
| parent | 322f53d8a8da14da5371ca040ade5497112178cf (diff) | |
| download | rust-6add378d6b77a727697f2920a9cc85a63766297e.tar.gz rust-6add378d6b77a727697f2920a9cc85a63766297e.zip | |
Auto merge of #75752 - jakoschiko:test-suite-time, r=m-ou-se
libtest: Print the total time taken to execute a test suite
Print the total time taken to execute a test suite by default, without any kind of flag.
Closes #75660
# Example
```
anon@anon:~/code/rust/example$ cargo test
Compiling example v0.1.0 (/home/anon/code/rust/example)
Finished test [unoptimized + debuginfo] target(s) in 0.18s
Running target/debug/deps/example-745b64d3885c3565
running 3 tests
test tests::foo ... ok
test tests::bar ... ok
test tests::baz ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; 1.2s
Doc-tests example
running 3 tests
test src/lib.rs - foo (line 3) ... ok
test src/lib.rs - bar (line 11) ... ok
test src/lib.rs - baz (line 19) ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; 1.3s
```
```
anon@anon:~/code/rust/example$ cargo test -- --format terse
Finished test [unoptimized + debuginfo] target(s) in 0.08s
Running target/debug/deps/example-745b64d3885c3565
running 3 tests
...
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; 1.2s
Doc-tests example
running 3 tests
...
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; 1.3s
```
```
anon@anon:~/code/rust/example$ cargo test -- --format json -Z unstable-options
Compiling example v0.1.0 (/home/anon/code/rust/example)
Finished test [unoptimized + debuginfo] target(s) in 0.25s
Running target/debug/deps/example-745b64d3885c3565
{ "type": "suite", "event": "started", "test_count": 3 }
{ "type": "test", "event": "started", "name": "tests::bar" }
{ "type": "test", "event": "started", "name": "tests::baz" }
{ "type": "test", "event": "started", "name": "tests::foo" }
{ "type": "test", "name": "tests::foo", "event": "ok" }
{ "type": "test", "name": "tests::bar", "event": "ok" }
{ "type": "test", "name": "tests::baz", "event": "ok" }
{ "type": "suite", "event": "ok", "passed": 3, "failed": 0, "allowed_fail": 0, "ignored": 0, "measured": 0, "filtered_out": 0, "exec_time": "1.2s" }
Doc-tests example
{ "type": "suite", "event": "started", "test_count": 3 }
{ "type": "test", "event": "started", "name": "src/lib.rs - bar (line 11)" }
{ "type": "test", "event": "started", "name": "src/lib.rs - baz (line 19)" }
{ "type": "test", "event": "started", "name": "src/lib.rs - foo (line 3)" }
{ "type": "test", "name": "src/lib.rs - foo (line 3)", "event": "ok" }
{ "type": "test", "name": "src/lib.rs - bar (line 11)", "event": "ok" }
{ "type": "test", "name": "src/lib.rs - baz (line 19)", "event": "ok" }
{ "type": "suite", "event": "ok", "passed": 3, "failed": 0, "allowed_fail": 0, "ignored": 0, "measured": 0, "filtered_out": 0, "exec_time": "1.3s" }
```
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
