diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-07-30 19:49:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-30 19:49:02 +0200 |
| commit | 61760fbda4309c7ecccb4766933b3ad127dd718d (patch) | |
| tree | 704057f748cfc99e1aff66153334e11fe3422d70 /tests | |
| parent | b38ece9021f6682887d729aa0466188eed9b7500 (diff) | |
| parent | 64e3078bbd6b5ac7246735c9ee0a16a091e6f45f (diff) | |
| download | rust-61760fbda4309c7ecccb4766933b3ad127dd718d.tar.gz rust-61760fbda4309c7ecccb4766933b3ad127dd718d.zip | |
Rollup merge of #144308 - GuillaumeGomez:merged-doctest-times, r=lolbinarycat
[rustdoc] Display total time and compilation time of merged doctests Fixes rust-lang/rust#144270. Does it look good to you `@kpreid?` <img width="908" height="263" alt="image" src="https://github.com/user-attachments/assets/cd5d082d-c4e0-42ed-91dd-bd263b413dcd" />
Diffstat (limited to 'tests')
28 files changed, 135 insertions, 96 deletions
diff --git a/tests/rustdoc-ui/2024-doctests-checks.rs b/tests/rustdoc-ui/2024-doctests-checks.rs index 0c3a11771f3..61f90fe6231 100644 --- a/tests/rustdoc-ui/2024-doctests-checks.rs +++ b/tests/rustdoc-ui/2024-doctests-checks.rs @@ -3,6 +3,8 @@ //@ compile-flags: --test --test-args=--test-threads=1 //@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" /// ``` diff --git a/tests/rustdoc-ui/2024-doctests-checks.stdout b/tests/rustdoc-ui/2024-doctests-checks.stdout index 534fe466fe7..c86eafd61b9 100644 --- a/tests/rustdoc-ui/2024-doctests-checks.stdout +++ b/tests/rustdoc-ui/2024-doctests-checks.stdout @@ -1,12 +1,13 @@ running 1 test -test $DIR/2024-doctests-checks.rs - Foo (line 8) ... ok +test $DIR/2024-doctests-checks.rs - Foo (line 10) ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME running 1 test -test $DIR/2024-doctests-checks.rs - Foo (line 15) ... ok +test $DIR/2024-doctests-checks.rs - Foo (line 17) ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/2024-doctests-crate-attribute.rs b/tests/rustdoc-ui/2024-doctests-crate-attribute.rs index c9887cbc63b..416d50cb070 100644 --- a/tests/rustdoc-ui/2024-doctests-crate-attribute.rs +++ b/tests/rustdoc-ui/2024-doctests-crate-attribute.rs @@ -4,6 +4,8 @@ //@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" /// This doctest is used to ensure that if a crate attribute is present, /// it will not be part of the merged doctests. diff --git a/tests/rustdoc-ui/2024-doctests-crate-attribute.stdout b/tests/rustdoc-ui/2024-doctests-crate-attribute.stdout index c084ac4522e..20618426312 100644 --- a/tests/rustdoc-ui/2024-doctests-crate-attribute.stdout +++ b/tests/rustdoc-ui/2024-doctests-crate-attribute.stdout @@ -1,12 +1,13 @@ running 1 test -test $DIR/2024-doctests-crate-attribute.rs - Foo (line 20) ... ok +test $DIR/2024-doctests-crate-attribute.rs - Foo (line 22) ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME running 1 test -test $DIR/2024-doctests-crate-attribute.rs - Foo (line 11) ... ok +test $DIR/2024-doctests-crate-attribute.rs - Foo (line 13) ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/dead-code-2024.rs b/tests/rustdoc-ui/doctest/dead-code-2024.rs index 079d44570bb..e02d2601c58 100644 --- a/tests/rustdoc-ui/doctest/dead-code-2024.rs +++ b/tests/rustdoc-ui/doctest/dead-code-2024.rs @@ -4,6 +4,8 @@ //@ compile-flags:--test //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 #![doc(test(attr(allow(unused_variables), deny(warnings))))] diff --git a/tests/rustdoc-ui/doctest/dead-code-2024.stdout b/tests/rustdoc-ui/doctest/dead-code-2024.stdout index a943a177e10..bf9cd65200b 100644 --- a/tests/rustdoc-ui/doctest/dead-code-2024.stdout +++ b/tests/rustdoc-ui/doctest/dead-code-2024.stdout @@ -1,18 +1,18 @@ running 1 test -test $DIR/dead-code-2024.rs - f (line 13) - compile ... FAILED +test $DIR/dead-code-2024.rs - f (line 15) - compile ... FAILED failures: ----- $DIR/dead-code-2024.rs - f (line 13) stdout ---- +---- $DIR/dead-code-2024.rs - f (line 15) stdout ---- error: trait `T` is never used - --> $DIR/dead-code-2024.rs:14:7 + --> $DIR/dead-code-2024.rs:16:7 | LL | trait T { fn f(); } | ^ | note: the lint level is defined here - --> $DIR/dead-code-2024.rs:12:9 + --> $DIR/dead-code-2024.rs:14:9 | LL | #![deny(warnings)] | ^^^^^^^^ @@ -23,7 +23,8 @@ error: aborting due to 1 previous error Couldn't compile the test. failures: - $DIR/dead-code-2024.rs - f (line 13) + $DIR/dead-code-2024.rs - f (line 15) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/dead-code-items.rs b/tests/rustdoc-ui/doctest/dead-code-items.rs index 015504cbced..ff59bfaabc4 100644 --- a/tests/rustdoc-ui/doctest/dead-code-items.rs +++ b/tests/rustdoc-ui/doctest/dead-code-items.rs @@ -4,6 +4,8 @@ //@ compile-flags:--test --test-args=--test-threads=1 //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 #![doc(test(attr(deny(warnings))))] diff --git a/tests/rustdoc-ui/doctest/dead-code-items.stdout b/tests/rustdoc-ui/doctest/dead-code-items.stdout index 4b9d8be94dd..ecfe09f09ce 100644 --- a/tests/rustdoc-ui/doctest/dead-code-items.stdout +++ b/tests/rustdoc-ui/doctest/dead-code-items.stdout @@ -1,30 +1,30 @@ running 13 tests -test $DIR/dead-code-items.rs - A (line 32) - compile ... ok -test $DIR/dead-code-items.rs - A (line 88) - compile ... ok -test $DIR/dead-code-items.rs - A::field (line 39) - compile ... FAILED -test $DIR/dead-code-items.rs - A::method (line 94) - compile ... ok -test $DIR/dead-code-items.rs - C (line 22) - compile ... FAILED -test $DIR/dead-code-items.rs - Enum (line 70) - compile ... FAILED -test $DIR/dead-code-items.rs - Enum::Variant1 (line 77) - compile ... FAILED -test $DIR/dead-code-items.rs - MyTrait (line 103) - compile ... FAILED -test $DIR/dead-code-items.rs - MyTrait::my_trait_fn (line 110) - compile ... FAILED -test $DIR/dead-code-items.rs - S (line 14) - compile ... ok -test $DIR/dead-code-items.rs - U (line 48) - compile ... ok -test $DIR/dead-code-items.rs - U::field (line 55) - compile ... FAILED -test $DIR/dead-code-items.rs - U::field2 (line 61) - compile ... ok +test $DIR/dead-code-items.rs - A (line 34) - compile ... ok +test $DIR/dead-code-items.rs - A (line 90) - compile ... ok +test $DIR/dead-code-items.rs - A::field (line 41) - compile ... FAILED +test $DIR/dead-code-items.rs - A::method (line 96) - compile ... ok +test $DIR/dead-code-items.rs - C (line 24) - compile ... FAILED +test $DIR/dead-code-items.rs - Enum (line 72) - compile ... FAILED +test $DIR/dead-code-items.rs - Enum::Variant1 (line 79) - compile ... FAILED +test $DIR/dead-code-items.rs - MyTrait (line 105) - compile ... FAILED +test $DIR/dead-code-items.rs - MyTrait::my_trait_fn (line 112) - compile ... FAILED +test $DIR/dead-code-items.rs - S (line 16) - compile ... ok +test $DIR/dead-code-items.rs - U (line 50) - compile ... ok +test $DIR/dead-code-items.rs - U::field (line 57) - compile ... FAILED +test $DIR/dead-code-items.rs - U::field2 (line 63) - compile ... ok failures: ----- $DIR/dead-code-items.rs - A::field (line 39) stdout ---- +---- $DIR/dead-code-items.rs - A::field (line 41) stdout ---- error: trait `DeadCodeInField` is never used - --> $DIR/dead-code-items.rs:40:7 + --> $DIR/dead-code-items.rs:42:7 | LL | trait DeadCodeInField {} | ^^^^^^^^^^^^^^^ | note: the lint level is defined here - --> $DIR/dead-code-items.rs:38:9 + --> $DIR/dead-code-items.rs:40:9 | LL | #![deny(dead_code)] | ^^^^^^^^^ @@ -32,15 +32,15 @@ LL | #![deny(dead_code)] error: aborting due to 1 previous error Couldn't compile the test. ----- $DIR/dead-code-items.rs - C (line 22) stdout ---- +---- $DIR/dead-code-items.rs - C (line 24) stdout ---- error: unused variable: `unused_error` - --> $DIR/dead-code-items.rs:23:5 + --> $DIR/dead-code-items.rs:25:5 | LL | let unused_error = 5; | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused_error` | note: the lint level is defined here - --> $DIR/dead-code-items.rs:20:9 + --> $DIR/dead-code-items.rs:22:9 | LL | #![deny(warnings)] | ^^^^^^^^ @@ -49,15 +49,15 @@ LL | #![deny(warnings)] error: aborting due to 1 previous error Couldn't compile the test. ----- $DIR/dead-code-items.rs - Enum (line 70) stdout ---- +---- $DIR/dead-code-items.rs - Enum (line 72) stdout ---- error: unused variable: `not_dead_code_but_unused` - --> $DIR/dead-code-items.rs:71:5 + --> $DIR/dead-code-items.rs:73:5 | LL | let not_dead_code_but_unused = 5; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_not_dead_code_but_unused` | note: the lint level is defined here - --> $DIR/dead-code-items.rs:68:9 + --> $DIR/dead-code-items.rs:70:9 | LL | #![deny(warnings)] | ^^^^^^^^ @@ -66,15 +66,15 @@ LL | #![deny(warnings)] error: aborting due to 1 previous error Couldn't compile the test. ----- $DIR/dead-code-items.rs - Enum::Variant1 (line 77) stdout ---- +---- $DIR/dead-code-items.rs - Enum::Variant1 (line 79) stdout ---- error: unused variable: `unused_in_variant` - --> $DIR/dead-code-items.rs:80:17 + --> $DIR/dead-code-items.rs:82:17 | LL | fn main() { let unused_in_variant = 5; } | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused_in_variant` | note: the lint level is defined here - --> $DIR/dead-code-items.rs:75:9 + --> $DIR/dead-code-items.rs:77:9 | LL | #![deny(warnings)] | ^^^^^^^^ @@ -83,15 +83,15 @@ LL | #![deny(warnings)] error: aborting due to 1 previous error Couldn't compile the test. ----- $DIR/dead-code-items.rs - MyTrait (line 103) stdout ---- +---- $DIR/dead-code-items.rs - MyTrait (line 105) stdout ---- error: trait `StillDeadCodeAtMyTrait` is never used - --> $DIR/dead-code-items.rs:104:7 + --> $DIR/dead-code-items.rs:106:7 | LL | trait StillDeadCodeAtMyTrait { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: the lint level is defined here - --> $DIR/dead-code-items.rs:102:9 + --> $DIR/dead-code-items.rs:104:9 | LL | #![deny(dead_code)] | ^^^^^^^^^ @@ -99,15 +99,15 @@ LL | #![deny(dead_code)] error: aborting due to 1 previous error Couldn't compile the test. ----- $DIR/dead-code-items.rs - MyTrait::my_trait_fn (line 110) stdout ---- +---- $DIR/dead-code-items.rs - MyTrait::my_trait_fn (line 112) stdout ---- error: unused variable: `unused_in_impl` - --> $DIR/dead-code-items.rs:113:17 + --> $DIR/dead-code-items.rs:115:17 | LL | fn main() { let unused_in_impl = 5; } | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused_in_impl` | note: the lint level is defined here - --> $DIR/dead-code-items.rs:108:9 + --> $DIR/dead-code-items.rs:110:9 | LL | #![deny(warnings)] | ^^^^^^^^ @@ -116,15 +116,15 @@ LL | #![deny(warnings)] error: aborting due to 1 previous error Couldn't compile the test. ----- $DIR/dead-code-items.rs - U::field (line 55) stdout ---- +---- $DIR/dead-code-items.rs - U::field (line 57) stdout ---- error: trait `DeadCodeInUnionField` is never used - --> $DIR/dead-code-items.rs:56:7 + --> $DIR/dead-code-items.rs:58:7 | LL | trait DeadCodeInUnionField {} | ^^^^^^^^^^^^^^^^^^^^ | note: the lint level is defined here - --> $DIR/dead-code-items.rs:54:9 + --> $DIR/dead-code-items.rs:56:9 | LL | #![deny(dead_code)] | ^^^^^^^^^ @@ -134,13 +134,14 @@ error: aborting due to 1 previous error Couldn't compile the test. failures: - $DIR/dead-code-items.rs - A::field (line 39) - $DIR/dead-code-items.rs - C (line 22) - $DIR/dead-code-items.rs - Enum (line 70) - $DIR/dead-code-items.rs - Enum::Variant1 (line 77) - $DIR/dead-code-items.rs - MyTrait (line 103) - $DIR/dead-code-items.rs - MyTrait::my_trait_fn (line 110) - $DIR/dead-code-items.rs - U::field (line 55) + $DIR/dead-code-items.rs - A::field (line 41) + $DIR/dead-code-items.rs - C (line 24) + $DIR/dead-code-items.rs - Enum (line 72) + $DIR/dead-code-items.rs - Enum::Variant1 (line 79) + $DIR/dead-code-items.rs - MyTrait (line 105) + $DIR/dead-code-items.rs - MyTrait::my_trait_fn (line 112) + $DIR/dead-code-items.rs - U::field (line 57) test result: FAILED. 6 passed; 7 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/dead-code-module-2.rs b/tests/rustdoc-ui/doctest/dead-code-module-2.rs index de7b11b91ec..fd9c313ec9a 100644 --- a/tests/rustdoc-ui/doctest/dead-code-module-2.rs +++ b/tests/rustdoc-ui/doctest/dead-code-module-2.rs @@ -4,6 +4,8 @@ //@ compile-flags:--test //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 #![doc(test(attr(allow(unused_variables))))] diff --git a/tests/rustdoc-ui/doctest/dead-code-module-2.stdout b/tests/rustdoc-ui/doctest/dead-code-module-2.stdout index d44068dcbf5..cf737996d5c 100644 --- a/tests/rustdoc-ui/doctest/dead-code-module-2.stdout +++ b/tests/rustdoc-ui/doctest/dead-code-module-2.stdout @@ -1,24 +1,24 @@ running 1 test -test $DIR/dead-code-module-2.rs - g (line 24) - compile ... ok +test $DIR/dead-code-module-2.rs - g (line 26) - compile ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME running 1 test -test $DIR/dead-code-module-2.rs - my_mod::f (line 16) - compile ... FAILED +test $DIR/dead-code-module-2.rs - my_mod::f (line 18) - compile ... FAILED failures: ----- $DIR/dead-code-module-2.rs - my_mod::f (line 16) stdout ---- +---- $DIR/dead-code-module-2.rs - my_mod::f (line 18) stdout ---- error: trait `T` is never used - --> $DIR/dead-code-module-2.rs:17:7 + --> $DIR/dead-code-module-2.rs:19:7 | LL | trait T { fn f(); } | ^ | note: the lint level is defined here - --> $DIR/dead-code-module-2.rs:15:9 + --> $DIR/dead-code-module-2.rs:17:9 | LL | #![deny(warnings)] | ^^^^^^^^ @@ -29,7 +29,8 @@ error: aborting due to 1 previous error Couldn't compile the test. failures: - $DIR/dead-code-module-2.rs - my_mod::f (line 16) + $DIR/dead-code-module-2.rs - my_mod::f (line 18) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/dead-code-module.rs b/tests/rustdoc-ui/doctest/dead-code-module.rs index f825749a6a2..d3103ad28e9 100644 --- a/tests/rustdoc-ui/doctest/dead-code-module.rs +++ b/tests/rustdoc-ui/doctest/dead-code-module.rs @@ -4,6 +4,8 @@ //@ compile-flags:--test //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 mod my_mod { diff --git a/tests/rustdoc-ui/doctest/dead-code-module.stdout b/tests/rustdoc-ui/doctest/dead-code-module.stdout index b5ccf225d25..83c6af3775e 100644 --- a/tests/rustdoc-ui/doctest/dead-code-module.stdout +++ b/tests/rustdoc-ui/doctest/dead-code-module.stdout @@ -1,18 +1,18 @@ running 1 test -test $DIR/dead-code-module.rs - my_mod::f (line 14) - compile ... FAILED +test $DIR/dead-code-module.rs - my_mod::f (line 16) - compile ... FAILED failures: ----- $DIR/dead-code-module.rs - my_mod::f (line 14) stdout ---- +---- $DIR/dead-code-module.rs - my_mod::f (line 16) stdout ---- error: trait `T` is never used - --> $DIR/dead-code-module.rs:15:7 + --> $DIR/dead-code-module.rs:17:7 | LL | trait T { fn f(); } | ^ | note: the lint level is defined here - --> $DIR/dead-code-module.rs:13:9 + --> $DIR/dead-code-module.rs:15:9 | LL | #![deny(warnings)] | ^^^^^^^^ @@ -23,7 +23,8 @@ error: aborting due to 1 previous error Couldn't compile the test. failures: - $DIR/dead-code-module.rs - my_mod::f (line 14) + $DIR/dead-code-module.rs - my_mod::f (line 16) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/doctest-output-include-fail.rs b/tests/rustdoc-ui/doctest/doctest-output-include-fail.rs index a47bac3daef..2f0d6756b27 100644 --- a/tests/rustdoc-ui/doctest/doctest-output-include-fail.rs +++ b/tests/rustdoc-ui/doctest/doctest-output-include-fail.rs @@ -2,6 +2,8 @@ //@ compile-flags:--test --test-args=--test-threads=1 //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 // https://github.com/rust-lang/rust/issues/130470 diff --git a/tests/rustdoc-ui/doctest/doctest-output-include-fail.stdout b/tests/rustdoc-ui/doctest/doctest-output-include-fail.stdout index 22d15f8743c..ceaf60b1201 100644 --- a/tests/rustdoc-ui/doctest/doctest-output-include-fail.stdout +++ b/tests/rustdoc-ui/doctest/doctest-output-include-fail.stdout @@ -22,3 +22,4 @@ failures: test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/edition-2024-error-output.rs b/tests/rustdoc-ui/doctest/edition-2024-error-output.rs index 82a85debcd1..e1e57ad01cd 100644 --- a/tests/rustdoc-ui/doctest/edition-2024-error-output.rs +++ b/tests/rustdoc-ui/doctest/edition-2024-error-output.rs @@ -6,6 +6,8 @@ //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "panicked at .+rs:" -> "panicked at $$TMP:" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ rustc-env:RUST_BACKTRACE=0 //@ failure-status: 101 diff --git a/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout b/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout index 273d7071237..ab6aca239af 100644 --- a/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout +++ b/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout @@ -1,10 +1,10 @@ running 1 test -test $DIR/edition-2024-error-output.rs - (line 12) ... FAILED +test $DIR/edition-2024-error-output.rs - (line 14) ... FAILED failures: ----- $DIR/edition-2024-error-output.rs - (line 12) stdout ---- +---- $DIR/edition-2024-error-output.rs - (line 14) stdout ---- Test executable failed (exit status: 101). stderr: @@ -18,7 +18,8 @@ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failures: - $DIR/edition-2024-error-output.rs - (line 12) + $DIR/edition-2024-error-output.rs - (line 14) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs index 793f8654661..0504c3dc730 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs @@ -5,6 +5,8 @@ //@ compile-flags:--test //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 /// ```should_panic diff --git a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout index 2b04b77c9dc..9047fe0dcdd 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout +++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout @@ -1,14 +1,15 @@ running 1 test -test $DIR/failed-doctest-should-panic.rs - Foo (line 10) - should panic ... FAILED +test $DIR/failed-doctest-should-panic.rs - Foo (line 12) - should panic ... FAILED failures: ----- $DIR/failed-doctest-should-panic.rs - Foo (line 10) stdout ---- -note: test did not panic as expected at $DIR/failed-doctest-should-panic.rs:10:0 +---- $DIR/failed-doctest-should-panic.rs - Foo (line 12) stdout ---- +note: test did not panic as expected at $DIR/failed-doctest-should-panic.rs:12:0 failures: - $DIR/failed-doctest-should-panic.rs - Foo (line 10) + $DIR/failed-doctest-should-panic.rs - Foo (line 12) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/failed-doctest-test-crate.edition2015.stdout b/tests/rustdoc-ui/doctest/failed-doctest-test-crate.edition2015.stdout index ce767fb8443..d80c0da323d 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-test-crate.edition2015.stdout +++ b/tests/rustdoc-ui/doctest/failed-doctest-test-crate.edition2015.stdout @@ -1,12 +1,12 @@ running 1 test -test $DIR/failed-doctest-test-crate.rs - m (line 14) ... FAILED +test $DIR/failed-doctest-test-crate.rs - m (line 16) ... FAILED failures: ----- $DIR/failed-doctest-test-crate.rs - m (line 14) stdout ---- +---- $DIR/failed-doctest-test-crate.rs - m (line 16) stdout ---- error[E0432]: unresolved import `test` - --> $DIR/failed-doctest-test-crate.rs:15:5 + --> $DIR/failed-doctest-test-crate.rs:17:5 | LL | use test::*; | ^^^^ use of unresolved module or unlinked crate `test` @@ -22,7 +22,7 @@ For more information about this error, try `rustc --explain E0432`. Couldn't compile the test. failures: - $DIR/failed-doctest-test-crate.rs - m (line 14) + $DIR/failed-doctest-test-crate.rs - m (line 16) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME diff --git a/tests/rustdoc-ui/doctest/failed-doctest-test-crate.edition2024.stdout b/tests/rustdoc-ui/doctest/failed-doctest-test-crate.edition2024.stdout index 80642e93bbd..724bb9bee62 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-test-crate.edition2024.stdout +++ b/tests/rustdoc-ui/doctest/failed-doctest-test-crate.edition2024.stdout @@ -1,12 +1,12 @@ running 1 test -test $DIR/failed-doctest-test-crate.rs - m (line 14) ... FAILED +test $DIR/failed-doctest-test-crate.rs - m (line 16) ... FAILED failures: ----- $DIR/failed-doctest-test-crate.rs - m (line 14) stdout ---- +---- $DIR/failed-doctest-test-crate.rs - m (line 16) stdout ---- error[E0432]: unresolved import `test` - --> $DIR/failed-doctest-test-crate.rs:15:5 + --> $DIR/failed-doctest-test-crate.rs:17:5 | LL | use test::*; | ^^^^ use of unresolved module or unlinked crate `test` @@ -19,7 +19,8 @@ For more information about this error, try `rustc --explain E0432`. Couldn't compile the test. failures: - $DIR/failed-doctest-test-crate.rs - m (line 14) + $DIR/failed-doctest-test-crate.rs - m (line 16) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/failed-doctest-test-crate.rs b/tests/rustdoc-ui/doctest/failed-doctest-test-crate.rs index 6966d3df11c..75f7ac396f5 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-test-crate.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-test-crate.rs @@ -7,6 +7,8 @@ //@ compile-flags:--test //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 /// <https://github.com/rust-lang/rust/pull/137899#discussion_r1976743383> diff --git a/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.edition2015.stdout b/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.edition2015.stdout index ff26e7e3231..0d00a9fc9c4 100644 --- a/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.edition2015.stdout +++ b/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.edition2015.stdout @@ -1,12 +1,12 @@ running 1 test -test $DIR/relative-path-include-bytes-132203.rs - (line 18) ... FAILED +test $DIR/relative-path-include-bytes-132203.rs - (line 20) ... FAILED failures: ----- $DIR/relative-path-include-bytes-132203.rs - (line 18) stdout ---- +---- $DIR/relative-path-include-bytes-132203.rs - (line 20) stdout ---- error: couldn't read `$DIR/relative-dir-empty-file`: $FILE_NOT_FOUND_MSG (os error 2) - --> $DIR/relative-path-include-bytes-132203.rs:19:9 + --> $DIR/relative-path-include-bytes-132203.rs:21:9 | LL | let x = include_bytes!("relative-dir-empty-file"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -16,7 +16,7 @@ error: aborting due to 1 previous error Couldn't compile the test. failures: - $DIR/relative-path-include-bytes-132203.rs - (line 18) + $DIR/relative-path-include-bytes-132203.rs - (line 20) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME diff --git a/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.edition2024.stdout b/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.edition2024.stdout index e4c65703081..fa5bd7c93fa 100644 --- a/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.edition2024.stdout +++ b/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.edition2024.stdout @@ -4,3 +4,4 @@ test $DIR/auxiliary/relative-dir.md - (line 1) ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs b/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs index ceacd69a5fd..321edc3ee84 100644 --- a/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs +++ b/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs @@ -9,6 +9,8 @@ //@ normalize-stdout: "tests.rustdoc-ui.doctest." -> "$$DIR/" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "`: .* \(os error 2\)" -> "`: $$FILE_NOT_FOUND_MSG (os error 2)" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" // https://github.com/rust-lang/rust/issues/132203 // This version, because it's edition2024, passes thanks to the new diff --git a/tests/rustdoc-ui/doctest/stdout-and-stderr.rs b/tests/rustdoc-ui/doctest/stdout-and-stderr.rs index 9b0c69d8839..a4eda8c7f83 100644 --- a/tests/rustdoc-ui/doctest/stdout-and-stderr.rs +++ b/tests/rustdoc-ui/doctest/stdout-and-stderr.rs @@ -9,6 +9,8 @@ //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: "panicked at .+rs:" -> "panicked at $$TMP:" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 //@ rustc-env:RUST_BACKTRACE=0 diff --git a/tests/rustdoc-ui/doctest/stdout-and-stderr.stdout b/tests/rustdoc-ui/doctest/stdout-and-stderr.stdout index b2febe1344f..a35a4d7c3cb 100644 --- a/tests/rustdoc-ui/doctest/stdout-and-stderr.stdout +++ b/tests/rustdoc-ui/doctest/stdout-and-stderr.stdout @@ -1,12 +1,12 @@ running 3 tests -test $DIR/stdout-and-stderr.rs - (line 15) ... FAILED -test $DIR/stdout-and-stderr.rs - (line 20) ... FAILED -test $DIR/stdout-and-stderr.rs - (line 24) ... FAILED +test $DIR/stdout-and-stderr.rs - (line 17) ... FAILED +test $DIR/stdout-and-stderr.rs - (line 22) ... FAILED +test $DIR/stdout-and-stderr.rs - (line 26) ... FAILED failures: ----- $DIR/stdout-and-stderr.rs - (line 15) stdout ---- +---- $DIR/stdout-and-stderr.rs - (line 17) stdout ---- Test executable failed (exit status: 101). stdout: @@ -21,7 +21,7 @@ assertion `left == right` failed note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ----- $DIR/stdout-and-stderr.rs - (line 20) stdout ---- +---- $DIR/stdout-and-stderr.rs - (line 22) stdout ---- Test executable failed (exit status: 101). stderr: @@ -33,14 +33,15 @@ assertion `left == right` failed note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ----- $DIR/stdout-and-stderr.rs - (line 24) stdout ---- +---- $DIR/stdout-and-stderr.rs - (line 26) stdout ---- Test executable failed (exit status: 1). failures: - $DIR/stdout-and-stderr.rs - (line 15) - $DIR/stdout-and-stderr.rs - (line 20) - $DIR/stdout-and-stderr.rs - (line 24) + $DIR/stdout-and-stderr.rs - (line 17) + $DIR/stdout-and-stderr.rs - (line 22) + $DIR/stdout-and-stderr.rs - (line 26) test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME diff --git a/tests/rustdoc-ui/doctest/wrong-ast-2024.rs b/tests/rustdoc-ui/doctest/wrong-ast-2024.rs index 3b4fb3f3443..df30e01b25e 100644 --- a/tests/rustdoc-ui/doctest/wrong-ast-2024.rs +++ b/tests/rustdoc-ui/doctest/wrong-ast-2024.rs @@ -3,6 +3,8 @@ //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" +//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME" +//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME" //@ failure-status: 101 /// ``` diff --git a/tests/rustdoc-ui/doctest/wrong-ast-2024.stdout b/tests/rustdoc-ui/doctest/wrong-ast-2024.stdout index 62e1fb10b9f..13567b41e51 100644 --- a/tests/rustdoc-ui/doctest/wrong-ast-2024.stdout +++ b/tests/rustdoc-ui/doctest/wrong-ast-2024.stdout @@ -1,17 +1,17 @@ running 1 test -test $DIR/wrong-ast-2024.rs - three (line 18) - should panic ... ok +test $DIR/wrong-ast-2024.rs - three (line 20) - should panic ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME running 2 tests -test $DIR/wrong-ast-2024.rs - one (line 8) ... FAILED -test $DIR/wrong-ast-2024.rs - two (line 13) ... FAILED +test $DIR/wrong-ast-2024.rs - one (line 10) ... FAILED +test $DIR/wrong-ast-2024.rs - two (line 15) ... FAILED failures: ----- $DIR/wrong-ast-2024.rs - one (line 8) stdout ---- +---- $DIR/wrong-ast-2024.rs - one (line 10) stdout ---- error[E0758]: unterminated block comment --> $DIR/wrong-ast-2024.rs:$LINE:$COL | @@ -22,7 +22,7 @@ error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0758`. Couldn't compile the test. ----- $DIR/wrong-ast-2024.rs - two (line 13) stdout ---- +---- $DIR/wrong-ast-2024.rs - two (line 15) stdout ---- error: unexpected closing delimiter: `}` --> $DIR/wrong-ast-2024.rs:$LINE:$COL | @@ -34,8 +34,9 @@ error: aborting due to 1 previous error Couldn't compile the test. failures: - $DIR/wrong-ast-2024.rs - one (line 8) - $DIR/wrong-ast-2024.rs - two (line 13) + $DIR/wrong-ast-2024.rs - one (line 10) + $DIR/wrong-ast-2024.rs - two (line 15) test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +all doctests ran in $TIME; merged doctests compilation took $TIME |
