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

No nice way to report a test_result::Errored #294

Open
RalfJung opened this issue Nov 9, 2024 · 0 comments
Open

No nice way to report a test_result::Errored #294

RalfJung opened this issue Nov 9, 2024 · 0 comments

Comments

@RalfJung
Copy link
Collaborator

RalfJung commented Nov 9, 2024

Some public functions like apply_custom return a Result<_, Errored>. However, it seems like there is no nice way to actually report such an error -- the fields a private, and the debug impl produces unreadable results.

Normal error reporting happens here:

ui_test/src/lib.rs

Lines 340 to 352 in 51c1edc

for (
status,
Errored {
command,
errors,
stderr,
stdout,
},
) in &failures
{
let _guard = status.failed_test(command, stderr, stdout);
failure_emitter.test_failure(status, errors);
}

But this is not accessible to outside code.

Given that Errored is a public type, it'd be nice if there was also a publicly accessible way of reporting those errors. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant