Ok. So I think I can use Unity’s TEST_MESSAGE macro to achieve this.
Adding a single TEST_MESSAGE("log this"); call to my code ended up correctly in the output of pio test
I’m assuming this will not break parsing of the transport’s stream by pio test…