Ignore test seed when flag is passed (#44234)
This commit is contained in:
parent
8030d8f6dc
commit
7a82106de6
|
@ -23,7 +23,6 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import groovy.transform.CompileDynamic
|
import groovy.transform.CompileDynamic
|
||||||
import groovy.transform.CompileStatic
|
import groovy.transform.CompileStatic
|
||||||
import org.apache.commons.io.IOUtils
|
import org.apache.commons.io.IOUtils
|
||||||
import org.apache.tools.ant.taskdefs.Java
|
|
||||||
import org.eclipse.jgit.lib.Constants
|
import org.eclipse.jgit.lib.Constants
|
||||||
import org.eclipse.jgit.lib.RepositoryBuilder
|
import org.eclipse.jgit.lib.RepositoryBuilder
|
||||||
import org.elasticsearch.gradle.info.GlobalBuildInfoPlugin
|
import org.elasticsearch.gradle.info.GlobalBuildInfoPlugin
|
||||||
|
@ -861,17 +860,25 @@ class BuildPlugin implements Plugin<Project> {
|
||||||
|
|
||||||
// we use './temp' since this is per JVM and tests are forbidden from writing to CWD
|
// we use './temp' since this is per JVM and tests are forbidden from writing to CWD
|
||||||
test.systemProperties 'gradle.dist.lib': new File(project.class.location.toURI()).parent,
|
test.systemProperties 'gradle.dist.lib': new File(project.class.location.toURI()).parent,
|
||||||
'gradle.worker.jar': "${project.gradle.getGradleUserHomeDir()}/caches/${project.gradle.gradleVersion}/workerMain/gradle-worker.jar",
|
|
||||||
'gradle.user.home': project.gradle.getGradleUserHomeDir(),
|
|
||||||
'java.io.tmpdir': './temp',
|
'java.io.tmpdir': './temp',
|
||||||
'java.awt.headless': 'true',
|
'java.awt.headless': 'true',
|
||||||
'tests.gradle': 'true',
|
'tests.gradle': 'true',
|
||||||
'tests.artifact': project.name,
|
'tests.artifact': project.name,
|
||||||
'tests.task': test.path,
|
'tests.task': test.path,
|
||||||
'tests.security.manager': 'true',
|
'tests.security.manager': 'true',
|
||||||
'tests.seed': project.property('testSeed'),
|
|
||||||
'jna.nosys': 'true'
|
'jna.nosys': 'true'
|
||||||
|
|
||||||
|
// ignore changing test seed when build is passed -Dignore.tests.seed for cacheability experimentation
|
||||||
|
if (System.getProperty('ignore.tests.seed') != null) {
|
||||||
|
nonInputProperties.systemProperty('tests.seed', project.property('testSeed'))
|
||||||
|
} else {
|
||||||
|
test.systemProperty('tests.seed', project.property('testSeed'))
|
||||||
|
}
|
||||||
|
|
||||||
|
// don't track these as inputs since they contain absolute paths and break cache relocatability
|
||||||
|
nonInputProperties.systemProperty('gradle.worker.jar', "${project.gradle.getGradleUserHomeDir()}/caches/${project.gradle.gradleVersion}/workerMain/gradle-worker.jar")
|
||||||
|
nonInputProperties.systemProperty('gradle.user.home', project.gradle.getGradleUserHomeDir())
|
||||||
|
|
||||||
nonInputProperties.systemProperty('compiler.java', "${-> (ext.get('compilerJavaVersion') as JavaVersion).getMajorVersion()}")
|
nonInputProperties.systemProperty('compiler.java', "${-> (ext.get('compilerJavaVersion') as JavaVersion).getMajorVersion()}")
|
||||||
|
|
||||||
// TODO: remove setting logging level via system property
|
// TODO: remove setting logging level via system property
|
||||||
|
|
Loading…
Reference in New Issue