rustdoc: support for the --nocapture feature of libtest

Created on 15 Jun 2015  路  7Comments  路  Source: rust-lang/rust

Currently, librustdoc is diligently passing test arguments to libtest via --test-args, including --nocapture. However, librustdoc internally captures the output of doc-tests and doesn鈥檛 let it get through to libtest. Consequently, the usage of --nocapture in this context is somewhat limited (when supplied it reveals compiler warnings, for instance) and doesn鈥檛 serve its main purpose. This behavior is inconsistent with the rest of the testing.

Regards,
Ivan

C-enhancement T-dev-tools T-rustdoc

Most helpful comment

Ping @steveklabnik -- has there been any more discussion about this?

All 7 comments

Ping @steveklabnik -- has there been any more discussion about this?

Ping @QuietMisdreavus , can someone cc docs team here? This has been open for a long time.

cc @rust-lang/rustdoc

IIRC, the last time we tried to make --nocapture work, we hit problems with how the output was passed from doctests back to libtest. @GuillaumeGomez, do you remember what happened there?

I still have an in-progress branch on this one. It's tricky because libtest is handling outputs itself and we need to add functionalities to tell it not to do it. But then, outputs get lost... somewhere. This is where I am now. Trying to get back outputs (both stdout and stderr).

Triage: I don't think anything has changed here.

Definitely didn't. I start I'll start over from start when I'll get back to it.

This feature is much appreciated. Without this, the doc test can only benefit doc reader but less useful for debugging during dev.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikomatsakis picture nikomatsakis  路  268Comments

nikomatsakis picture nikomatsakis  路  331Comments

nikomatsakis picture nikomatsakis  路  236Comments

withoutboats picture withoutboats  路  308Comments

nikomatsakis picture nikomatsakis  路  259Comments