Ensure test temporary directory exists (#52227)
Today we we set the test temporary directory explicitly by controling java.io.tmpdir. Yet, we do not guarantee this directory exists, instead relying on a test base class (LuceneTestCase) to create this directory when it initializes. However, some of our tests do not rely on our test framework, and thus do not have access to LuceneTestCase, instead relying on RandomizedRunner directly. We should not be relying on the temporary directory being implicitly created, instead guaranteeing that it exists before test execution starts. This commit does that by creating the test temporary directory before the test task executes (via a doFirst).
This commit is contained in:
parent
0372d6d239
commit
6ed3311443
|
@ -694,6 +694,7 @@ class BuildPlugin implements Plugin<Project> {
|
|||
project.mkdir(testOutputDir)
|
||||
project.mkdir(heapdumpDir)
|
||||
project.mkdir(test.workingDir)
|
||||
project.mkdir(test.workingDir.toPath().resolve('temp'))
|
||||
|
||||
if (BuildParams.runtimeJavaVersion >= JavaVersion.VERSION_1_9) {
|
||||
test.jvmArgs '--illegal-access=warn'
|
||||
|
|
Loading…
Reference in New Issue