Native Test plugins compile and link sources into test executables instead of linking against tested component

I think we were both referencing this thread: https://discuss.gradle.org/t/gradle-2-5-google-test-plugin-tries-to-compile-tests-for-incorrect-platform, right? That’s definitely a step in the right direction, but not quite a universal workaround. I definitely agree about the ability to declare a binary’s compatibility with a host build environment (although it’s good to point out that build environment is not always going to be the same as host platform–you might cross-compile and execute on an attached device). For example, my setup can actually build all binaries for all platforms, so they’re all buildable, (and indeed I wish to compile all test binaries in order to reduce the chance that someone writes a test that doesn’t work with a specific set of platform headers), but I simply wish to only execute the tests for “runnable” platforms. As I mentioned, I’ll certainly want to configure the build to be able to execute all tests on all platforms all the time (perfect thing for a CI machine to do) but in the individual dev workflow, executing the tests on the host machine is sufficient.

Shipping off the entire workspace, build cache included, off to a different builder is a really cool idea! I hadn’t thought of that. Interesting.

As I said, I’m happy to help. Perhaps we should start a discussion on the dev-list? We might also want to revise the current native testing design doc or create a new one…