Skip to content

Commit

Permalink
Merge pull request quarkusio#36139 from iocanel/prod-mode-build-dir
Browse files Browse the repository at this point in the history
QuarkusProdModeTest creates tmp dirs under build dir
  • Loading branch information
gsmet authored Oct 3, 2023
2 parents 5910ca2 + 6f8a0f4 commit 899389a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,12 @@ public void close() throws Throwable {
Class<?> testClass = extensionContext.getRequiredTestClass();

try {
outputDir = Files.createTempDirectory("quarkus-prod-mode-test");
Optional<Path> projectBuildDir = Optional.ofNullable(System.getProperty("project.build.directory")) //maven
.or(() -> Optional.ofNullable(System.getProperty("buildDir"))) //gradle
.map(Path::of);

outputDir = projectBuildDir.isPresent() ? Files.createTempDirectory(projectBuildDir.get(), "quarkus-prod-mode-test")
: Files.createTempDirectory("quarkus-prod-mode-test");
Path deploymentDir = outputDir.resolve("deployment-result");
buildDir = outputDir.resolve("build-result");

Expand Down

0 comments on commit 899389a

Please sign in to comment.