mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
6cf2bd98ec
Now autotest does not require java to be installed, but it will let the user know that infer is not being tested if java is missing. Differential Revision: https://phabricator.services.mozilla.com/D7326 --HG-- extra : moz-landing-system : lando
25 lines
855 B
Groovy
25 lines
855 B
Groovy
// Check out root/settings.gradle for more information
|
|
|
|
rootProject.name = 'infer'
|
|
|
|
def topsrcdir = rootProject.projectDir.absolutePath + '/../../..'
|
|
|
|
def commandLine = ["${topsrcdir}/mach", "environment", "--format", "json", "--verbose"]
|
|
def proc = commandLine.execute(null, new File(topsrcdir))
|
|
def standardOutput = new ByteArrayOutputStream()
|
|
proc.consumeProcessOutput(standardOutput, standardOutput)
|
|
proc.waitFor()
|
|
|
|
if (proc.exitValue() != 0) {
|
|
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${proc.exitValue()}:\n\n${standardOutput.toString()}")
|
|
}
|
|
|
|
import groovy.json.JsonSlurper
|
|
def slurper = new JsonSlurper()
|
|
def json = slurper.parseText(standardOutput.toString())
|
|
|
|
include 'autotest'
|
|
project(':autotest').projectDir = new File("${json.topsrcdir}/tools/infer/test/autotest")
|
|
|
|
gradle.ext.mozconfig = json
|