summaryrefslogtreecommitdiffstats
path: root/tools/infer/test/settings.gradle
blob: 8c8345b4383587e5eed52f756fe49bb3eb0adfab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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