feat(test): print pending tests on sigint (#18246)

This commit is contained in:
Nayeem Rahman 2023-03-25 19:32:11 +00:00 committed by GitHub
parent fe88b53e50
commit 8a4865c379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 649 additions and 584 deletions

View file

@ -439,9 +439,6 @@ impl TestRun {
test::TestStepResult::Failed(_) => {
summary.failed_steps += 1;
}
test::TestStepResult::Pending(_) => {
summary.pending_steps += 1;
}
}
reporter.report_step_result(
test_steps.get(&id).unwrap(),
@ -449,6 +446,7 @@ impl TestRun {
duration,
);
}
test::TestEvent::Sigint => {}
}
}
@ -716,11 +714,10 @@ impl LspTestReporter {
test: desc.into(),
})
}
test::TestResult::Failed(js_error) => {
let err_string = test::format_test_error(js_error);
test::TestResult::Failed(failure) => {
self.progress(lsp_custom::TestRunProgressMessage::Failed {
test: desc.into(),
messages: as_test_messages(err_string, false),
messages: as_test_messages(failure.to_string(), false),
duration: Some(elapsed as u32),
})
}
@ -830,24 +827,13 @@ impl LspTestReporter {
test: desc.into(),
})
}
test::TestStepResult::Failed(js_error) => {
let messages = if let Some(js_error) = js_error {
let err_string = test::format_test_error(js_error);
as_test_messages(err_string, false)
} else {
vec![]
};
test::TestStepResult::Failed(failure) => {
self.progress(lsp_custom::TestRunProgressMessage::Failed {
test: desc.into(),
messages,
messages: as_test_messages(failure.to_string(), false),
duration: Some(elapsed as u32),
})
}
test::TestStepResult::Pending(_) => {
self.progress(lsp_custom::TestRunProgressMessage::Enqueued {
test: desc.into(),
})
}
}
}