Skip to content

Commit

Permalink
check for build success
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis committed Dec 15, 2024
1 parent 9702624 commit cc145a8
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ private void runBuild(Path mavenHome, Path projectDirectory, MutableProjectDescr
processBuilder.redirectOutput(output.toFile());
assertThat(processBuilder.start().waitFor()).describedAs(String.join("\n", Files.readAllLines(output)))
.isEqualTo(0);

if (description.getBuildSystem().id().equals(GradleBuildSystem.ID)) {
assertThat(output.toFile()).content().contains("BUILD SUCCESSFUL");
}

if (description.getBuildSystem().id().equals(MavenBuildSystem.ID)) {
assertThat(output.toFile()).content().contains("BUILD SUCCESS");
}
}

private ProcessBuilder createProcessBuilder(Path directory, BuildSystem buildSystem, Path home) {
Expand Down

0 comments on commit cc145a8

Please sign in to comment.