use of org.gradle.integtests.fixtures.executer.ExecutionResult in project gradle by gradle.
the class MSBuildExecutor method succeeds.
public List<ExecutionResult> succeeds(MSBuildAction action) {
withArgument(toTargetArgument(action));
ExecOutput result = findMSBuild().execute(args, buildEnvironment(workingDir));
System.out.println(result.getOut());
String output = trimLines(result.getOut());
String error = trimLines(result.getError());
List<ExecutionResult> results = new ArrayList<ExecutionResult>();
int first = output.indexOf(SEPARATOR);
if (first < 0) {
return Collections.emptyList();
}
output = output.substring(first + SEPARATOR.length());
while (output.length() > 0) {
int next = output.indexOf(SEPARATOR);
if (next < 0) {
results.add(OutputScrapingExecutionResult.from(output, error));
output = "";
} else {
results.add(OutputScrapingExecutionResult.from(output.substring(0, next), error));
output = output.substring(next + SEPARATOR.length());
}
error = "";
}
return results;
}
use of org.gradle.integtests.fixtures.executer.ExecutionResult in project gradle by gradle.
the class ProjectLoadingIntegrationTest method deprecationWarningAppearsWhenNestedBuildHasNoSettingsFile.
@Test
public void deprecationWarningAppearsWhenNestedBuildHasNoSettingsFile() {
testFile("settings.gradle").write("include 'another'");
TestFile subDirectory = getTestDirectory().file("sub");
TestFile subBuildFile = subDirectory.file("sub.gradle").write("");
subDirectory.file("build.gradle").write("");
ExecutionResult result = inDirectory(subDirectory).withTasks("help").expectDeprecationWarning().run();
result.assertOutputContains("Support for nested build without a settings file was deprecated and will be removed in Gradle 5.0. You should create a empty settings file in " + subDirectory.getAbsolutePath());
result = usingBuildFile(subBuildFile).inDirectory(subDirectory).withTasks("help").expectDeprecationWarning().run();
result.assertOutputContains("Support for nested build without a settings file was deprecated and will be removed in Gradle 5.0. You should create a empty settings file in " + subDirectory.getAbsolutePath());
result = usingProjectDir(subDirectory).withTasks("help").expectDeprecationWarning().run();
result.assertOutputContains("Support for nested build without a settings file was deprecated and will be removed in Gradle 5.0. You should create a empty settings file in " + subDirectory.getAbsolutePath());
}
Aggregations