File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test
test/external-modules/error-query Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1616import org .gradle .api .provider .Provider ;
1717import org .gradle .api .tasks .testing .Test ;
1818
19+ import java .io .File ;
1920import java .util .Arrays ;
2021import java .util .List ;
2122
@@ -26,21 +27,22 @@ public class MutedTestPlugin implements Plugin<Project> {
2627
2728 @ Override
2829 public void apply (Project project ) {
30+ project .getRootProject ().getPlugins ().apply (GlobalBuildInfoPlugin .class );
31+ var buildParams = loadBuildParams (project ).get ();
32+
33+ File settingsRoot = project .getLayout ().getSettingsDirectory ().getAsFile ();
2934 String additionalFilePaths = project .hasProperty (ADDITIONAL_FILES_PROPERTY )
3035 ? project .property (ADDITIONAL_FILES_PROPERTY ).toString ()
3136 : "" ;
3237 List <RegularFile > additionalFiles = Arrays .stream (additionalFilePaths .split ("," ))
3338 .filter (p -> p .isEmpty () == false )
34- .map (p -> project .getRootProject (). getLayout ().getProjectDirectory ().file (p ))
39+ .map (p -> project .getLayout ().getSettingsDirectory ().file (p ))
3540 .toList ();
3641
37- project .getRootProject ().getPlugins ().apply (GlobalBuildInfoPlugin .class );
38- var buildParams = loadBuildParams (project ).get ();
39-
4042 Provider <MutedTestsBuildService > mutedTestsProvider = project .getGradle ()
4143 .getSharedServices ()
4244 .registerIfAbsent ("mutedTests" , MutedTestsBuildService .class , spec -> {
43- spec .getParameters ().getInfoPath ().set (project . getRootProject (). getProjectDir () );
45+ spec .getParameters ().getInfoPath ().set (settingsRoot );
4446 spec .getParameters ().getAdditionalFiles ().set (additionalFiles );
4547 });
4648
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ dependencies {
2929 clusterModules project(' :x-pack:plugin:ilm' )
3030}
3131
32- tasks. withType(StandaloneRestIntegTestTask ) {
32+ tasks. withType(StandaloneRestIntegTestTask ). configureEach {
3333 def isSnapshot = buildParams. snapshotBuild
3434 onlyIf(" snapshot build" ) { isSnapshot }
3535}
You can’t perform that action at this time.
0 commit comments