Unittest target in packages openWRT support

I have question about unit-testing code in openwrt. Is there a way to use native openwrt paths to compile packages unit-test's? I have many my own custom packages, and I Want to increase quality of code, by using static analysis and writing some unit-test. As for now I was trying to find solution online but without any success.
I want to achieve that unit-test target will be build with my host compiler tools and gtest library as it don't need platform specific cross compilation tools. Is there any solution? Do you guys use unit-test in your environment?

Best Regards

Hi. I recently been thinking about doing this myself. When building a package for a target device, I'd also like the host tools to be used for unit testing. I guess you (and I) could override the package/compile define in the openwrt Makefile.. ? Did you find a solution ?