mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 12:56:53 +00:00
[Build] randomizedtesting: Allow property values to be closures (#34319)
Makes it easier to have property values that are evaluated at build time rather than configuration time in a Gradle idiomatic way.
This commit is contained in:
parent
6f5daadb3c
commit
c031322c18
@ -264,7 +264,11 @@ class RandomizedTestingTask extends DefaultTask {
|
||||
throw new InvalidUserDataException('Seed should be ' +
|
||||
'set on the project instead of a system property')
|
||||
}
|
||||
sysproperty key: prop.getKey(), value: prop.getValue().toString()
|
||||
if (prop.getValue() instanceof Closure) {
|
||||
sysproperty key: prop.getKey(), value: (prop.getValue() as Closure).call().toString()
|
||||
} else {
|
||||
sysproperty key: prop.getKey(), value: prop.getValue().toString()
|
||||
}
|
||||
}
|
||||
systemProperty 'tests.seed', project.testSeed
|
||||
for (Map.Entry<String, Object> envvar : environmentVariables) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user