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