cargo-watch
cargo-watch copied to clipboard
Feature request: test results as a notification
Apologies if this has been asked, but I was wondering if there was a way to report the status of tests via a notification?
If I'm developing in a TDD style, I usually have some flavor of cargo watch -x test
running in the background.
It would be great if there was a way to report red (tests failing) or green (test passing) through the desktop notifications.
It seems like the plumbing is there, since --notify
pops up a notification every time there's a change, maybe just a way to react to the exit status? i.e. 0=green, >0=red?
@slowteetoe which OS are you using? I am on Linux and my hand-made way of reporting when a compile ends is:
cargo-watch -x build -s '/usr/bin/notify-send "Compile result" DONE'
Stuff in -s
is executed after the process ends and (IIUC) only when cargo exits with success. I assume that with a bit of scripting you should be able to wrap cargo-watch
and write your own custom reporting notification that also handles the case where the command exited with an error code (f.e. one test failed)