Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mtest: rust: allow parsing doctest output #13905

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 15, 2024

  1. mtest: rust: allow parsing doctest output

    Doctests have a slightly different output compared to what "protocol: rust"
    supports:
    
      running 2 tests
      test ../doctest1.rs - my_func (line 7) ... ignored
      test ../doctest1.rs - (line 3) ... ok
    
      test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.12s
    
    Add a little more parsing in order to accept this; a simple minded split()
    fails to unpack the tuple.  I plan to contribute an extension of the rust
    module to invoke doctests, for now this allows running rustdoc --test with
    "protocol: 'rust'" and get information about the subtests:
    
      ▶ 4/8 ../doctest1.rs:my_func:7                     SKIP
      ▶ 4/8 ../doctest1.rs:3                             OK
      4/8 rust_unit_tests:doctests / rust doctest        OK              0.28s   1 subtests passed
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    8e1f5cf View commit details
    Browse the repository at this point in the history