Skip to content

Commit

Permalink
Fixed some issues with skip tests and skip check.
Browse files Browse the repository at this point in the history
  • Loading branch information
kelemen committed Mar 7, 2015
1 parent 20bc7c8 commit fedb43f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,17 +470,19 @@ public CommandWithActions(
}

public GradleCommandTemplate getCommand() {
if ((skipTestsIfNeeded && GlobalConfig.skipTests().getValue())
|| (skipCheckIfNeeded && GlobalConfig.skipCheck().getValue())) {
boolean skipTests = GlobalConfig.skipTests().getValue();
boolean skipCheck = GlobalConfig.skipCheck().getValue();

if ((skipTestsIfNeeded && skipTests) || (skipCheckIfNeeded && skipCheck)) {
GradleCommandTemplate.Builder builder = new GradleCommandTemplate.Builder(command);
List<String> prevArguments = command.getArguments();
List<String> newArguments = new ArrayList<>(prevArguments.size() + 4);
newArguments.addAll(prevArguments);
if (skipTestsIfNeeded) {
if (skipTests) {
newArguments.add("-x");
newArguments.add(TestTaskName.DEFAULT_TEST_TASK_NAME);
}
if (skipCheckIfNeeded) {
if (skipCheck) {
newArguments.add("-x");
newArguments.add("check");
}
Expand Down

0 comments on commit fedb43f

Please sign in to comment.