Canop / bacon

background rust code check
https://dystroy.org/bacon
GNU Affero General Public License v3.0
1.59k stars 57 forks source link

Synergy with cargo nextest #196

Open jacg opened 3 weeks ago

jacg commented 3 weeks ago

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?

jacg commented 3 weeks ago

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.