-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from AdamKobus/ST-176
ST-176 Added ignoreFailures option to tests
- Loading branch information
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...vy/com/infullmobile/toolkit/impl/android/commands/variant/ConfigureTestsForVariant.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.infullmobile.toolkit.impl.android.commands.variant | ||
|
||
import com.infullmobile.toolkit.impl.android.IVariantConfigCommand | ||
import com.infullmobile.toolkit.impl.android.TestVariantWrapper | ||
import com.infullmobile.toolkit.impl.android.VariantConfigurator | ||
import com.infullmobile.toolkit.types.IProjectConfigurator | ||
|
||
/** | ||
* Created by Adam Kobus on 26.09.2016. | ||
* Copyright (c) 2016, inFullMobile | ||
* License: MIT, file: /LICENSE | ||
*/ | ||
class ConfigureTestsForVariant extends IVariantConfigCommand { | ||
|
||
@Override | ||
boolean isCommandAllowed(IProjectConfigurator configurator) { | ||
return config.configureTests; | ||
} | ||
|
||
@Override | ||
protected performCommandWith(VariantConfigurator variantConfigurator) { | ||
variantWrapper.testVariants.each { TestVariantWrapper testVariant -> | ||
def variant = testVariant.variant | ||
def variantData = variant.variantData | ||
String taskDependency; | ||
def boolean isConnected = (testVariant.type == TestVariantWrapper.TestType.CONNECTED) | ||
|
||
if (isConnected) { | ||
taskDependency = variantData.connectedTestTask.name | ||
} else { | ||
taskDependency = "test${variantData.variantDependency.name.capitalize()}" | ||
} | ||
def task = configuredProject.tasks.findByPath(taskDependency) | ||
task.ignoreFailures = config.ignoreTestErrors | ||
} | ||
} | ||
} |