|
|
|
|
@ -166,6 +166,17 @@ class AotTests {
@@ -166,6 +166,17 @@ class AotTests {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@TestTemplate |
|
|
|
|
void whenAotRunsWithDevtoolsInClasspathItIsExcluded(MavenBuild mavenBuild) { |
|
|
|
|
mavenBuild.project("aot-exclude-devtools").goals("package").execute((project) -> { |
|
|
|
|
Path aotDirectory = project.toPath().resolve("target/spring-aot/main"); |
|
|
|
|
assertThat(aotDirectory).exists(); |
|
|
|
|
Path sourcesDirectory = aotDirectory.resolve("sources"); |
|
|
|
|
assertThat(sourcesDirectory).exists(); |
|
|
|
|
assertThat(collectRelativePaths(sourcesDirectory)).isNotEmpty(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@TestTemplate |
|
|
|
|
void whenAotTestRunsSourcesAndResourcesAreGenerated(MavenBuild mavenBuild) { |
|
|
|
|
mavenBuild.project("aot-test").goals("test").execute((project) -> { |
|
|
|
|
@ -180,6 +191,17 @@ class AotTests {
@@ -180,6 +191,17 @@ class AotTests {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@TestTemplate |
|
|
|
|
void whenTestAotRunsWithDevtoolsInClasspathItIsExcluded(MavenBuild mavenBuild) { |
|
|
|
|
mavenBuild.project("aot-test-exclude-devtools").goals("process-test-classes").execute((project) -> { |
|
|
|
|
Path aotDirectory = project.toPath().resolve("target/spring-aot/test"); |
|
|
|
|
assertThat(aotDirectory).exists(); |
|
|
|
|
Path sourcesDirectory = aotDirectory.resolve("sources"); |
|
|
|
|
assertThat(sourcesDirectory).exists(); |
|
|
|
|
assertThat(collectRelativePaths(sourcesDirectory)).isNotEmpty(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<Path> collectRelativePaths(Path sourceDirectory) { |
|
|
|
|
try (Stream<Path> pathStream = Files.walk(sourceDirectory)) { |
|
|
|
|
return pathStream.filter(Files::isRegularFile) |
|
|
|
|
@ -195,26 +217,4 @@ class AotTests {
@@ -195,26 +217,4 @@ class AotTests {
|
|
|
|
|
return contentOf(new File(project, "target/build.log")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@TestTemplate |
|
|
|
|
void whenAotRunsWithDevtoolsInClasspathItIsExcluded(MavenBuild mavenBuild) { |
|
|
|
|
mavenBuild.project("aot-exclude-devtools").goals("package").execute((project) -> { |
|
|
|
|
Path aotDirectory = project.toPath().resolve("target/spring-aot/main"); |
|
|
|
|
assertThat(aotDirectory).exists(); |
|
|
|
|
Path sourcesDirectory = aotDirectory.resolve("sources"); |
|
|
|
|
assertThat(sourcesDirectory).exists(); |
|
|
|
|
assertThat(collectRelativePaths(sourcesDirectory)).isNotEmpty(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@TestTemplate |
|
|
|
|
void whenTestAotRunsWithDevtoolsInClasspathItIsExcluded(MavenBuild mavenBuild) { |
|
|
|
|
mavenBuild.project("aot-test-exclude-devtools").goals("process-test-classes").execute((project) -> { |
|
|
|
|
Path aotDirectory = project.toPath().resolve("target/spring-aot/test"); |
|
|
|
|
assertThat(aotDirectory).exists(); |
|
|
|
|
Path sourcesDirectory = aotDirectory.resolve("sources"); |
|
|
|
|
assertThat(sourcesDirectory).exists(); |
|
|
|
|
assertThat(collectRelativePaths(sourcesDirectory)).isNotEmpty(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|