Parse test results from tests running with --quiet#184
Conversation
|
Can you please build a test case which failed and is solved ? |
|
Here’s an example that shows this:
default_job = "test"
[jobs.test]
command = [
"cargo", "test", "--color", "always",
"--", "--color", "always", # see https://github.com/Canop/bacon/issues/124
]
need_stdout = true
[jobs.testquiet]
command = [
"cargo", "test", "--color", "always",
"--", "--color", "always", # see https://github.com/Canop/bacon/issues/124
"--quiet",
]
need_stdout = true
[keybindings]
z = "job:testquiet"
#[cfg(test)]
mod tests {
#[test]
fn first_test() {}
#[test]
fn failing_test() {
assert!(false, "message for first failing test");
}
#[test]
fn third_test() {}
#[test]
fn another_failing_test() {
assert!(false, "message for second failing test");
}
}Output when running the Output when running the And with this PR: Or did you mean an automated test? |
No, just enough to reproduce the problem. |
|
Here's why I asked: it doesn't seem to be solved with your fix (in my test on linux, even with your test case). I'll look deeper if necessary but not immediately, I can't dive into this problem until end of last week. |
I’m on Sorry for the confusion! |
Running tests with
-q/--quietoutputs a.per test instead of the test name. When a test fails, the test name andFAILEDis still printed, but thetestat the beginning of the line is omitted:This PR changes the regex used to parse the output to parse both output formats.