forked from peidevs/GDCR-Scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
37 lines (33 loc) · 1.08 KB
/
build.gradle
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
30
31
32
33
34
35
36
37
// For Travis-CI
// We use a multi-project build to run tests on Travis-CI.
// Non-Gradle projects are configured here, so we can execute command-line stuff.
def addShellPrefix = { command ->
def commandArray = new String[3]
commandArray[0] = "sh"
commandArray[1] = "-c"
commandArray[2] = command
return commandArray
}
def runCommand = { command, workingDir ->
def process = new ProcessBuilder(addShellPrefix(command))
.directory(workingDir)
.redirectErrorStream(true)
.start()
process.inputStream.eachLine {println it}
process.waitFor()
return process.exitValue()
}
configure(subprojects.find {it.name == 'python'}) {
task test << {
def retVal = runCommand("python test_gol.py", projectDir)
assert retVal == 0
println "tests passed"
}
}
configure(subprojects.find {it.name == 'ruby'}) {
task test << {
def retVal = runCommand("rake test", projectDir)
assert retVal == 0
println "tests passed"
}
}