rust/src/test/rustdoc-ui
bors 6add378d6b 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" }
```
2020-11-29 04:54:20 +00:00
..
auxiliary Add test to ensure that external items aren't lint-checked 2020-10-09 20:25:44 +02:00
coverage Update coverage output now that primitives have proper spans 2020-11-26 14:23:42 -05:00
error-in-impl-trait add error-in-impl-trait const generics test 2020-11-11 21:24:03 +01:00
.gitattributes fix intra-link resolution spans in block comments 2018-12-10 21:08:26 -05:00
assoc-item-not-in-scope.rs rustdoc: Only resolve traits in scope 2020-08-22 00:25:29 -04:00
assoc-item-not-in-scope.stderr Name the current module 2020-09-11 14:52:45 -04:00
cfg-test.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
cfg-test.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
check-attr-test.rs rustdoc: Rename invalid_codeblock_attribute lint to be plural 2020-07-07 18:29:26 +01:00
check-attr-test.stderr rustdoc: Rename invalid_codeblock_attribute lint to be plural 2020-07-07 18:29:26 +01:00
check-attr.rs rustdoc: Rename invalid_codeblock_attribute lint to be plural 2020-07-07 18:29:26 +01:00
check-attr.stderr rustdoc: Rename invalid_codeblock_attribute lint to be plural 2020-07-07 18:29:26 +01:00
check-doc-alias-attr-location.rs Clean up rustdoc tests by removing unnecessary features 2020-11-25 14:27:51 +01:00
check-doc-alias-attr-location.stderr Clean up rustdoc tests by removing unnecessary features 2020-11-25 14:27:51 +01:00
check-doc-alias-attr.rs Clean up rustdoc tests by removing unnecessary features 2020-11-25 14:27:51 +01:00
check-doc-alias-attr.stderr Clean up rustdoc tests by removing unnecessary features 2020-11-25 14:27:51 +01:00
check-fail.rs Ensure that INVALID_CODEBLOCK_ATTRIBUTES lint is emitted 2020-11-12 22:41:10 +01:00
check-fail.stderr Ensure that INVALID_CODEBLOCK_ATTRIBUTES lint is emitted 2020-11-12 22:41:10 +01:00
check.rs Add tests for rustdoc --check option 2020-11-12 14:58:07 +01:00
check.stderr Add tests for rustdoc --check option 2020-11-12 14:58:07 +01:00
deny-intra-link-resolution-failure.rs intra_doc_resolution_failures -> broken_intra_doc_links 2020-07-30 10:38:55 -07:00
deny-intra-link-resolution-failure.stderr Improve error messages 2020-10-02 19:53:09 -07:00
deny-missing-docs-crate.rs Removed more copyright notices. 2019-01-13 19:47:02 +00:00
deny-missing-docs-crate.stderr fix one more test 2020-03-22 17:18:30 -05:00
deny-missing-docs-macro.rs Removed more copyright notices. 2019-01-13 19:47:02 +00:00
deny-missing-docs-macro.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00
deprecated-attrs.rs Moving all rustdoc-ui tests to check-pass 2020-04-19 16:40:53 -07:00
deprecated-attrs.stderr rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
doc-alias-assoc-const.rs Clean up rustdoc tests by removing unnecessary features 2020-11-25 14:27:51 +01:00
doc-alias-assoc-const.stderr Clean up rustdoc tests by removing unnecessary features 2020-11-25 14:27:51 +01:00
doc-alias-crate-level.rs Enforce crate level attributes checks 2020-10-04 13:36:47 +02:00
doc-alias-crate-level.stderr Enforce crate level attributes checks 2020-10-04 13:36:47 +02:00
doc-test-doctest-feature.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
doc-test-doctest-feature.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
doc-test-rustdoc-feature.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
doc-test-rustdoc-feature.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
doc-without-codeblock.rs Fix some rustdoc error capitalization 2019-11-24 18:42:22 -08:00
doc-without-codeblock.stderr x.py test --bless 2020-11-21 11:08:58 -05:00
doctest-output.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
doctest-output.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
failed-doctest-compile-fail.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
failed-doctest-compile-fail.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
failed-doctest-missing-codes.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
failed-doctest-missing-codes.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
failed-doctest-output.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
failed-doctest-output.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
failed-doctest-should-panic.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
failed-doctest-should-panic.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
impl-fn-nesting.rs Catch errors for any new item, not just trait implementations 2020-07-15 10:54:06 -04:00
impl-fn-nesting.stderr Catch errors for any new item, not just trait implementations 2020-07-15 10:54:06 -04:00
infinite-recursive-type-impl-trait-return.rs Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
infinite-recursive-type-impl-trait-return.stderr Add another test 2020-08-08 10:19:56 -04:00
infinite-recursive-type-impl-trait.rs EXTREMELY hacky fix 2020-08-07 21:26:12 -04:00
infinite-recursive-type-impl-trait.stderr EXTREMELY hacky fix 2020-08-07 21:26:12 -04:00
infinite-recursive-type.rs Don't ICE on infinitely recursive types 2020-07-15 10:54:05 -04:00
infinite-recursive-type.stderr EXTREMELY hacky fix 2020-08-07 21:26:12 -04:00
intra-doc-alias-ice.rs intra_doc_resolution_failures -> broken_intra_doc_links 2020-07-30 10:38:55 -07:00
intra-doc-alias-ice.stderr Name the current module 2020-09-11 14:52:45 -04:00
intra-doc-broken-reexport.rs Add test to ensure that external items aren't lint-checked 2020-10-09 20:25:44 +02:00
intra-link-double-anchor.rs Upgrade to pulldown-cmark 0.8.0 2020-09-13 20:15:01 -04:00
intra-link-double-anchor.stderr Don't use link.span yet 2020-09-13 21:31:26 -04:00
intra-link-errors.rs Allow generic parameters in intra-doc links 2020-10-08 22:24:34 -07:00
intra-link-errors.stderr Get rid of doctree::Impl 2020-11-22 13:52:31 -05:00
intra-link-malformed-generics.rs Allow generic parameters in intra-doc links 2020-10-08 22:24:34 -07:00
intra-link-malformed-generics.stderr Allow generic parameters in intra-doc links 2020-10-08 22:24:34 -07:00
intra-link-prim-conflict.rs Say 'prefix with kind@' instead of 'prefix with the item kind' 2020-09-05 13:56:55 -04:00
intra-link-prim-conflict.stderr Say 'prefix with kind@' instead of 'prefix with the item kind' 2020-09-05 13:56:55 -04:00
intra-link-span-ice-55723.rs intra_doc_resolution_failures -> broken_intra_doc_links 2020-07-30 10:38:55 -07:00
intra-link-span-ice-55723.stderr Improve error messages 2020-10-02 19:53:09 -07:00
intra-links-ambiguity.rs Apply suggestions from code review 2020-10-10 15:52:57 +02:00
intra-links-ambiguity.stderr x.py test --bless 2020-11-21 11:08:58 -05:00
intra-links-anchors.rs intra_doc_resolution_failures -> broken_intra_doc_links 2020-07-30 10:38:55 -07:00
intra-links-anchors.stderr Use rustc_resolve's descr() instead of rewriting it 2020-09-05 13:48:19 -04:00
intra-links-disambiguator-mismatch.rs Say 'prefix with kind@' instead of 'prefix with the item kind' 2020-09-05 13:56:55 -04:00
intra-links-disambiguator-mismatch.stderr Say 'prefix with kind@' instead of 'prefix with the item kind' 2020-09-05 13:56:55 -04:00
intra-links-private.private.stderr Separate private_intra_doc_links and broken_intra_doc_links into separate lints 2020-09-27 09:58:29 -04:00
intra-links-private.public.stderr Separate private_intra_doc_links and broken_intra_doc_links into separate lints 2020-09-27 09:58:29 -04:00
intra-links-private.rs rustdoc: Always warn when linking from public to private items 2020-07-22 21:36:30 +02:00
intra-links-warning-crlf.rs refactor and reword intra-doc link errors 2020-07-20 18:44:15 -04:00
intra-links-warning-crlf.stderr Improve error messages 2020-10-02 19:53:09 -07:00
intra-links-warning.rs refactor and reword intra-doc link errors 2020-07-20 18:44:15 -04:00
intra-links-warning.stderr Get rid of doctree::Function 2020-11-24 09:54:53 -05:00
invalid-html-tags.rs Add test to ensure that "invalid HTML tag" lint isn't fired in code blocks 2020-11-16 16:44:41 +01:00
invalid-html-tags.stderr Handle multi-line HTML comments 2020-10-14 10:25:55 +02:00
invalid-keyword.rs Add tests for doc_keyword feature extension 2020-11-27 17:54:28 +01:00
invalid-keyword.stderr Add tests for doc_keyword feature extension 2020-11-27 17:54:28 +01:00
invalid-syntax.rs Moving all rustdoc-ui tests to check-pass 2020-04-19 16:40:53 -07:00
invalid-syntax.stderr rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
issue-58473-2.rs Moving all rustdoc-ui tests to check-pass 2020-04-19 16:40:53 -07:00
issue-58473.rs Moving all rustdoc-ui tests to check-pass 2020-04-19 16:40:53 -07:00
issue-61732.rs resolve: Fix regression in resolution of raw keywords in paths 2020-03-14 19:21:38 +03:00
issue-61732.stderr resolve: Fix regression in resolution of raw keywords in paths 2020-03-14 19:21:38 +03:00
issue-74134.private.stderr Separate private_intra_doc_links and broken_intra_doc_links into separate lints 2020-09-27 09:58:29 -04:00
issue-74134.public.stderr Separate private_intra_doc_links and broken_intra_doc_links into separate lints 2020-09-27 09:58:29 -04:00
issue-74134.rs rustdoc: Always warn when linking from public to private items 2020-07-22 21:36:30 +02:00
lint-group.rs Add test for invalid_html_tag lint in deny(rustdoc) 2020-10-03 14:16:24 +02:00
lint-group.stderr Auto merge of #77119 - GuillaumeGomez:unclosed-html-tag-lint, r=jyn514 2020-10-07 09:56:51 +00:00
lint-missing-doc-code-example.rs Strenghten tests for missing_doc_code_examples lint 2020-08-21 18:08:19 +02:00
lint-missing-doc-code-example.stderr x.py test --bless 2020-11-21 11:08:58 -05:00
no-crate-level-doc-lint.rs Update lint name to follow convention 2020-03-22 13:04:23 +01:00
no-crate-level-doc-lint.stderr Update lint name to follow convention 2020-03-22 13:04:23 +01:00
private-doc-test.rs Add test for ignored private doc test 2020-09-12 19:02:15 +02:00
private-item-doc-test.rs Fix some rustdoc error capitalization 2019-11-24 18:42:22 -08:00
private-item-doc-test.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00
pub-export-lint.rs Remove unneeded ImportItem on glob ones 2020-10-09 20:26:06 +02:00
pub-export-lint.stderr Remove unneeded ImportItem on glob ones 2020-10-09 20:26:06 +02:00
reference-link-has-one-warning.rs Generate docs for links to private items when passed --document-private 2020-06-26 07:23:39 -04:00
reference-link-has-one-warning.stderr intra_doc_resolution_failures -> broken_intra_doc_links 2020-07-30 10:38:55 -07:00
test-compile-fail1.rs rustdoc: Fix handling of compile errors when running rustdoc --test 2020-01-18 23:51:06 +00:00
test-compile-fail1.stderr rustdoc: Fix handling of compile errors when running rustdoc --test 2020-01-18 23:51:06 +00:00
test-compile-fail2.rs rustdoc: Fix handling of compile errors when running rustdoc --test 2020-01-18 23:51:06 +00:00
test-compile-fail2.stderr rustdoc: Fix handling of compile errors when running rustdoc --test 2020-01-18 23:51:06 +00:00
test-compile-fail3.rs rustdoc: Fix handling of compile errors when running rustdoc --test 2020-01-18 23:51:06 +00:00
test-compile-fail3.stderr Update UI tests 2020-06-21 16:40:36 +02:00
test-no_std.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
test-no_std.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
unknown-renamed-lints.rs Warn about unknown or renamed lints 2020-08-25 10:17:07 -04:00
unknown-renamed-lints.stderr Warn about unknown or renamed lints 2020-08-25 10:17:07 -04:00
unparseable-doc-test.rs libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
unparseable-doc-test.stdout libtest: Print the total time taken to execute a test suite 2020-11-27 17:53:59 +01:00
unused-braces-lint.rs Add rustdoc regression test for the unused_braces lint 2020-04-24 19:15:07 +02:00
unused.rs Moving all rustdoc-ui tests to check-pass 2020-04-19 16:40:53 -07:00
url-improvements.rs Rename lint to non_autolinks 2020-11-05 10:22:08 +01:00
url-improvements.stderr Rename lint to non_autolinks 2020-11-05 10:22:08 +01:00