Search in sources :

Example 1 with ProviderInternalTestExecutionRequest

use of org.gradle.tooling.internal.provider.test.ProviderInternalTestExecutionRequest in project gradle by gradle.

the class DefaultConnection method runTests.

/**
     * This is used by consumers 2.6-rc-1 and later
     */
public BuildResult<?> runTests(InternalTestExecutionRequest testExecutionRequest, InternalCancellationToken cancellationToken, BuildParameters operationParameters) throws BuildExceptionVersion1, InternalUnsupportedBuildArgumentException, IllegalStateException {
    ProviderOperationParameters providerParameters = validateAndConvert(operationParameters);
    ProviderInternalTestExecutionRequest testExecutionRequestVersion2 = adapter.adapt(ProviderInternalTestExecutionRequest.class, testExecutionRequest);
    BuildCancellationToken buildCancellationToken = new InternalCancellationTokenAdapter(cancellationToken);
    Object results = connection.runTests(testExecutionRequestVersion2, buildCancellationToken, providerParameters);
    return new ProviderBuildResult<Object>(results);
}
Also used : ProviderInternalTestExecutionRequest(org.gradle.tooling.internal.provider.test.ProviderInternalTestExecutionRequest) ProviderOperationParameters(org.gradle.tooling.internal.provider.connection.ProviderOperationParameters) ProviderBuildResult(org.gradle.tooling.internal.provider.connection.ProviderBuildResult) DefaultBuildCancellationToken(org.gradle.initialization.DefaultBuildCancellationToken) BuildCancellationToken(org.gradle.initialization.BuildCancellationToken)

Aggregations

BuildCancellationToken (org.gradle.initialization.BuildCancellationToken)1 DefaultBuildCancellationToken (org.gradle.initialization.DefaultBuildCancellationToken)1 ProviderBuildResult (org.gradle.tooling.internal.provider.connection.ProviderBuildResult)1 ProviderOperationParameters (org.gradle.tooling.internal.provider.connection.ProviderOperationParameters)1 ProviderInternalTestExecutionRequest (org.gradle.tooling.internal.provider.test.ProviderInternalTestExecutionRequest)1