Commit 85a746c
Auto merge of rust-lang#8884 - jakoschiko:accept-test-execution-time, r=alexcrichton
Relaxes expectation of `cargo test` tests to accept test execution time
rust-lang/rust#75752 changes the output of libtest.
For example, output before:
```
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
```
Output after:
```
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
```
This breaks some cargo tests: https://github.com/rust-lang-ci/rust/runs/1439245145
As a preparation for the merge, this PR relaxes the test expectations of `cargo test` tests to accept both outputs. I'm using the existing pattern feature of `Execs::with_stdout`:
```
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]
```
I made this change for the following tests:
- `test::can_not_mix_doc_tests_and_regular_tests`
- `test::cargo_test_quiet_with_harness`
- `test::test_filtered_excludes_compiling_examples`
- `test::cargo_test_doctest_xcompile_ignores` (didn't fail in rust-lang/rust#79317, but failed locally)
- `test::cargo_test_doctest_xcompile` (doesn't run locally, I changed it just to be safe)
- `test::cargo_test_doctest_xcompile_runner` (doesn't run locally, I changed it just to be safe)
- `test::cargo_test_doctest_xcompile_no_runner` (doesn't run locally, I changed it just to be safe)
If requested, I will open another PR later to change the expectation to:
```
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in [..]s
```
However, I don't know how to handle WASM targets because WASM doesn't support time measuring, therefore the libtest output didn't change for WASM. Is WASM even relevant here?1 parent e69b590 commit 85a746c
1 file changed
+13
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
1552 | 1552 | | |
1553 | 1553 | | |
1554 | 1554 | | |
1555 | | - | |
| 1555 | + | |
1556 | 1556 | | |
1557 | 1557 | | |
1558 | 1558 | | |
| |||
3724 | 3724 | | |
3725 | 3725 | | |
3726 | 3726 | | |
3727 | | - | |
| 3727 | + | |
3728 | 3728 | | |
3729 | 3729 | | |
3730 | 3730 | | |
3731 | 3731 | | |
3732 | 3732 | | |
3733 | | - | |
| 3733 | + | |
3734 | 3734 | | |
3735 | 3735 | | |
3736 | 3736 | | |
| |||
3746 | 3746 | | |
3747 | 3747 | | |
3748 | 3748 | | |
3749 | | - | |
| 3749 | + | |
3750 | 3750 | | |
3751 | 3751 | | |
3752 | 3752 | | |
| |||
3763 | 3763 | | |
3764 | 3764 | | |
3765 | 3765 | | |
3766 | | - | |
| 3766 | + | |
3767 | 3767 | | |
3768 | 3768 | | |
3769 | 3769 | | |
| |||
3877 | 3877 | | |
3878 | 3878 | | |
3879 | 3879 | | |
3880 | | - | |
| 3880 | + | |
3881 | 3881 | | |
3882 | 3882 | | |
3883 | 3883 | | |
3884 | 3884 | | |
3885 | 3885 | | |
3886 | 3886 | | |
3887 | | - | |
| 3887 | + | |
3888 | 3888 | | |
3889 | 3889 | | |
3890 | 3890 | | |
3891 | 3891 | | |
3892 | 3892 | | |
3893 | 3893 | | |
3894 | 3894 | | |
3895 | | - | |
| 3895 | + | |
3896 | 3896 | | |
3897 | 3897 | | |
3898 | 3898 | | |
3899 | 3899 | | |
3900 | 3900 | | |
3901 | 3901 | | |
3902 | 3902 | | |
3903 | | - | |
| 3903 | + | |
3904 | 3904 | | |
3905 | 3905 | | |
3906 | 3906 | | |
| |||
3940 | 3940 | | |
3941 | 3941 | | |
3942 | 3942 | | |
3943 | | - | |
| 3943 | + | |
3944 | 3944 | | |
3945 | 3945 | | |
3946 | 3946 | | |
| |||
4020 | 4020 | | |
4021 | 4021 | | |
4022 | 4022 | | |
4023 | | - | |
| 4023 | + | |
4024 | 4024 | | |
4025 | 4025 | | |
4026 | 4026 | | |
| |||
4064 | 4064 | | |
4065 | 4065 | | |
4066 | 4066 | | |
4067 | | - | |
| 4067 | + | |
4068 | 4068 | | |
4069 | 4069 | | |
4070 | 4070 | | |
| |||
0 commit comments