File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal
test/framework/src/main/java/org/elasticsearch/entitlement/bootstrap Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 27
27
import org .gradle .api .artifacts .ConfigurationContainer ;
28
28
import org .gradle .api .file .FileCollection ;
29
29
import org .gradle .api .plugins .JavaPlugin ;
30
+ import org .gradle .api .provider .Provider ;
30
31
import org .gradle .api .provider .ProviderFactory ;
31
32
import org .gradle .api .tasks .SourceSet ;
32
33
import org .gradle .api .tasks .SourceSetContainer ;
@@ -182,7 +183,7 @@ public void execute(Task t) {
182
183
FileCollection mainRuntime = mainSourceSet .getRuntimeClasspath ();
183
184
FileCollection testRuntime = testSourceSet .getRuntimeClasspath ();
184
185
FileCollection testOnlyFiles = testRuntime .minus (mainRuntime );
185
- nonInputProperties . systemProperty ("es.entitlement.testOnlyPath" , testOnlyFiles ::getAsPath );
186
+ test . environment ("es.entitlement.testOnlyPath" , project . provider ( testOnlyFiles ::getAsPath ) );
186
187
}
187
188
188
189
test .systemProperties (getProviderFactory ().systemPropertiesPrefixedBy ("tests." ).get ());
Original file line number Diff line number Diff line change @@ -122,12 +122,12 @@ private static TestPolicyManager createPolicyManager(PathLookup pathLookup) thro
122
122
123
123
FilesEntitlementsValidation .validate (pluginPolicies , pathLookup );
124
124
125
- String testOnlyPathProperty = System .getProperty ("es.entitlement.testOnlyPath" );
125
+ String testOnlyPathString = System .getenv ("es.entitlement.testOnlyPath" );
126
126
Set <String > testOnlyClassPath ;
127
- if (testOnlyPathProperty == null ) {
127
+ if (testOnlyPathString == null ) {
128
128
testOnlyClassPath = Set .of ();
129
129
} else {
130
- testOnlyClassPath = Arrays .stream (testOnlyPathProperty .split (":" )).collect (toCollection (TreeSet ::new ));
130
+ testOnlyClassPath = Arrays .stream (testOnlyPathString .split (":" )).collect (toCollection (TreeSet ::new ));
131
131
}
132
132
133
133
return new TestPolicyManager (
You can’t perform that action at this time.
0 commit comments