Synergy with cargo nextest
I find both bacon and cargo nextest to be very useful, and I would like to use them together.
I can persuade bacon to run tests via cargo nextest by specifying this in bacon.toml:
[jobs.test]
command = [
"cargo", "nextest", "run", "--color", "always",
]
need_stdout = true
When the tests pass I get to see nextest's highly-informative output (in colour, even though it doesn't show up here):
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.01s
Starting 1 test across 1 binary (run ID: f68cbdcf-7b7a-4af8-a5f6-01a0005a7d89, nextest profile: default)
PASS [ 0.003s] rust tests::it_works
------------
Summary [ 0.003s] 1 test run: 1 passed, 0 skipped
but when the tests fail, I get the very unhelpful and disapponting
1 failed: tests::it_is_broken
no output
Can bacon be made to work with cargo nextest?
It seems that the nextest output is shown, but then immediately overwritten with the less interesting output.
This also happens when the tests pass, if the compiler generates warnings: the warnings completely overwrite the nextest output.
I'm also very interested in this and was just about to publish the same issue.
Note that I see the same behavior with cargo test, so I don't think it's specific to nextest
I made a few tests, it looks like there's no deep problem: I just must find enough time to define the necessary patterns to analyze the output of nextest.
I'd need testers for https://github.com/Canop/bacon/pull/212
I'd need testers for #212
I'd be happy to do that How do we test it? I mean, how do we run a branch?
@nicolasauler Assuming you want to install with cargo install, then it should be
cargo install --git https://github.com/Canop/bacon --branch nextest
In case you have problems installing, come to the chat at https://miaou.dystroy.org/3768
I just tried bacon with the branch (nextest#fb0caf8b) and this configuration:
[jobs.test]
command = [
"cargo", "nextest", "run", "--color", "always"
]
need_stdout = true
It runs the tests but once complete immediately overwrites the results with the warnings:
Please everybody, have a look at the PR. You need to add this line to the job config:
analyzer = "nextest"
I tried it again with the command you put into the PR description but similar result:
I couldn't find a way to switch to the test output.
I couldn't find a way to switch to the test output.
I think this is the intended result: The first line tells you the tests passed successfully. The most relevant information in that case is not the list of tests that passed but warnings that where found while the tests ran.
My results:
-
When attempting lots of failures
-
Single failure
-
All successes
That's perfect, in my opinion Thanks a lot @Canop