Skip to content

Commit

Permalink
Persist the TestKit working directory for performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
baron1405 committed Dec 23, 2024
1 parent a92edf2 commit d03d189
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ run
.gradle
generated-src
*.hprof
testkit
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ tasks {
withType<Test> {
useJUnitPlatform()

systemProperty("projectDir", projectDir)
systemProperty("buildDir", layout.buildDirectory.get().asFile)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public class PluginIntegTest {
private static final JsonSchema JSON_SCHEMA;
private static final URL XML_SCHEMA;
private static final Path BASE_DIR = Path.of(System.getProperty("buildDir"), "integTest");
private static final Path WORKING_DIR;
private static final Path WORKING_DIR = Path.of(System.getProperty("projectDir"), "testkit");

static {
try {
Files.createDirectories(BASE_DIR);
WORKING_DIR = Files.createTempDirectory(BASE_DIR, "working");
Files.createDirectories(WORKING_DIR);

final JsonNode schema = JsonLoader.fromResource("/org/cthing/gradle/plugins/locc/locc-1.json");
JSON_SCHEMA = JsonSchemaFactory.byDefault().getJsonSchema(schema);
Expand Down

0 comments on commit d03d189

Please sign in to comment.