How to configure a library dependency used only by unit tests?

My unit tests require a library that is not required by the core firmware. I can add the library to lib_deps: it works for the unit tests and of course the firmware build doesn’t link it in because it’s unused.

But that’s all a bit messy. Can a library dependency be configured to apply only to unit tests?

configure the test lib_deps in a separate build env

i mean… u do have a separate build env for testing anyway, right?