about summary refs log tree commit diff
path: root/src/librustdoc/doctest/runner.rs
AgeCommit message (Collapse)AuthorLines
2025-07-24Display total time and compilation time of merged doctestsGuillaume Gomez-3/+8
2025-05-22Collect and use `#![doc(test(attr(..)))]` at module level tooUrgau-3/+8
2025-04-25Correctly display stdout and stderr in case a doctest is failingGuillaume Gomez-1/+16
2025-04-04Rollup merge of #139328 - GuillaumeGomez:fix-panic-output-137970, r=fmeaseMatthias Krüger-3/+5
Fix 2024 edition doctest panic output Fixes #137970. The problem was that the output was actually displayed by rustc itself because we're exiting with `Result<(), String>`, and the display is really not great. So instead, we get the output, we print it and then we return an `ExitCode`. r? ````@aDotInTheVoid````
2025-04-03Use `eprint!` instead of `eprintln!`Guillaume Gomez-1/+1
2025-04-03Fix 2024 edition doctest panic outputGuillaume Gomez-3/+5
2025-04-02Remove unused variables generated in merged doctestsGuillaume Gomez-1/+0
2025-03-10Rollup merge of #138281 - saethlin:mergeable-doctests-stacksize, ↵Matthias Krüger-9/+10
r=GuillaumeGomez Fix O(tests) stack usage in edition 2024 mergeable doctests Fixes https://github.com/rust-lang/rust/issues/138248 The important change here is that we are not passing a potentially-large array by value. Between the fact that `TestFn` cannot be `Clone` and `test_main` takes a `Vec<TestDescAndFn>`, the only way to call `test::test_main` without O(tests) stack use is to call `Vec::push` many times. The normal test harness does not have this problem because it calls `test_main_static` or `test_main_static_abort`, which take `&[TestDescAndFn]`. Changing `test::test_main` to take a slice is not a simple change, so I'm avoiding doing it here.
2025-03-10Fix O(tests) stack usage in edition 2024 mergeable doctestsBen Kimock-9/+10
2025-03-10doctests: build test bundle and harness separatelyMichael Howell-12/+25
This prevents the included test case from getting at nightly-only features when run on stable. The harness builds with RUSTC_BOOTSTRAP, but the bundle doesn't.
2024-10-30Rollup merge of #131096 - GuillaumeGomez:rm-no_unused, r=notriddle许杰友 Jieyou Xu (Joe)-4/+0
rustdoc: Remove usage of `allow(unused)` attribute on `no_run` merged doctests Fixes [#130681](https://github.com/rust-lang/rust/issues/130681). It fixes the behaviour difference with the current doctests. r? ``@notriddle``
2024-10-15Rollup merge of #131095 - GuillaumeGomez:switch-to-env-variables, r=notriddleMatthias Krüger-26/+16
Use environment variables instead of command line arguments for merged doctests Fixes [#130796](https://github.com/rust-lang/rust/issues/130796). Before merging this one, let's first ensure it has a smaller impact compared to command line arguments (results can be seen [here](https://github.com/rust-lang/rust/pull/130285)). I'll start a crater run once CI passed. cc ``@ehuss`` r? ``@notriddle``
2024-10-06Handle `librustdoc` cases of `rustc::potential_query_instability` lintismailarilik-3/+3
2024-10-01Remove usage of `allow(unused)` attribute on `no_run` doctestsGuillaume Gomez-4/+0
2024-10-01Use environment variables instead of command line arguments for merged doctestsGuillaume Gomez-26/+16
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-2/+2
2024-08-29Fix clippy lintsGuillaume Gomez-2/+4
2024-08-17Remove useless attributes in merged doctest generated codeGuillaume Gomez-4/+0
2024-08-13Run fmtGuillaume Gomez-2/+2
2024-08-13Move `is_multiple_tests` argument into `RunnableDocTest`Guillaume Gomez-7/+3
2024-08-13Unify naming of `DocTest`Guillaume Gomez-5/+5
2024-08-13Remove need for `unsafe` code in merged doctestsGuillaume Gomez-5/+10
2024-08-13Rename `DocTest` into `DocTestBuilder`Guillaume Gomez-4/+4
2024-08-13Reduce merged doctest source code sizeGuillaume Gomez-25/+7
2024-08-13If no argument is provided to merged doctests binary, they will be run in ↵Guillaume Gomez-6/+4
the same process (needed for miri)
2024-08-13Don't change indent in merged doctestsGuillaume Gomez-1/+1
2024-08-13Make merged doctests run in their own processGuillaume Gomez-15/+81
2024-08-13Fix weird memory allocation failure in merged doctests by storing doctest ↵Guillaume Gomez-8/+8
list into a const
2024-08-13Don't merge doctests with `#[global_allocator]`Guillaume Gomez-6/+8
2024-08-13Greatly improve handling of doctests attributes, making it possible to merge ↵Guillaume Gomez-2/+7
doctests more efficiently
2024-08-13Simplify `has_main_fn` to be a boolean instead of a `Option<Span>`Guillaume Gomez-1/+1
2024-08-13Prevent merged doctests to break stdin if the generated file is too bigGuillaume Gomez-3/+8
2024-08-13Split doctests into two categories: mergeable ones and standalone onesGuillaume Gomez-19/+41
2024-08-13Split standalone and mergeable doctestsGuillaume Gomez-0/+188