File: build.gradle

package info (click to toggle)
opensearch 2.4.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 109,808 kB
  • sloc: java: 1,199,376; sh: 963; xml: 379; python: 73; perl: 66; makefile: 11
file content (29 lines) | stat: -rw-r--r-- 972 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

import org.opensearch.gradle.test.RestIntegTestTask
import org.opensearch.gradle.testclusters.TestClustersPlugin

subprojects { Project subproj ->
  subproj.tasks.withType(RestIntegTestTask) {
    if (subproj.extensions.findByName("${it.name}Cluster")) {
      subproj.extensions.configure("${it.name}Cluster") { cluster ->
        cluster.distribution = System.getProperty('tests.distribution', 'archive')
      }
    }
  }
  plugins.withType(TestClustersPlugin).whenPluginAdded {
    testClusters.all {
      String configuredTestDistribution = System.getProperty('tests.distribution', 'archive').toUpperCase()
      testDistribution = configuredTestDistribution
    }
  }
}