gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
91 stars 8 forks source link

`RunTestExecutable` should not extend `AbstractExecTask` #1010

Open lacasseio opened 5 years ago

lacasseio commented 5 years ago

Expected Behavior

Although the RunTestExecutable is executing the executable, how it is accomplished is an implementation detail. There are lots of methods that don't make sense in the context of test execution, for example, ignoreExitValue vs ignoreFailures. The later makes sense, but ignoreExitValue doesn't.

Current Behavior

RunTestExecutable extends AbstractExecTask.

Context

This extension was added when Google Test support was introduced in the software model in order to configure the test executable arguments and environment variable. Back then, we should have just added the appropriate fields.

Steps to Reproduce (for bugs)

Your Environment

big-guy commented 5 years ago

I think this is fine to do, but even better would be to use a different task that's more Test-like like XcTest.

lacasseio commented 5 years ago

I agree, we should look at aligning Java test task, Xctest and RunTestExecutable together.